From 033f0c30154107ddf36cd682c860e95025bf00b0 Mon Sep 17 00:00:00 2001 From: lj1412 Date: Tue, 14 Feb 2017 15:11:44 +0000 Subject: Init ncomp.sirius.manager Change-Id: I6691ecd21a942c96cb20cf3baa297e4b2dc7f970 Signed-off-by: lj1412 --- .gitignore | 1 + .gitreview | 4 + LICENSE.txt | 22 + README.md | 8 + deptree.text | 1 + ncomp-sirius-manager-agent-model/.classpath | 17 + ncomp-sirius-manager-agent-model/.gitignore | 2 + ncomp-sirius-manager-agent-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-agent-model/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 24 + ncomp-sirius-manager-agent-model/build.properties | 11 + ncomp-sirius-manager-agent-model/plugin.properties | 4 + ncomp-sirius-manager-agent-model/plugin.xml | 25 + ncomp-sirius-manager-agent-model/pom.xml | 18 + .../sirius/manager/agent/collectd/CollectdCpu.java | 156 + .../manager/agent/collectd/CollectdDisk.java | 265 ++ .../manager/agent/collectd/CollectdFactory.java | 162 + .../manager/agent/collectd/CollectdFileSystem.java | 102 + .../manager/agent/collectd/CollectdInterface.java | 210 ++ .../manager/agent/collectd/CollectdKvmDisk.java | 156 + .../agent/collectd/CollectdKvmInstance.java | 111 + .../agent/collectd/CollectdKvmInterface.java | 264 ++ .../manager/agent/collectd/CollectdMemory.java | 154 + .../manager/agent/collectd/CollectdPackage.java | 3862 ++++++++++++++++++++ .../manager/agent/collectd/CollectdProcesses.java | 236 ++ .../manager/agent/collectd/CollectdServer.java | 379 ++ .../manager/agent/collectd/CollectdSwap.java | 127 + .../manager/agent/collectd/CollectdVmem.java | 992 +++++ .../agent/collectd/impl/CollectdCpuImpl.java | 506 +++ .../agent/collectd/impl/CollectdDiskImpl.java | 722 ++++ .../agent/collectd/impl/CollectdFactoryImpl.java | 237 ++ .../collectd/impl/CollectdFileSystemImpl.java | 398 ++ .../agent/collectd/impl/CollectdInterfaceImpl.java | 614 ++++ .../agent/collectd/impl/CollectdKvmDiskImpl.java | 506 +++ .../collectd/impl/CollectdKvmInstanceImpl.java | 418 +++ .../collectd/impl/CollectdKvmInterfaceImpl.java | 722 ++++ .../agent/collectd/impl/CollectdMemoryImpl.java | 348 ++ .../agent/collectd/impl/CollectdPackageImpl.java | 1562 ++++++++ .../agent/collectd/impl/CollectdProcessesImpl.java | 511 +++ .../agent/collectd/impl/CollectdServerImpl.java | 1014 +++++ .../agent/collectd/impl/CollectdSwapImpl.java | 294 ++ .../agent/collectd/impl/CollectdVmemImpl.java | 2023 ++++++++++ .../collectd/util/CollectdAdapterFactory.java | 379 ++ .../agent/collectd/util/CollectdSwitch.java | 412 +++ .../agent/monitoring/MonitoringFactory.java | 63 + .../agent/monitoring/MonitoringPackage.java | 263 ++ .../agent/monitoring/SiriusManagerAgentServer.java | 40 + .../monitoring/impl/MonitoringFactoryImpl.java | 116 + .../monitoring/impl/MonitoringPackageImpl.java | 196 + .../impl/SiriusManagerAgentServerImpl.java | 431 +++ .../monitoring/util/MonitoringAdapterFactory.java | 199 + .../agent/monitoring/util/MonitoringSwitch.java | 183 + .../src/main/xcore/collectd.xcore | 169 + .../src/main/xcore/server.xcore | 32 + ncomp-sirius-manager-agent-server/.classpath | 27 + ncomp-sirius-manager-agent-server/.gitignore | 1 + ncomp-sirius-manager-agent-server/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 2 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-agent-server/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 15 + ncomp-sirius-manager-agent-server/build.properties | 6 + ncomp-sirius-manager-agent-server/pom.xml | 169 + .../src/assembly/assemble_zip.xml | 61 + .../manager/agent/server/tools/Generator.java | 66 + .../agent/server/tools/MonitoringUtil.groovy | 438 +++ .../AgentSiriusManagerAgentServerProvider.java | 56 + .../monitoring/gui/AgentGuiClientApiProvider.java | 83 + .../south/AgentSouthBoundApiProvider.java | 89 + .../bin/sirius-manager-agent-server-controller | 137 + .../src/main/server/bin/agent.sh | 55 + .../src/main/server/config/console.properties | 3 + .../src/main/server/config/gui.properties | 0 .../src/main/server/config/makefile | 9 + .../src/main/server/config/pw.sh.sh | 15 + .../src/main/server/config/server.properties | 7 + .../src/main/server/scripts/console.groovy | 27 + .../servers/monitoring/AgentMonitoringFactory.java | 54 + .../monitoring/AgentSiriusManagerAgentServer.java | 301 ++ .../AgentSiriusManagerAgentServerClient.java | 119 + .../AgentSiriusManagerAgentServerConsole.java | 164 + ...ntSiriusManagerAgentServerProviderTemplate.java | 82 + .../AgentSiriusManagerAgentServerServer.java | 116 + .../servers/monitoring/gui/AgentGuiClientApi.java | 215 ++ .../monitoring/gui/AgentGuiClientApiClient.java | 96 + .../monitoring/gui/AgentGuiClientApiConsole.java | 114 + .../gui/AgentGuiClientApiProviderTemplate.java | 83 + .../servers/monitoring/gui/AgentModelFactory.java | 54 + .../monitoring/south/AgentServerFactory.java | 54 + .../monitoring/south/AgentSouthBoundApi.java | 129 + .../monitoring/south/AgentSouthBoundApiClient.java | 78 + .../south/AgentSouthBoundApiConsole.java | 81 + .../south/AgentSouthBoundApiProviderTemplate.java | 86 + ncomp-sirius-manager-base/.project | 17 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-base/LICENSE.txt | 22 + ncomp-sirius-manager-base/pom.xml | 239 ++ ncomp-sirius-manager-console/.classpath | 24 + ncomp-sirius-manager-console/.gitignore | 1 + ncomp-sirius-manager-console/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-console/LICENSE.txt | 22 + ncomp-sirius-manager-console/META-INF/MANIFEST.MF | 12 + ncomp-sirius-manager-console/build.properties | 3 + ncomp-sirius-manager-console/pom.xml | 187 + .../ncomp/sirius/manager/console/Console.groovy | 217 ++ .../ncomp/sirius/manager/console/Utils.groovy | 176 + .../ncomp/sirius/manager/groovy/AlertUtils.groovy | 98 + .../ncomp/sirius/manager/groovy/Ecore2Xcore.groovy | 68 + .../ncomp/sirius/manager/groovy/TableUtils.groovy | 220 ++ ncomp-sirius-manager-drools/.classpath | 27 + ncomp-sirius-manager-drools/.gitignore | 1 + ncomp-sirius-manager-drools/.project | 34 + .../.settings/org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-drools/LICENSE.txt | 22 + ncomp-sirius-manager-drools/META-INF/MANIFEST.MF | 8 + ncomp-sirius-manager-drools/build.properties | 3 + ncomp-sirius-manager-drools/pom.xml | 148 + .../sirius/manager/drools/DroolsEventListener.java | 29 + .../ncomp/sirius/manager/drools/DroolsRuntime.java | 710 ++++ ncomp-sirius-manager-generator/.classpath | 18 + ncomp-sirius-manager-generator/.gitignore | 1 + ncomp-sirius-manager-generator/.project | 35 + .../.settings/org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.jdt.groovy.core.prefs | 2 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-generator/LICENSE.txt | 22 + .../META-INF/MANIFEST.MF | 7 + ncomp-sirius-manager-generator/build.properties | 3 + ncomp-sirius-manager-generator/pom.xml | 190 + .../manager/generator/ControllerGenerator.groovy | 303 ++ .../src/main/templates/Client.java | 125 + .../src/main/templates/Console.java | 97 + .../src/main/templates/Controller.java | 191 + .../src/main/templates/Factory.java | 64 + .../src/main/templates/Provider.java | 187 + .../src/main/templates/Server.java | 135 + .../src/main/templates/console | 3 + .../src/main/templates/controller | 140 + .../src/main/templates/xcore | 32 + ncomp-sirius-manager-model/.classpath | 12 + ncomp-sirius-manager-model/.gitignore | 1 + ncomp-sirius-manager-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-model/LICENSE.txt | 22 + ncomp-sirius-manager-model/META-INF/MANIFEST.MF | 38 + ncomp-sirius-manager-model/build.properties | 5 + ncomp-sirius-manager-model/plugin.properties | 4 + ncomp-sirius-manager-model/plugin.xml | 65 + ncomp-sirius-manager-model/pom.xml | 18 + .../ncomp/gwt/siriusportal/model/GuiClientApi.java | 89 + .../ncomp/gwt/siriusportal/model/GuiDiagram.java | 63 + .../gwt/siriusportal/model/GuiDiagramItem.java | 71 + .../siriusportal/model/GuiDiagramRectangle.java | 151 + .../ncomp/gwt/siriusportal/model/GuiHtml.java | 71 + .../gwt/siriusportal/model/GuiNamedObject.java | 70 + .../ncomp/gwt/siriusportal/model/GuiObject.java | 63 + .../gwt/siriusportal/model/GuiObjectNamedList.java | 61 + .../siriusportal/model/GuiObjectUnNamedList.java | 61 + .../gwt/siriusportal/model/GuiObjectValue.java | 98 + .../siriusportal/model/GuiObjectValueInteger.java | 70 + .../siriusportal/model/GuiObjectValueObject.java | 70 + .../model/GuiObjectValueReference.java | 70 + .../siriusportal/model/GuiObjectValueString.java | 70 + .../model/GuiObjectValueTimeSeries.java | 70 + .../ncomp/gwt/siriusportal/model/GuiTable.java | 80 + .../ncomp/gwt/siriusportal/model/GuiTableCell.java | 71 + .../gwt/siriusportal/model/GuiTableCellDate.java | 71 + .../gwt/siriusportal/model/GuiTableCellDouble.java | 97 + .../siriusportal/model/GuiTableCellReference.java | 98 + .../siriusportal/model/GuiTableCellReferences.java | 61 + .../gwt/siriusportal/model/GuiTableCellString.java | 70 + .../gwt/siriusportal/model/GuiTableColumn.java | 211 ++ .../gwt/siriusportal/model/GuiTableColumnType.java | 280 ++ .../ncomp/gwt/siriusportal/model/GuiTableRow.java | 63 + .../ncomp/gwt/siriusportal/model/GuiTimeSerie.java | 255 ++ .../gwt/siriusportal/model/GuiTimeSerieData.java | 181 + .../ncomp/gwt/siriusportal/model/GuiTree.java | 63 + .../ncomp/gwt/siriusportal/model/GuiTreeNode.java | 201 + .../ncomp/gwt/siriusportal/model/GuiView.java | 332 ++ .../ncomp/gwt/siriusportal/model/ModelFactory.java | 288 ++ .../ncomp/gwt/siriusportal/model/ModelPackage.java | 3446 +++++++++++++++++ .../siriusportal/model/impl/GuiClientApiImpl.java | 163 + .../siriusportal/model/impl/GuiDiagramImpl.java | 173 + .../model/impl/GuiDiagramItemImpl.java | 184 + .../model/impl/GuiDiagramRectangleImpl.java | 345 ++ .../gwt/siriusportal/model/impl/GuiHtmlImpl.java | 184 + .../model/impl/GuiNamedObjectImpl.java | 183 + .../gwt/siriusportal/model/impl/GuiObjectImpl.java | 173 + .../model/impl/GuiObjectNamedListImpl.java | 171 + .../model/impl/GuiObjectUnNamedListImpl.java | 171 + .../model/impl/GuiObjectValueImpl.java | 238 ++ .../model/impl/GuiObjectValueIntegerImpl.java | 183 + .../model/impl/GuiObjectValueObjectImpl.java | 196 + .../model/impl/GuiObjectValueReferenceImpl.java | 183 + .../model/impl/GuiObjectValueStringImpl.java | 183 + .../model/impl/GuiObjectValueTimeSeriesImpl.java | 183 + .../model/impl/GuiTableCellDateImpl.java | 185 + .../model/impl/GuiTableCellDoubleImpl.java | 237 ++ .../siriusportal/model/impl/GuiTableCellImpl.java | 184 + .../model/impl/GuiTableCellReferenceImpl.java | 238 ++ .../model/impl/GuiTableCellReferencesImpl.java | 171 + .../model/impl/GuiTableCellStringImpl.java | 183 + .../model/impl/GuiTableColumnImpl.java | 455 +++ .../gwt/siriusportal/model/impl/GuiTableImpl.java | 210 ++ .../siriusportal/model/impl/GuiTableRowImpl.java | 173 + .../model/impl/GuiTimeSerieDataImpl.java | 402 ++ .../siriusportal/model/impl/GuiTimeSerieImpl.java | 568 +++ .../gwt/siriusportal/model/impl/GuiTreeImpl.java | 173 + .../siriusportal/model/impl/GuiTreeNodeImpl.java | 459 +++ .../siriusportal/model/impl/ModelFactoryImpl.java | 490 +++ .../siriusportal/model/impl/ModelPackageImpl.java | 1569 ++++++++ .../model/util/ModelAdapterFactory.java | 627 ++++ .../gwt/siriusportal/model/util/ModelSwitch.java | 713 ++++ .../manager/controllermodel/ControllerModel.java | 179 + .../controllermodel/ControllermodelFactory.java | 63 + .../controllermodel/ControllermodelPackage.java | 294 ++ .../controllermodel/impl/ControllerModelImpl.java | 400 ++ .../impl/ControllermodelFactoryImpl.java | 116 + .../impl/ControllermodelPackageImpl.java | 249 ++ .../util/ControllermodelAdapterFactory.java | 141 + .../util/ControllermodelSwitch.java | 131 + .../ncomp/sirius/manager/graph/GraphFactory.java | 90 + .../ncomp/sirius/manager/graph/GraphPackage.java | 662 ++++ .../ncomp/sirius/manager/graph/GuiGraph.java | 80 + .../ncomp/sirius/manager/graph/GuiGraphEdge.java | 97 + .../ncomp/sirius/manager/graph/GuiGraphItem.java | 125 + .../ncomp/sirius/manager/graph/GuiGraphNode.java | 151 + .../manager/graph/impl/GraphFactoryImpl.java | 149 + .../manager/graph/impl/GraphPackageImpl.java | 401 ++ .../manager/graph/impl/GuiGraphEdgeImpl.java | 237 ++ .../sirius/manager/graph/impl/GuiGraphImpl.java | 210 ++ .../manager/graph/impl/GuiGraphItemImpl.java | 292 ++ .../manager/graph/impl/GuiGraphNodeImpl.java | 345 ++ .../manager/graph/util/GraphAdapterFactory.java | 195 + .../sirius/manager/graph/util/GraphSwitch.java | 196 + .../manager/properties/AbstractProperty.java | 39 + .../ncomp/sirius/manager/properties/Module.java | 90 + .../sirius/manager/properties/ModuleContainer.java | 63 + .../sirius/manager/properties/ModuleProperty.java | 38 + .../manager/properties/PropertiesFactory.java | 81 + .../manager/properties/PropertiesPackage.java | 581 +++ .../ncomp/sirius/manager/properties/Property.java | 97 + .../properties/impl/AbstractPropertyImpl.java | 62 + .../properties/impl/ModuleContainerImpl.java | 173 + .../sirius/manager/properties/impl/ModuleImpl.java | 243 ++ .../properties/impl/ModulePropertyImpl.java | 514 +++ .../properties/impl/PropertiesFactoryImpl.java | 138 + .../properties/impl/PropertiesPackageImpl.java | 362 ++ .../manager/properties/impl/PropertyImpl.java | 237 ++ .../properties/util/PropertiesAdapterFactory.java | 233 ++ .../manager/properties/util/PropertiesSwitch.java | 237 ++ .../manager/server/AbstractManagementServer.java | 153 + .../AbstractManagementServerConfiguration.java | 135 + .../ncomp/sirius/manager/server/LoggerInfo.java | 71 + .../sirius/manager/server/ManagementInfo.java | 126 + .../ncomp/sirius/manager/server/Module.java | 90 + .../sirius/manager/server/ModuleContainer.java | 63 + .../ncomp/sirius/manager/server/Response.java | 101 + .../sirius/manager/server/ResponseStatus.java | 254 ++ .../ncomp/sirius/manager/server/ServerFactory.java | 117 + .../ncomp/sirius/manager/server/ServerPackage.java | 1210 ++++++ .../ncomp/sirius/manager/server/SouthBoundApi.java | 75 + .../manager/server/SouthBoundApiWithProxy.java | 48 + .../AbstractManagementServerConfigurationImpl.java | 315 ++ .../server/impl/AbstractManagementServerImpl.java | 361 ++ .../sirius/manager/server/impl/LoggerInfoImpl.java | 184 + .../manager/server/impl/ManagementInfoImpl.java | 311 ++ .../sirius/manager/server/impl/ResponseImpl.java | 239 ++ .../manager/server/impl/ServerFactoryImpl.java | 230 ++ .../manager/server/impl/ServerPackageImpl.java | 751 ++++ .../manager/server/impl/SouthBoundApiImpl.java | 121 + .../server/impl/SouthBoundApiWithProxyImpl.java | 90 + .../manager/server/util/ServerAdapterFactory.java | 265 ++ .../sirius/manager/server/util/ServerSwitch.java | 275 ++ .../manager/swagger/SwaggerCollectionFormat.java | 300 ++ .../sirius/manager/swagger/SwaggerContact.java | 71 + .../sirius/manager/swagger/SwaggerDefinition.java | 39 + .../manager/swagger/SwaggerEnumObjectType.java | 61 + .../swagger/SwaggerExternalDocumentation.java | 98 + .../sirius/manager/swagger/SwaggerFactory.java | 243 ++ .../ncomp/sirius/manager/swagger/SwaggerInfo.java | 206 ++ .../sirius/manager/swagger/SwaggerLicense.java | 98 + .../ncomp/sirius/manager/swagger/SwaggerModel.java | 267 ++ .../manager/swagger/SwaggerNamedObjectType.java | 152 + .../swagger/SwaggerObjectClassDefinition.java | 122 + .../sirius/manager/swagger/SwaggerObjectType.java | 73 + .../swagger/SwaggerObjectTypeDefinition.java | 99 + .../swagger/SwaggerObjectTypeReference.java | 70 + .../sirius/manager/swagger/SwaggerOperation.java | 257 ++ .../sirius/manager/swagger/SwaggerPackage.java | 3767 +++++++++++++++++++ .../sirius/manager/swagger/SwaggerParameter.java | 102 + .../manager/swagger/SwaggerParameterType.java | 330 ++ .../ncomp/sirius/manager/swagger/SwaggerPath.java | 63 + .../swagger/SwaggerReferenceObjectType.java | 98 + .../sirius/manager/swagger/SwaggerResponse.java | 116 + .../sirius/manager/swagger/SwaggerSchema.java | 98 + .../sirius/manager/swagger/SwaggerSecurity.java | 62 + .../manager/swagger/SwaggerSecurityDefinition.java | 155 + .../swagger/SwaggerSecurityDefinitionScope.java | 71 + .../manager/swagger/SwaggerSecurityList.java | 71 + .../manager/swagger/SwaggerSecurityObject.java | 62 + .../manager/swagger/SwaggerSimpleObjectType.java | 235 ++ .../ncomp/sirius/manager/swagger/SwaggerTag.java | 125 + .../ncomp/sirius/manager/swagger/SwaggerXml.java | 99 + .../manager/swagger/impl/SwaggerContactImpl.java | 184 + .../swagger/impl/SwaggerEnumObjectTypeImpl.java | 164 + .../impl/SwaggerExternalDocumentationImpl.java | 238 ++ .../manager/swagger/impl/SwaggerFactoryImpl.java | 411 +++ .../manager/swagger/impl/SwaggerInfoImpl.java | 492 +++ .../manager/swagger/impl/SwaggerLicenseImpl.java | 238 ++ .../manager/swagger/impl/SwaggerModelImpl.java | 633 ++++ .../swagger/impl/SwaggerNamedObjectTypeImpl.java | 461 +++ .../impl/SwaggerObjectClassDefinitionImpl.java | 321 ++ .../swagger/impl/SwaggerObjectTypeImpl.java | 179 + .../manager/swagger/impl/SwaggerOperationImpl.java | 582 +++ .../manager/swagger/impl/SwaggerPackageImpl.java | 1469 ++++++++ .../manager/swagger/impl/SwaggerParameterImpl.java | 263 ++ .../manager/swagger/impl/SwaggerPathImpl.java | 173 + .../impl/SwaggerReferenceObjectTypeImpl.java | 243 ++ .../manager/swagger/impl/SwaggerResponseImpl.java | 304 ++ .../impl/SwaggerSecurityDefinitionImpl.java | 338 ++ .../impl/SwaggerSecurityDefinitionScopeImpl.java | 185 + .../manager/swagger/impl/SwaggerSecurityImpl.java | 165 + .../swagger/impl/SwaggerSecurityObjectImpl.java | 167 + .../swagger/impl/SwaggerSimpleObjectTypeImpl.java | 505 +++ .../manager/swagger/impl/SwaggerTagImpl.java | 319 ++ .../manager/swagger/impl/SwaggerXmlImpl.java | 238 ++ .../swagger/util/SwaggerAdapterFactory.java | 521 +++ .../sirius/manager/swagger/util/SwaggerSwitch.java | 590 +++ .../tableTemplate/AbstractTableTemplate.java | 98 + .../tableTemplate/HasColumnsTableTemplate.java | 63 + .../tableTemplate/IteratorTableTemplate.java | 71 + .../manager/tableTemplate/LogTableTemplate.java | 186 + .../manager/tableTemplate/TableTemplate.java | 70 + .../TableTemplateAttributeColumn.java | 70 + .../manager/tableTemplate/TableTemplateColumn.java | 39 + .../tableTemplate/TableTemplateFactory.java | 108 + .../tableTemplate/TableTemplateMetricColumn.java | 98 + .../tableTemplate/TableTemplatePackage.java | 1330 +++++++ .../manager/tableTemplate/TimeTableTemplate.java | 70 + .../impl/AbstractTableTemplateImpl.java | 239 ++ .../impl/HasColumnsTableTemplateImpl.java | 173 + .../impl/IteratorTableTemplateImpl.java | 275 ++ .../tableTemplate/impl/LogTableTemplateImpl.java | 402 ++ .../impl/TableTemplateAttributeColumnImpl.java | 183 + .../impl/TableTemplateColumnImpl.java | 62 + .../impl/TableTemplateFactoryImpl.java | 171 + .../tableTemplate/impl/TableTemplateImpl.java | 275 ++ .../impl/TableTemplateMetricColumnImpl.java | 246 ++ .../impl/TableTemplatePackageImpl.java | 560 +++ .../tableTemplate/impl/TimeTableTemplateImpl.java | 183 + .../util/TableTemplateAdapterFactory.java | 305 ++ .../tableTemplate/util/TableTemplateSwitch.java | 334 ++ .../src/main/xcore/controllerModel.xcore | 33 + .../src/main/xcore/graph.xcore | 53 + .../src/main/xcore/gui.xcore | 182 + .../src/main/xcore/property.xcore | 51 + .../src/main/xcore/server.xcore | 119 + .../src/main/xcore/swagger.xcore | 175 + .../src/main/xcore/table.xcore | 76 + ncomp-sirius-manager-server/.classpath | 32 + ncomp-sirius-manager-server/.gitignore | 1 + ncomp-sirius-manager-server/.project | 34 + .../.settings/org.eclipse.core.resources.prefs | 5 + .../.settings/org.eclipse.jdt.core.prefs | 5 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-sirius-manager-server/LICENSE.txt | 22 + ncomp-sirius-manager-server/META-INF/MANIFEST.MF | 22 + ncomp-sirius-manager-server/build.properties | 3 + ncomp-sirius-manager-server/pom.xml | 170 + .../ncomp/sirius/function/FunctionUtils.java | 243 ++ .../ncomp/sirius/gui/tools/GuiModelUtils.java | 646 ++++ .../ncomp/sirius/gui/tools/GuiObjectUtil.java | 274 ++ .../ncomp/sirius/gui/tools/GuiTableUtil.java | 127 + .../ncomp/sirius/gui/tools/GuiTimeseriesUtil.java | 26 + .../ncomp/sirius/gui/tools/GuiTreeUtil.java | 248 ++ .../ncomp/sirius/manager/AbstractClient.java | 199 + .../ncomp/sirius/manager/BasicAdaptorProvider.java | 40 + .../sirius/manager/BasicGuiClientApiProvider.java | 76 + .../manager/BasicManagementServerProvider.java | 130 + .../ncomp/sirius/manager/DroolsEventReporter.java | 56 + .../ncomp/sirius/manager/GenericHttpClient.java | 31 + .../sirius/manager/HighAvailabilityClient.java | 102 + .../ncomp/sirius/manager/IPolicyEngine.java | 26 + .../ncomp/sirius/manager/IRequestHandler.java | 31 + .../ncomp/sirius/manager/ISiriusPlugin.java | 26 + .../ncomp/sirius/manager/ISiriusServer.java | 27 + .../ncomp/sirius/manager/ISwaggerHandler.java | 26 + .../ncomp/sirius/manager/JavaHttpClient.java | 199 + .../ncomp/sirius/manager/Jetty8Client.java | 32 + .../sirius/manager/Jetty8ClientException.java | 31 + .../ncomp/sirius/manager/Jetty8ClientOld.java | 204 ++ .../ncomp/sirius/manager/Jetty8Server.java | 341 ++ .../ncomp/sirius/manager/ManagementServer.java | 2528 +++++++++++++ .../sirius/manager/ManagementServerError.java | 43 + .../sirius/manager/ManagementServerUtils.java | 71 + .../ncomp/sirius/manager/ManagerException.java | 32 + .../ncomp/sirius/manager/ModuleReporter.java | 144 + .../ncomp/sirius/manager/SimplePolicyEngine.java | 34 + .../openecomp/ncomp/sirius/manager/Subject.java | 57 + .../ncomp/sirius/manager/SwaggerUtils.java | 919 +++++ .../sirius/manager/logs/LogMessageManager.java | 285 ++ .../ncomp/sirius/manager/logs/LogMessageStore.java | 73 + .../sirius/manager/logs/LogMessageSuppressor.java | 109 + .../ncomp/sirius/manager/logs/LogScanner.java | 104 + .../ncomp/sirius/manager/logs/Message.java | 102 + .../sirius/manager/metrics/MetricManager.java | 605 +++ .../ncomp/sirius/manager/metrics/MetricStore.java | 288 ++ .../ncomp/sirius/manager/metrics/MetricTest.java | 116 + .../ncomp/sirius/manager/metrics/MetricUtils.java | 45 + .../sirius/manager/properties/MD5Checksum.java | 101 + .../sirius/manager/properties/PropertyManager.java | 114 + .../src/main/java/swagger-api.json | 19 + .../src/main/resources/swagger-api.json | 17 + pom.xml | 90 + 428 files changed, 90201 insertions(+) create mode 100644 .gitignore create mode 100644 .gitreview create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 deptree.text create mode 100644 ncomp-sirius-manager-agent-model/.classpath create mode 100644 ncomp-sirius-manager-agent-model/.gitignore create mode 100644 ncomp-sirius-manager-agent-model/.project create mode 100644 ncomp-sirius-manager-agent-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-agent-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-agent-model/LICENSE.txt create mode 100644 ncomp-sirius-manager-agent-model/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-agent-model/build.properties create mode 100644 ncomp-sirius-manager-agent-model/plugin.properties create mode 100644 ncomp-sirius-manager-agent-model/plugin.xml create mode 100644 ncomp-sirius-manager-agent-model/pom.xml create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdCpu.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdDisk.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFactory.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFileSystem.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdInterface.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdKvmDisk.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdKvmInstance.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdKvmInterface.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdMemory.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdPackage.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdProcesses.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdServer.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdSwap.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdVmem.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdCpuImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdDiskImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFactoryImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFileSystemImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdInterfaceImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmDiskImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInstanceImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInterfaceImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdMemoryImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdPackageImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdProcessesImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdServerImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdSwapImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdVmemImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdAdapterFactory.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdSwitch.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringFactory.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringPackage.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/SiriusManagerAgentServer.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringFactoryImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringPackageImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/SiriusManagerAgentServerImpl.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringAdapterFactory.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringSwitch.java create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore/collectd.xcore create mode 100644 ncomp-sirius-manager-agent-model/src/main/xcore/server.xcore create mode 100644 ncomp-sirius-manager-agent-server/.classpath create mode 100644 ncomp-sirius-manager-agent-server/.gitignore create mode 100644 ncomp-sirius-manager-agent-server/.project create mode 100644 ncomp-sirius-manager-agent-server/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 ncomp-sirius-manager-agent-server/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-agent-server/LICENSE.txt create mode 100644 ncomp-sirius-manager-agent-server/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-agent-server/build.properties create mode 100644 ncomp-sirius-manager-agent-server/pom.xml create mode 100644 ncomp-sirius-manager-agent-server/src/assembly/assemble_zip.xml create mode 100644 ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/Generator.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/MonitoringUtil.groovy create mode 100644 ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProvider.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProvider.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProvider.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/server-gen/bin/sirius-manager-agent-server-controller create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/bin/agent.sh create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/config/console.properties create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/config/gui.properties create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/config/makefile create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/config/pw.sh.sh create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/config/server.properties create mode 100644 ncomp-sirius-manager-agent-server/src/main/server/scripts/console.groovy create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentMonitoringFactory.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServer.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerClient.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerConsole.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProviderTemplate.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerServer.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApi.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiClient.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiConsole.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProviderTemplate.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentModelFactory.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentServerFactory.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApi.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiClient.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiConsole.java create mode 100644 ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProviderTemplate.java create mode 100644 ncomp-sirius-manager-base/.project create mode 100644 ncomp-sirius-manager-base/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-base/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-base/LICENSE.txt create mode 100644 ncomp-sirius-manager-base/pom.xml create mode 100644 ncomp-sirius-manager-console/.classpath create mode 100644 ncomp-sirius-manager-console/.gitignore create mode 100644 ncomp-sirius-manager-console/.project create mode 100644 ncomp-sirius-manager-console/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-console/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-console/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 ncomp-sirius-manager-console/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-console/LICENSE.txt create mode 100644 ncomp-sirius-manager-console/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-console/build.properties create mode 100644 ncomp-sirius-manager-console/pom.xml create mode 100644 ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Console.groovy create mode 100644 ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Utils.groovy create mode 100644 ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/AlertUtils.groovy create mode 100644 ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/Ecore2Xcore.groovy create mode 100644 ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/TableUtils.groovy create mode 100644 ncomp-sirius-manager-drools/.classpath create mode 100644 ncomp-sirius-manager-drools/.gitignore create mode 100644 ncomp-sirius-manager-drools/.project create mode 100644 ncomp-sirius-manager-drools/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-drools/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-drools/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-drools/LICENSE.txt create mode 100644 ncomp-sirius-manager-drools/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-drools/build.properties create mode 100644 ncomp-sirius-manager-drools/pom.xml create mode 100644 ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsEventListener.java create mode 100644 ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsRuntime.java create mode 100644 ncomp-sirius-manager-generator/.classpath create mode 100644 ncomp-sirius-manager-generator/.gitignore create mode 100644 ncomp-sirius-manager-generator/.project create mode 100644 ncomp-sirius-manager-generator/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.groovy.core.prefs create mode 100644 ncomp-sirius-manager-generator/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-generator/LICENSE.txt create mode 100644 ncomp-sirius-manager-generator/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-generator/build.properties create mode 100644 ncomp-sirius-manager-generator/pom.xml create mode 100644 ncomp-sirius-manager-generator/src/main/groovy/org/openecomp/ncomp/sirius/manager/generator/ControllerGenerator.groovy create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Client.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Console.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Controller.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Factory.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Provider.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/Server.java create mode 100644 ncomp-sirius-manager-generator/src/main/templates/console create mode 100644 ncomp-sirius-manager-generator/src/main/templates/controller create mode 100644 ncomp-sirius-manager-generator/src/main/templates/xcore create mode 100644 ncomp-sirius-manager-model/.classpath create mode 100644 ncomp-sirius-manager-model/.gitignore create mode 100644 ncomp-sirius-manager-model/.project create mode 100644 ncomp-sirius-manager-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-model/LICENSE.txt create mode 100644 ncomp-sirius-manager-model/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-model/build.properties create mode 100644 ncomp-sirius-manager-model/plugin.properties create mode 100644 ncomp-sirius-manager-model/plugin.xml create mode 100644 ncomp-sirius-manager-model/pom.xml create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiClientApi.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagram.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagramItem.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagramRectangle.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiHtml.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiNamedObject.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObject.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectNamedList.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectUnNamedList.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValue.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueInteger.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueObject.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueReference.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueString.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueTimeSeries.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTable.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCell.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDouble.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReference.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReferences.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellString.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableColumn.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableColumnType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableRow.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTimeSerie.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTimeSerieData.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTree.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTreeNode.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiView.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiClientApiImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramItemImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramRectangleImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiHtmlImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiNamedObjectImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectNamedListImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectUnNamedListImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueIntegerImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueObjectImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueReferenceImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueStringImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueTimeSeriesImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDoubleImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferenceImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferencesImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellStringImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableColumnImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableRowImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTimeSerieDataImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTimeSerieImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTreeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTreeNodeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllerModel.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllerModelImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraph.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphEdge.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphItem.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphNode.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphEdgeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphItemImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphNodeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/AbstractProperty.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Module.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleContainer.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleProperty.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Property.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/AbstractPropertyImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleContainerImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModulePropertyImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertyImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServer.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServerConfiguration.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/LoggerInfo.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ManagementInfo.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/Module.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ModuleContainer.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/Response.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ResponseStatus.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApi.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApiWithProxy.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerConfigurationImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/LoggerInfoImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ManagementInfoImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ResponseImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiWithProxyImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerCollectionFormat.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerContact.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerDefinition.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerEnumObjectType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerExternalDocumentation.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerInfo.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerLicense.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerModel.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerNamedObjectType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectClassDefinition.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectTypeDefinition.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectTypeReference.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerOperation.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameter.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameterType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPath.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerReferenceObjectType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerResponse.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSchema.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurity.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinition.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinitionScope.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityList.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityObject.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSimpleObjectType.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerTag.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerXml.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerContactImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerEnumObjectTypeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerExternalDocumentationImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerInfoImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerLicenseImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerModelImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerNamedObjectTypeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectClassDefinitionImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectTypeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerOperationImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerParameterImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPathImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerReferenceObjectTypeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerResponseImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionScopeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityObjectImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSimpleObjectTypeImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerTagImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerXmlImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/AbstractTableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/HasColumnsTableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/IteratorTableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/LogTableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateAttributeColumn.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateColumn.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateMetricColumn.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplatePackage.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TimeTableTemplate.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/AbstractTableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/HasColumnsTableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/IteratorTableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/LogTableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateAttributeColumnImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateColumnImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateFactoryImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateMetricColumnImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplatePackageImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TimeTableTemplateImpl.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateAdapterFactory.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateSwitch.java create mode 100644 ncomp-sirius-manager-model/src/main/xcore/controllerModel.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/graph.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/gui.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/property.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/server.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/swagger.xcore create mode 100644 ncomp-sirius-manager-model/src/main/xcore/table.xcore create mode 100644 ncomp-sirius-manager-server/.classpath create mode 100644 ncomp-sirius-manager-server/.gitignore create mode 100644 ncomp-sirius-manager-server/.project create mode 100644 ncomp-sirius-manager-server/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-sirius-manager-server/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-sirius-manager-server/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-sirius-manager-server/LICENSE.txt create mode 100644 ncomp-sirius-manager-server/META-INF/MANIFEST.MF create mode 100644 ncomp-sirius-manager-server/build.properties create mode 100644 ncomp-sirius-manager-server/pom.xml create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/function/FunctionUtils.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiObjectUtil.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTableUtil.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTimeseriesUtil.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTreeUtil.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/AbstractClient.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicAdaptorProvider.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicGuiClientApiProvider.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicManagementServerProvider.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/DroolsEventReporter.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/GenericHttpClient.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/HighAvailabilityClient.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IPolicyEngine.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IRequestHandler.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusPlugin.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusServer.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISwaggerHandler.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Client.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientException.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientOld.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Server.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerError.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerUtils.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagerException.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ModuleReporter.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SimplePolicyEngine.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Subject.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SwaggerUtils.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageManager.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageStore.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageSuppressor.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogScanner.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/Message.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricManager.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricStore.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricTest.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricUtils.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/MD5Checksum.java create mode 100644 ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/PropertyManager.java create mode 100644 ncomp-sirius-manager-server/src/main/java/swagger-api.json create mode 100644 ncomp-sirius-manager-server/src/main/resources/swagger-api.json create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..321a9f2 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=ncomp/sirius/manager.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a761399 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ + +Maven related artifacts for Sirius Management Framework. + +# Build instructions + +1. Clone the repository +2. Build using Maven: mvn clean install + diff --git a/deptree.text b/deptree.text new file mode 100644 index 0000000..f70981a --- /dev/null +++ b/deptree.text @@ -0,0 +1 @@ +org.openecomp.ncomp.sirius.manager:ncomp-sirius-manager:pom:0.1.0-SNAPSHOT diff --git a/ncomp-sirius-manager-agent-model/.classpath b/ncomp-sirius-manager-agent-model/.classpath new file mode 100644 index 0000000..69b19c6 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/.classpath @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-agent-model/.gitignore b/ncomp-sirius-manager-agent-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/ncomp-sirius-manager-agent-model/.project b/ncomp-sirius-manager-agent-model/.project new file mode 100644 index 0000000..121b478 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/.project @@ -0,0 +1,34 @@ + + + ncomp-sirius-manager-agent-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/ncomp-sirius-manager-agent-model/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-agent-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-sirius-manager-agent-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-sirius-manager-agent-model/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-agent-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-agent-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-agent-model/LICENSE.txt b/ncomp-sirius-manager-agent-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-agent-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-sirius-manager-agent-model/META-INF/MANIFEST.MF b/ncomp-sirius-manager-agent-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d96a23a --- /dev/null +++ b/ncomp-sirius-manager-agent-model/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-sirius-manager-agent-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.openecomp.ncomp.sirius.manager.agent.collectd, + org.openecomp.ncomp.sirius.manager.agent.collectd.impl, + org.openecomp.ncomp.sirius.manager.agent.collectd.util, + org.openecomp.ncomp.sirius.manager.agent.monitoring, + org.openecomp.ncomp.sirius.manager.agent.monitoring.impl, + org.openecomp.ncomp.sirius.manager.agent.monitoring.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;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/ncomp-sirius-manager-agent-model/build.properties b/ncomp-sirius-manager-agent-model/build.properties new file mode 100644 index 0000000..6d35b6f --- /dev/null +++ b/ncomp-sirius-manager-agent-model/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/xcore/ +output.. = target/classes/ diff --git a/ncomp-sirius-manager-agent-model/plugin.properties b/ncomp-sirius-manager-agent-model/plugin.properties new file mode 100644 index 0000000..04852d2 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Router Model +providerName = www.example.org diff --git a/ncomp-sirius-manager-agent-model/plugin.xml b/ncomp-sirius-manager-agent-model/plugin.xml new file mode 100644 index 0000000..d33dba7 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-agent-model/pom.xml b/ncomp-sirius-manager-agent-model/pom.xml new file mode 100644 index 0000000..804a44c --- /dev/null +++ b/ncomp-sirius-manager-agent-model/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdCpu.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdCpu.java new file mode 100644 index 0000000..3488e9a --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdCpu.java @@ -0,0 +1,156 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.AlertContainer; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Cpu'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdCpu() + * @model + * @generated + */ +public interface CollectdCpu extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Idle' attribute. + * + *

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

+ * + * @return the value of the 'Idle' attribute. + * @see #setIdle(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdCpu_Idle() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIdle(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getIdle Idle}' attribute. + * + * + * @param value the new value of the 'Idle' attribute. + * @see #getIdle() + * @generated + */ + void setIdle(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Wait' attribute. + * + *

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

+ * + * @return the value of the 'Wait' attribute. + * @see #setWait(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdCpu_Wait() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getWait(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getWait Wait}' attribute. + * + * + * @param value the new value of the 'Wait' attribute. + * @see #getWait() + * @generated + */ + void setWait(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'User' attribute. + * + *

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

+ * + * @return the value of the 'User' attribute. + * @see #setUser(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdCpu_User() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getUser(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getUser User}' attribute. + * + * + * @param value the new value of the 'User' attribute. + * @see #getUser() + * @generated + */ + void setUser(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'System' attribute. + * + *

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

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

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk() + * @model + * @generated + */ +public interface CollectdDisk extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Disk merged read' attribute. + * + *

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

+ * + * @return the value of the 'Disk merged read' attribute. + * @see #setDisk_merged_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_merged_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_merged_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_read Disk merged read}' attribute. + * + * + * @param value the new value of the 'Disk merged read' attribute. + * @see #getDisk_merged_read() + * @generated + */ + void setDisk_merged_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk merged write' attribute. + * + *

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

+ * + * @return the value of the 'Disk merged write' attribute. + * @see #setDisk_merged_write(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_merged_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_merged_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_write Disk merged write}' attribute. + * + * + * @param value the new value of the 'Disk merged write' attribute. + * @see #getDisk_merged_write() + * @generated + */ + void setDisk_merged_write(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk octets read' attribute. + * + *

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

+ * + * @return the value of the 'Disk octets read' attribute. + * @see #setDisk_octets_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_octets_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * annotation="http://openecomp.org/sirius/doc unit='byte'" + * @generated + */ + IncreasingULongMetricAttribute getDisk_octets_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_read Disk octets read}' attribute. + * + * + * @param value the new value of the 'Disk octets read' attribute. + * @see #getDisk_octets_read() + * @generated + */ + void setDisk_octets_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk octets write' attribute. + * + *

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

+ * + * @return the value of the 'Disk octets write' attribute. + * @see #setDisk_octets_write(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_octets_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_octets_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_write Disk octets write}' attribute. + * + * + * @param value the new value of the 'Disk octets write' attribute. + * @see #getDisk_octets_write() + * @generated + */ + void setDisk_octets_write(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk ops read' attribute. + * + *

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

+ * + * @return the value of the 'Disk ops read' attribute. + * @see #setDisk_ops_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_ops_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_ops_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_read Disk ops read}' attribute. + * + * + * @param value the new value of the 'Disk ops read' attribute. + * @see #getDisk_ops_read() + * @generated + */ + void setDisk_ops_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk ops write' attribute. + * + *

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

+ * + * @return the value of the 'Disk ops write' attribute. + * @see #setDisk_ops_write(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_ops_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_ops_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_write Disk ops write}' attribute. + * + * + * @param value the new value of the 'Disk ops write' attribute. + * @see #getDisk_ops_write() + * @generated + */ + void setDisk_ops_write(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk time read' attribute. + * + *

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

+ * + * @return the value of the 'Disk time read' attribute. + * @see #setDisk_time_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_time_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_time_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_read Disk time read}' attribute. + * + * + * @param value the new value of the 'Disk time read' attribute. + * @see #getDisk_time_read() + * @generated + */ + void setDisk_time_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk time write' attribute. + * + *

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

+ * + * @return the value of the 'Disk time write' attribute. + * @see #setDisk_time_write(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdDisk_Disk_time_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_time_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_write Disk time write}' attribute. + * + * + * @param value the new value of the 'Disk time write' attribute. + * @see #getDisk_time_write() + * @generated + */ + void setDisk_time_write(IncreasingULongMetricAttribute value); + +} // CollectdDisk diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFactory.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFactory.java new file mode 100644 index 0000000..e6a7889 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFactory.java @@ -0,0 +1,162 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage + * @generated + */ +public interface CollectdFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CollectdFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFactoryImpl.init(); + + /** + * Returns a new object of class 'Server'. + * + * + * @return a new object of class 'Server'. + * @generated + */ + CollectdServer createCollectdServer(); + + /** + * Returns a new object of class 'Memory'. + * + * + * @return a new object of class 'Memory'. + * @generated + */ + CollectdMemory createCollectdMemory(); + + /** + * Returns a new object of class 'Swap'. + * + * + * @return a new object of class 'Swap'. + * @generated + */ + CollectdSwap createCollectdSwap(); + + /** + * Returns a new object of class 'Processes'. + * + * + * @return a new object of class 'Processes'. + * @generated + */ + CollectdProcesses createCollectdProcesses(); + + /** + * Returns a new object of class 'Vmem'. + * + * + * @return a new object of class 'Vmem'. + * @generated + */ + CollectdVmem createCollectdVmem(); + + /** + * Returns a new object of class 'Cpu'. + * + * + * @return a new object of class 'Cpu'. + * @generated + */ + CollectdCpu createCollectdCpu(); + + /** + * Returns a new object of class 'Disk'. + * + * + * @return a new object of class 'Disk'. + * @generated + */ + CollectdDisk createCollectdDisk(); + + /** + * Returns a new object of class 'File System'. + * + * + * @return a new object of class 'File System'. + * @generated + */ + CollectdFileSystem createCollectdFileSystem(); + + /** + * Returns a new object of class 'Interface'. + * + * + * @return a new object of class 'Interface'. + * @generated + */ + CollectdInterface createCollectdInterface(); + + /** + * Returns a new object of class 'Kvm Instance'. + * + * + * @return a new object of class 'Kvm Instance'. + * @generated + */ + CollectdKvmInstance createCollectdKvmInstance(); + + /** + * Returns a new object of class 'Kvm Disk'. + * + * + * @return a new object of class 'Kvm Disk'. + * @generated + */ + CollectdKvmDisk createCollectdKvmDisk(); + + /** + * Returns a new object of class 'Kvm Interface'. + * + * + * @return a new object of class 'Kvm Interface'. + * @generated + */ + CollectdKvmInterface createCollectdKvmInterface(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CollectdPackage getCollectdPackage(); + +} //CollectdFactory diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFileSystem.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFileSystem.java new file mode 100644 index 0000000..2fbf354 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdFileSystem.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.AlertContainer; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +/** + * + * A representation of the model object 'File System'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdFileSystem() + * @model + * @generated + */ +public interface CollectdFileSystem extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Used' attribute. + * + *

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

+ * + * @return the value of the 'Used' attribute. + * @see #setUsed(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdFileSystem_Used() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getUsed(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getUsed Used}' attribute. + * + * + * @param value the new value of the 'Used' attribute. + * @see #getUsed() + * @generated + */ + void setUsed(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Free' attribute. + * + *

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

+ * + * @return the value of the 'Free' attribute. + * @see #setFree(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdFileSystem_Free() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getFree(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getFree Free}' attribute. + * + * + * @param value the new value of the 'Free' attribute. + * @see #getFree() + * @generated + */ + void setFree(DoubleMetricAttribute value); + +} // CollectdFileSystem diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdInterface.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdInterface.java new file mode 100644 index 0000000..9112db2 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdInterface.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.sirius.manager.agent.collectd; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.AlertContainer; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Interface'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface() + * @model + * @generated + */ +public interface CollectdInterface extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'If errors rx' attribute. + * + *

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

+ * + * @return the value of the 'If errors rx' attribute. + * @see #setIf_errors_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface_If_errors_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_errors_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_rx If errors rx}' attribute. + * + * + * @param value the new value of the 'If errors rx' attribute. + * @see #getIf_errors_rx() + * @generated + */ + void setIf_errors_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If errors tx' attribute. + * + *

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

+ * + * @return the value of the 'If errors tx' attribute. + * @see #setIf_errors_tx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface_If_errors_tx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_errors_tx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_tx If errors tx}' attribute. + * + * + * @param value the new value of the 'If errors tx' attribute. + * @see #getIf_errors_tx() + * @generated + */ + void setIf_errors_tx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If octets rx' attribute. + * + *

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

+ * + * @return the value of the 'If octets rx' attribute. + * @see #setIf_octets_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface_If_octets_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_octets_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_rx If octets rx}' attribute. + * + * + * @param value the new value of the 'If octets rx' attribute. + * @see #getIf_octets_rx() + * @generated + */ + void setIf_octets_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If octets tx' attribute. + * + *

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

+ * + * @return the value of the 'If octets tx' attribute. + * @see #setIf_octets_tx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface_If_octets_tx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_octets_tx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_tx If octets tx}' attribute. + * + * + * @param value the new value of the 'If octets tx' attribute. + * @see #getIf_octets_tx() + * @generated + */ + void setIf_octets_tx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If packets rx' attribute. + * + *

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

+ * + * @return the value of the 'If packets rx' attribute. + * @see #setIf_packets_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdInterface_If_packets_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_packets_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_packets_rx If packets rx}' attribute. + * + * + * @param value the new value of the 'If packets rx' attribute. + * @see #getIf_packets_rx() + * @generated + */ + void setIf_packets_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If packets tx' attribute. + * + *

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

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

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmDisk() + * @model + * @generated + */ +public interface CollectdKvmDisk extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Disk octets read' attribute. + * + *

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

+ * + * @return the value of the 'Disk octets read' attribute. + * @see #setDisk_octets_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmDisk_Disk_octets_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_octets_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_read Disk octets read}' attribute. + * + * + * @param value the new value of the 'Disk octets read' attribute. + * @see #getDisk_octets_read() + * @generated + */ + void setDisk_octets_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk octets write' attribute. + * + *

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

+ * + * @return the value of the 'Disk octets write' attribute. + * @see #setDisk_octets_write(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmDisk_Disk_octets_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_octets_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_write Disk octets write}' attribute. + * + * + * @param value the new value of the 'Disk octets write' attribute. + * @see #getDisk_octets_write() + * @generated + */ + void setDisk_octets_write(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk ops read' attribute. + * + *

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

+ * + * @return the value of the 'Disk ops read' attribute. + * @see #setDisk_ops_read(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmDisk_Disk_ops_read() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getDisk_ops_read(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_ops_read Disk ops read}' attribute. + * + * + * @param value the new value of the 'Disk ops read' attribute. + * @see #getDisk_ops_read() + * @generated + */ + void setDisk_ops_read(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disk ops write' attribute. + * + *

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

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

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInstance() + * @model + * @generated + */ +public interface CollectdKvmInstance extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Virt cpu total' attribute. + * + *

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

+ * + * @return the value of the 'Virt cpu total' attribute. + * @see #setVirt_cpu_total(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInstance_Virt_cpu_total() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getVirt_cpu_total(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getVirt_cpu_total Virt cpu total}' attribute. + * + * + * @param value the new value of the 'Virt cpu total' attribute. + * @see #getVirt_cpu_total() + * @generated + */ + void setVirt_cpu_total(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Disks' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk}. + * + *

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

+ * + * @return the value of the 'Disks' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInstance_Disks() + * @model containment="true" + * @generated + */ + EList getDisks(); + + /** + * Returns the value of the 'Interfaces' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_rx If errors rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_tx If errors tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_rx If dropped rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_tx If dropped tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_rx If octets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_tx If octets tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_rx If packets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_tx If packets tx}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface() + * @model + * @generated + */ +public interface CollectdKvmInterface extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'If errors rx' attribute. + * + *

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

+ * + * @return the value of the 'If errors rx' attribute. + * @see #setIf_errors_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_errors_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_errors_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_rx If errors rx}' attribute. + * + * + * @param value the new value of the 'If errors rx' attribute. + * @see #getIf_errors_rx() + * @generated + */ + void setIf_errors_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If errors tx' attribute. + * + *

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

+ * + * @return the value of the 'If errors tx' attribute. + * @see #setIf_errors_tx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_errors_tx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_errors_tx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_tx If errors tx}' attribute. + * + * + * @param value the new value of the 'If errors tx' attribute. + * @see #getIf_errors_tx() + * @generated + */ + void setIf_errors_tx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If dropped rx' attribute. + * + *

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

+ * + * @return the value of the 'If dropped rx' attribute. + * @see #setIf_dropped_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_dropped_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_dropped_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_rx If dropped rx}' attribute. + * + * + * @param value the new value of the 'If dropped rx' attribute. + * @see #getIf_dropped_rx() + * @generated + */ + void setIf_dropped_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If dropped tx' attribute. + * + *

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

+ * + * @return the value of the 'If dropped tx' attribute. + * @see #setIf_dropped_tx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_dropped_tx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_dropped_tx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_tx If dropped tx}' attribute. + * + * + * @param value the new value of the 'If dropped tx' attribute. + * @see #getIf_dropped_tx() + * @generated + */ + void setIf_dropped_tx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If octets rx' attribute. + * + *

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

+ * + * @return the value of the 'If octets rx' attribute. + * @see #setIf_octets_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_octets_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_octets_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_rx If octets rx}' attribute. + * + * + * @param value the new value of the 'If octets rx' attribute. + * @see #getIf_octets_rx() + * @generated + */ + void setIf_octets_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If octets tx' attribute. + * + *

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

+ * + * @return the value of the 'If octets tx' attribute. + * @see #setIf_octets_tx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_octets_tx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_octets_tx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_tx If octets tx}' attribute. + * + * + * @param value the new value of the 'If octets tx' attribute. + * @see #getIf_octets_tx() + * @generated + */ + void setIf_octets_tx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If packets rx' attribute. + * + *

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

+ * + * @return the value of the 'If packets rx' attribute. + * @see #setIf_packets_rx(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdKvmInterface_If_packets_rx() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getIf_packets_rx(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_rx If packets rx}' attribute. + * + * + * @param value the new value of the 'If packets rx' attribute. + * @see #getIf_packets_rx() + * @generated + */ + void setIf_packets_rx(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'If packets tx' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getBuffered Buffered}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getCached Cached}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getFree Free}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getUsed Used}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdMemory() + * @model + * @generated + */ +public interface CollectdMemory extends EObject { + /** + * Returns the value of the 'Buffered' attribute. + * + *

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

+ * + * @return the value of the 'Buffered' attribute. + * @see #setBuffered(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdMemory_Buffered() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getBuffered(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getBuffered Buffered}' attribute. + * + * + * @param value the new value of the 'Buffered' attribute. + * @see #getBuffered() + * @generated + */ + void setBuffered(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Cached' attribute. + * + *

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

+ * + * @return the value of the 'Cached' attribute. + * @see #setCached(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdMemory_Cached() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getCached(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getCached Cached}' attribute. + * + * + * @param value the new value of the 'Cached' attribute. + * @see #getCached() + * @generated + */ + void setCached(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Free' attribute. + * + *

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

+ * + * @return the value of the 'Free' attribute. + * @see #setFree(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdMemory_Free() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getFree(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getFree Free}' attribute. + * + * + * @param value the new value of the 'Free' attribute. + * @see #getFree() + * @generated + */ + void setFree(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Used' attribute. + * + *

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

+ * + * @return the value of the 'Used' attribute. + * @see #setUsed(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdMemory_Used() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getUsed(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getUsed Used}' attribute. + * + * + * @param value the new value of the 'Used' attribute. + * @see #getUsed() + * @generated + */ + void setUsed(DoubleMetricAttribute value); + +} // CollectdMemory diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdPackage.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdPackage.java new file mode 100644 index 0000000..4518a91 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdPackage.java @@ -0,0 +1,3862 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-agent-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager.agent'" + * annotation="http://www.eclipse.org/emf/2011/Xcore doc='http://openecomp.org/sirius/doc'" + * @generated + */ +public interface CollectdPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "collectd"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.agent.collectd"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "collectd"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CollectdPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdServer() + * @generated + */ + int COLLECTD_SERVER = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Load shortterm' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__LOAD_SHORTTERM = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Load midterm' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__LOAD_MIDTERM = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Load longterm' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__LOAD_LONGTERM = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Entropy' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__ENTROPY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Contextswitches' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__CONTEXTSWITCHES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Cpus' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__CPUS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Memory' containment reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__MEMORY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Swap' containment reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__SWAP = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The feature id for the 'Processes' containment reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__PROCESSES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The feature id for the 'Vmem' containment reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__VMEM = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 11; + + /** + * The feature id for the 'Filesystems' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__FILESYSTEMS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 12; + + /** + * The feature id for the 'Disks' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__DISKS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 13; + + /** + * The feature id for the 'Interfaces' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__INTERFACES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 14; + + /** + * The feature id for the 'Instances' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER__INSTANCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 15; + + /** + * The number of structural features of the 'Server' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 16; + + /** + * The number of operations of the 'Server' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_SERVER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl Memory}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdMemory() + * @generated + */ + int COLLECTD_MEMORY = 1; + + /** + * The feature id for the 'Buffered' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY__BUFFERED = 0; + + /** + * The feature id for the 'Cached' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY__CACHED = 1; + + /** + * The feature id for the 'Free' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY__FREE = 2; + + /** + * The feature id for the 'Used' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY__USED = 3; + + /** + * The number of structural features of the 'Memory' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Memory' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_MEMORY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl Swap}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdSwap() + * @generated + */ + int COLLECTD_SWAP = 2; + + /** + * The feature id for the 'Cached' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SWAP__CACHED = 0; + + /** + * The feature id for the 'Free' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SWAP__FREE = 1; + + /** + * The feature id for the 'Used' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_SWAP__USED = 2; + + /** + * The number of structural features of the 'Swap' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_SWAP_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Swap' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_SWAP_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl Processes}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdProcesses() + * @generated + */ + int COLLECTD_PROCESSES = 3; + + /** + * The feature id for the 'Fork rate' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__FORK_RATE = 0; + + /** + * The feature id for the 'Blocked' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__BLOCKED = 1; + + /** + * The feature id for the 'Paging' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__PAGING = 2; + + /** + * The feature id for the 'Running' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__RUNNING = 3; + + /** + * The feature id for the 'Sleeping' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__SLEEPING = 4; + + /** + * The feature id for the 'Stopped' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__STOPPED = 5; + + /** + * The feature id for the 'Zombies' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES__ZOMBIES = 6; + + /** + * The number of structural features of the 'Processes' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES_FEATURE_COUNT = 7; + + /** + * The number of operations of the 'Processes' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_PROCESSES_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl Vmem}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdVmem() + * @generated + */ + int COLLECTD_VMEM = 4; + + /** + * The feature id for the 'Active anon' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ACTIVE_ANON = 0; + + /** + * The feature id for the 'Active file' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ACTIVE_FILE = 1; + + /** + * The feature id for the 'Anon pages' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ANON_PAGES = 2; + + /** + * The feature id for the 'Anon transparent hugepages' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES = 3; + + /** + * The feature id for the 'Bounce' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__BOUNCE = 4; + + /** + * The feature id for the 'Dirtied' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__DIRTIED = 5; + + /** + * The feature id for the 'Dirty' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__DIRTY = 6; + + /** + * The feature id for the 'Dirty background threshold' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD = 7; + + /** + * The feature id for the 'Dirty threshold' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__DIRTY_THRESHOLD = 8; + + /** + * The feature id for the 'File pages' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__FILE_PAGES = 9; + + /** + * The feature id for the 'Free pages' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__FREE_PAGES = 10; + + /** + * The feature id for the 'Inactive anon' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__INACTIVE_ANON = 11; + + /** + * The feature id for the 'Inactive file' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__INACTIVE_FILE = 12; + + /** + * The feature id for the 'Isolated anon' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ISOLATED_ANON = 13; + + /** + * The feature id for the 'Isolated file' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__ISOLATED_FILE = 14; + + /** + * The feature id for the 'Kernel stack' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__KERNEL_STACK = 15; + + /** + * The feature id for the 'Mapped' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__MAPPED = 16; + + /** + * The feature id for the 'Mlock' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__MLOCK = 17; + + /** + * The feature id for the 'Page table pages' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__PAGE_TABLE_PAGES = 18; + + /** + * The feature id for the 'Shmem' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__SHMEM = 19; + + /** + * The feature id for the 'Slab reclaimable' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__SLAB_RECLAIMABLE = 20; + + /** + * The feature id for the 'Slab unreclaimable' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__SLAB_UNRECLAIMABLE = 21; + + /** + * The feature id for the 'Unevictable' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__UNEVICTABLE = 22; + + /** + * The feature id for the 'Unstable' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__UNSTABLE = 23; + + /** + * The feature id for the 'Vmscan immediate reclaim' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM = 24; + + /** + * The feature id for the 'Vmscan write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__VMSCAN_WRITE = 25; + + /** + * The feature id for the 'Writeback' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__WRITEBACK = 26; + + /** + * The feature id for the 'Writeback temp' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__WRITEBACK_TEMP = 27; + + /** + * The feature id for the 'Written' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__WRITTEN = 28; + + /** + * The feature id for the 'Memory in' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__MEMORY_IN = 29; + + /** + * The feature id for the 'Memory out' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__MEMORY_OUT = 30; + + /** + * The feature id for the 'Swap in' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__SWAP_IN = 31; + + /** + * The feature id for the 'Swap out' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__SWAP_OUT = 32; + + /** + * The feature id for the 'Faults minor' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__FAULTS_MINOR = 33; + + /** + * The feature id for the 'Faults major' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM__FAULTS_MAJOR = 34; + + /** + * The number of structural features of the 'Vmem' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM_FEATURE_COUNT = 35; + + /** + * The number of operations of the 'Vmem' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_VMEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl Cpu}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdCpu() + * @generated + */ + int COLLECTD_CPU = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Idle' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__IDLE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Wait' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__WAIT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'User' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__USER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'System' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU__SYSTEM = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Cpu' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Cpu' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_CPU_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl Disk}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdDisk() + * @generated + */ + int COLLECTD_DISK = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Disk merged read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_MERGED_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Disk merged write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_MERGED_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Disk octets read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_OCTETS_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Disk octets write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_OCTETS_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Disk ops read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_OPS_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Disk ops write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_OPS_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Disk time read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_TIME_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Disk time write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK__DISK_TIME_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Disk' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The number of operations of the 'Disk' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_DISK_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl File System}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdFileSystem() + * @generated + */ + int COLLECTD_FILE_SYSTEM = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Used' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__USED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Free' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM__FREE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'File System' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'File System' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_FILE_SYSTEM_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl Interface}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdInterface() + * @generated + */ + int COLLECTD_INTERFACE = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'If errors rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_ERRORS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'If errors tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_ERRORS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'If octets rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_OCTETS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'If octets tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_OCTETS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'If packets rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_PACKETS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'If packets tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE__IF_PACKETS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The number of structural features of the 'Interface' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The number of operations of the 'Interface' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_INTERFACE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl Kvm Instance}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmInstance() + * @generated + */ + int COLLECTD_KVM_INSTANCE = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Virt cpu total' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Disks' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__DISKS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Interfaces' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE__INTERFACES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Kvm Instance' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Kvm Instance' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INSTANCE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl Kvm Disk}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmDisk() + * @generated + */ + int COLLECTD_KVM_DISK = 10; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Disk octets read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__DISK_OCTETS_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Disk octets write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__DISK_OCTETS_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Disk ops read' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__DISK_OPS_READ = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Disk ops write' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK__DISK_OPS_WRITE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Kvm Disk' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Kvm Disk' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_DISK_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl Kvm Interface}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmInterface() + * @generated + */ + int COLLECTD_KVM_INTERFACE = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'If errors rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_ERRORS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'If errors tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_ERRORS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'If dropped rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_DROPPED_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'If dropped tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_DROPPED_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'If octets rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_OCTETS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'If octets tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_OCTETS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'If packets rx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_PACKETS_RX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'If packets tx' attribute. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE__IF_PACKETS_TX = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Kvm Interface' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The number of operations of the 'Kvm Interface' class. + * + * + * @generated + * @ordered + */ + int COLLECTD_KVM_INTERFACE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer Server}'. + * + * + * @return the meta object for class 'Server'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer + * @generated + */ + EClass getCollectdServer(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_shortterm Load shortterm}'. + * + * + * @return the meta object for the attribute 'Load shortterm'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_shortterm() + * @see #getCollectdServer() + * @generated + */ + EAttribute getCollectdServer_Load_shortterm(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_midterm Load midterm}'. + * + * + * @return the meta object for the attribute 'Load midterm'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_midterm() + * @see #getCollectdServer() + * @generated + */ + EAttribute getCollectdServer_Load_midterm(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_longterm Load longterm}'. + * + * + * @return the meta object for the attribute 'Load longterm'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_longterm() + * @see #getCollectdServer() + * @generated + */ + EAttribute getCollectdServer_Load_longterm(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getEntropy Entropy}'. + * + * + * @return the meta object for the attribute 'Entropy'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getEntropy() + * @see #getCollectdServer() + * @generated + */ + EAttribute getCollectdServer_Entropy(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getContextswitches Contextswitches}'. + * + * + * @return the meta object for the attribute 'Contextswitches'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getContextswitches() + * @see #getCollectdServer() + * @generated + */ + EAttribute getCollectdServer_Contextswitches(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getCpus Cpus}'. + * + * + * @return the meta object for the containment reference list 'Cpus'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getCpus() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Cpus(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getMemory Memory}'. + * + * + * @return the meta object for the containment reference 'Memory'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getMemory() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Memory(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getSwap Swap}'. + * + * + * @return the meta object for the containment reference 'Swap'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getSwap() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Swap(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getProcesses Processes}'. + * + * + * @return the meta object for the containment reference 'Processes'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getProcesses() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Processes(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getVmem Vmem}'. + * + * + * @return the meta object for the containment reference 'Vmem'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getVmem() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Vmem(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getFilesystems Filesystems}'. + * + * + * @return the meta object for the containment reference list 'Filesystems'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getFilesystems() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Filesystems(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getDisks Disks}'. + * + * + * @return the meta object for the containment reference list 'Disks'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getDisks() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Disks(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInterfaces Interfaces}'. + * + * + * @return the meta object for the containment reference list 'Interfaces'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInterfaces() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Interfaces(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInstances Instances}'. + * + * + * @return the meta object for the containment reference list 'Instances'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInstances() + * @see #getCollectdServer() + * @generated + */ + EReference getCollectdServer_Instances(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory Memory}'. + * + * + * @return the meta object for class 'Memory'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory + * @generated + */ + EClass getCollectdMemory(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getBuffered Buffered}'. + * + * + * @return the meta object for the attribute 'Buffered'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getBuffered() + * @see #getCollectdMemory() + * @generated + */ + EAttribute getCollectdMemory_Buffered(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getCached Cached}'. + * + * + * @return the meta object for the attribute 'Cached'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getCached() + * @see #getCollectdMemory() + * @generated + */ + EAttribute getCollectdMemory_Cached(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getFree Free}'. + * + * + * @return the meta object for the attribute 'Free'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getFree() + * @see #getCollectdMemory() + * @generated + */ + EAttribute getCollectdMemory_Free(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getUsed Used}'. + * + * + * @return the meta object for the attribute 'Used'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory#getUsed() + * @see #getCollectdMemory() + * @generated + */ + EAttribute getCollectdMemory_Used(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap Swap}'. + * + * + * @return the meta object for class 'Swap'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap + * @generated + */ + EClass getCollectdSwap(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getCached Cached}'. + * + * + * @return the meta object for the attribute 'Cached'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getCached() + * @see #getCollectdSwap() + * @generated + */ + EAttribute getCollectdSwap_Cached(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getFree Free}'. + * + * + * @return the meta object for the attribute 'Free'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getFree() + * @see #getCollectdSwap() + * @generated + */ + EAttribute getCollectdSwap_Free(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getUsed Used}'. + * + * + * @return the meta object for the attribute 'Used'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getUsed() + * @see #getCollectdSwap() + * @generated + */ + EAttribute getCollectdSwap_Used(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses Processes}'. + * + * + * @return the meta object for class 'Processes'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses + * @generated + */ + EClass getCollectdProcesses(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getFork_rate Fork rate}'. + * + * + * @return the meta object for the attribute 'Fork rate'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getFork_rate() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Fork_rate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getBlocked Blocked}'. + * + * + * @return the meta object for the attribute 'Blocked'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getBlocked() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Blocked(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getPaging Paging}'. + * + * + * @return the meta object for the attribute 'Paging'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getPaging() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Paging(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getRunning Running}'. + * + * + * @return the meta object for the attribute 'Running'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getRunning() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Running(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getSleeping Sleeping}'. + * + * + * @return the meta object for the attribute 'Sleeping'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getSleeping() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Sleeping(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getStopped Stopped}'. + * + * + * @return the meta object for the attribute 'Stopped'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getStopped() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Stopped(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getZombies Zombies}'. + * + * + * @return the meta object for the attribute 'Zombies'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getZombies() + * @see #getCollectdProcesses() + * @generated + */ + EAttribute getCollectdProcesses_Zombies(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem Vmem}'. + * + * + * @return the meta object for class 'Vmem'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem + * @generated + */ + EClass getCollectdVmem(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_anon Active anon}'. + * + * + * @return the meta object for the attribute 'Active anon'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_anon() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Active_anon(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_file Active file}'. + * + * + * @return the meta object for the attribute 'Active file'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_file() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Active_file(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_pages Anon pages}'. + * + * + * @return the meta object for the attribute 'Anon pages'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_pages() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Anon_pages(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_transparent_hugepages Anon transparent hugepages}'. + * + * + * @return the meta object for the attribute 'Anon transparent hugepages'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_transparent_hugepages() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Anon_transparent_hugepages(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getBounce Bounce}'. + * + * + * @return the meta object for the attribute 'Bounce'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getBounce() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Bounce(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirtied Dirtied}'. + * + * + * @return the meta object for the attribute 'Dirtied'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirtied() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Dirtied(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty Dirty}'. + * + * + * @return the meta object for the attribute 'Dirty'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Dirty(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_background_threshold Dirty background threshold}'. + * + * + * @return the meta object for the attribute 'Dirty background threshold'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_background_threshold() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Dirty_background_threshold(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_threshold Dirty threshold}'. + * + * + * @return the meta object for the attribute 'Dirty threshold'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_threshold() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Dirty_threshold(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFile_pages File pages}'. + * + * + * @return the meta object for the attribute 'File pages'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFile_pages() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_File_pages(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFree_pages Free pages}'. + * + * + * @return the meta object for the attribute 'Free pages'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFree_pages() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Free_pages(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_anon Inactive anon}'. + * + * + * @return the meta object for the attribute 'Inactive anon'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_anon() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Inactive_anon(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_file Inactive file}'. + * + * + * @return the meta object for the attribute 'Inactive file'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_file() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Inactive_file(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_anon Isolated anon}'. + * + * + * @return the meta object for the attribute 'Isolated anon'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_anon() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Isolated_anon(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_file Isolated file}'. + * + * + * @return the meta object for the attribute 'Isolated file'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_file() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Isolated_file(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getKernel_stack Kernel stack}'. + * + * + * @return the meta object for the attribute 'Kernel stack'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getKernel_stack() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Kernel_stack(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMapped Mapped}'. + * + * + * @return the meta object for the attribute 'Mapped'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMapped() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Mapped(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMlock Mlock}'. + * + * + * @return the meta object for the attribute 'Mlock'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMlock() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Mlock(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getPage_table_pages Page table pages}'. + * + * + * @return the meta object for the attribute 'Page table pages'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getPage_table_pages() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Page_table_pages(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getShmem Shmem}'. + * + * + * @return the meta object for the attribute 'Shmem'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getShmem() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Shmem(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_reclaimable Slab reclaimable}'. + * + * + * @return the meta object for the attribute 'Slab reclaimable'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_reclaimable() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Slab_reclaimable(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_unreclaimable Slab unreclaimable}'. + * + * + * @return the meta object for the attribute 'Slab unreclaimable'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_unreclaimable() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Slab_unreclaimable(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnevictable Unevictable}'. + * + * + * @return the meta object for the attribute 'Unevictable'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnevictable() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Unevictable(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnstable Unstable}'. + * + * + * @return the meta object for the attribute 'Unstable'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnstable() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Unstable(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_immediate_reclaim Vmscan immediate reclaim}'. + * + * + * @return the meta object for the attribute 'Vmscan immediate reclaim'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_immediate_reclaim() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Vmscan_immediate_reclaim(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_write Vmscan write}'. + * + * + * @return the meta object for the attribute 'Vmscan write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_write() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Vmscan_write(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback Writeback}'. + * + * + * @return the meta object for the attribute 'Writeback'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Writeback(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback_temp Writeback temp}'. + * + * + * @return the meta object for the attribute 'Writeback temp'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback_temp() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Writeback_temp(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWritten Written}'. + * + * + * @return the meta object for the attribute 'Written'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWritten() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Written(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_in Memory in}'. + * + * + * @return the meta object for the attribute 'Memory in'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_in() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Memory_in(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_out Memory out}'. + * + * + * @return the meta object for the attribute 'Memory out'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_out() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Memory_out(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_in Swap in}'. + * + * + * @return the meta object for the attribute 'Swap in'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_in() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Swap_in(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_out Swap out}'. + * + * + * @return the meta object for the attribute 'Swap out'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_out() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Swap_out(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_minor Faults minor}'. + * + * + * @return the meta object for the attribute 'Faults minor'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_minor() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Faults_minor(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_major Faults major}'. + * + * + * @return the meta object for the attribute 'Faults major'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_major() + * @see #getCollectdVmem() + * @generated + */ + EAttribute getCollectdVmem_Faults_major(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu Cpu}'. + * + * + * @return the meta object for class 'Cpu'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu + * @generated + */ + EClass getCollectdCpu(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getIdle Idle}'. + * + * + * @return the meta object for the attribute 'Idle'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getIdle() + * @see #getCollectdCpu() + * @generated + */ + EAttribute getCollectdCpu_Idle(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getWait Wait}'. + * + * + * @return the meta object for the attribute 'Wait'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getWait() + * @see #getCollectdCpu() + * @generated + */ + EAttribute getCollectdCpu_Wait(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getUser User}'. + * + * + * @return the meta object for the attribute 'User'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getUser() + * @see #getCollectdCpu() + * @generated + */ + EAttribute getCollectdCpu_User(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getSystem System}'. + * + * + * @return the meta object for the attribute 'System'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu#getSystem() + * @see #getCollectdCpu() + * @generated + */ + EAttribute getCollectdCpu_System(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk Disk}'. + * + * + * @return the meta object for class 'Disk'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk + * @generated + */ + EClass getCollectdDisk(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_read Disk merged read}'. + * + * + * @return the meta object for the attribute 'Disk merged read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_read() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_merged_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_write Disk merged write}'. + * + * + * @return the meta object for the attribute 'Disk merged write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_merged_write() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_merged_write(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_read Disk octets read}'. + * + * + * @return the meta object for the attribute 'Disk octets read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_read() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_octets_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_write Disk octets write}'. + * + * + * @return the meta object for the attribute 'Disk octets write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_octets_write() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_octets_write(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_read Disk ops read}'. + * + * + * @return the meta object for the attribute 'Disk ops read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_read() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_ops_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_write Disk ops write}'. + * + * + * @return the meta object for the attribute 'Disk ops write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_ops_write() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_ops_write(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_read Disk time read}'. + * + * + * @return the meta object for the attribute 'Disk time read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_read() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_time_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_write Disk time write}'. + * + * + * @return the meta object for the attribute 'Disk time write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk#getDisk_time_write() + * @see #getCollectdDisk() + * @generated + */ + EAttribute getCollectdDisk_Disk_time_write(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem File System}'. + * + * + * @return the meta object for class 'File System'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem + * @generated + */ + EClass getCollectdFileSystem(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getUsed Used}'. + * + * + * @return the meta object for the attribute 'Used'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getUsed() + * @see #getCollectdFileSystem() + * @generated + */ + EAttribute getCollectdFileSystem_Used(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getFree Free}'. + * + * + * @return the meta object for the attribute 'Free'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem#getFree() + * @see #getCollectdFileSystem() + * @generated + */ + EAttribute getCollectdFileSystem_Free(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface Interface}'. + * + * + * @return the meta object for class 'Interface'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface + * @generated + */ + EClass getCollectdInterface(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_rx If errors rx}'. + * + * + * @return the meta object for the attribute 'If errors rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_rx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_errors_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_tx If errors tx}'. + * + * + * @return the meta object for the attribute 'If errors tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_errors_tx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_errors_tx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_rx If octets rx}'. + * + * + * @return the meta object for the attribute 'If octets rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_rx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_octets_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_tx If octets tx}'. + * + * + * @return the meta object for the attribute 'If octets tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_octets_tx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_octets_tx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_packets_rx If packets rx}'. + * + * + * @return the meta object for the attribute 'If packets rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_packets_rx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_packets_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_packets_tx If packets tx}'. + * + * + * @return the meta object for the attribute 'If packets tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface#getIf_packets_tx() + * @see #getCollectdInterface() + * @generated + */ + EAttribute getCollectdInterface_If_packets_tx(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance Kvm Instance}'. + * + * + * @return the meta object for class 'Kvm Instance'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance + * @generated + */ + EClass getCollectdKvmInstance(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getVirt_cpu_total Virt cpu total}'. + * + * + * @return the meta object for the attribute 'Virt cpu total'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getVirt_cpu_total() + * @see #getCollectdKvmInstance() + * @generated + */ + EAttribute getCollectdKvmInstance_Virt_cpu_total(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getDisks Disks}'. + * + * + * @return the meta object for the containment reference list 'Disks'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getDisks() + * @see #getCollectdKvmInstance() + * @generated + */ + EReference getCollectdKvmInstance_Disks(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getInterfaces Interfaces}'. + * + * + * @return the meta object for the containment reference list 'Interfaces'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance#getInterfaces() + * @see #getCollectdKvmInstance() + * @generated + */ + EReference getCollectdKvmInstance_Interfaces(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk Kvm Disk}'. + * + * + * @return the meta object for class 'Kvm Disk'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk + * @generated + */ + EClass getCollectdKvmDisk(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_read Disk octets read}'. + * + * + * @return the meta object for the attribute 'Disk octets read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_read() + * @see #getCollectdKvmDisk() + * @generated + */ + EAttribute getCollectdKvmDisk_Disk_octets_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_write Disk octets write}'. + * + * + * @return the meta object for the attribute 'Disk octets write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_octets_write() + * @see #getCollectdKvmDisk() + * @generated + */ + EAttribute getCollectdKvmDisk_Disk_octets_write(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_ops_read Disk ops read}'. + * + * + * @return the meta object for the attribute 'Disk ops read'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_ops_read() + * @see #getCollectdKvmDisk() + * @generated + */ + EAttribute getCollectdKvmDisk_Disk_ops_read(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_ops_write Disk ops write}'. + * + * + * @return the meta object for the attribute 'Disk ops write'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk#getDisk_ops_write() + * @see #getCollectdKvmDisk() + * @generated + */ + EAttribute getCollectdKvmDisk_Disk_ops_write(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface Kvm Interface}'. + * + * + * @return the meta object for class 'Kvm Interface'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface + * @generated + */ + EClass getCollectdKvmInterface(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_rx If errors rx}'. + * + * + * @return the meta object for the attribute 'If errors rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_rx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_errors_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_tx If errors tx}'. + * + * + * @return the meta object for the attribute 'If errors tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_errors_tx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_errors_tx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_rx If dropped rx}'. + * + * + * @return the meta object for the attribute 'If dropped rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_rx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_dropped_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_tx If dropped tx}'. + * + * + * @return the meta object for the attribute 'If dropped tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_dropped_tx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_dropped_tx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_rx If octets rx}'. + * + * + * @return the meta object for the attribute 'If octets rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_rx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_octets_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_tx If octets tx}'. + * + * + * @return the meta object for the attribute 'If octets tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_octets_tx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_octets_tx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_rx If packets rx}'. + * + * + * @return the meta object for the attribute 'If packets rx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_rx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_packets_rx(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_tx If packets tx}'. + * + * + * @return the meta object for the attribute 'If packets tx'. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface#getIf_packets_tx() + * @see #getCollectdKvmInterface() + * @generated + */ + EAttribute getCollectdKvmInterface_If_packets_tx(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CollectdFactory getCollectdFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdServer() + * @generated + */ + EClass COLLECTD_SERVER = eINSTANCE.getCollectdServer(); + + /** + * The meta object literal for the 'Load shortterm' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SERVER__LOAD_SHORTTERM = eINSTANCE.getCollectdServer_Load_shortterm(); + + /** + * The meta object literal for the 'Load midterm' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SERVER__LOAD_MIDTERM = eINSTANCE.getCollectdServer_Load_midterm(); + + /** + * The meta object literal for the 'Load longterm' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SERVER__LOAD_LONGTERM = eINSTANCE.getCollectdServer_Load_longterm(); + + /** + * The meta object literal for the 'Entropy' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SERVER__ENTROPY = eINSTANCE.getCollectdServer_Entropy(); + + /** + * The meta object literal for the 'Contextswitches' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SERVER__CONTEXTSWITCHES = eINSTANCE.getCollectdServer_Contextswitches(); + + /** + * The meta object literal for the 'Cpus' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__CPUS = eINSTANCE.getCollectdServer_Cpus(); + + /** + * The meta object literal for the 'Memory' containment reference feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__MEMORY = eINSTANCE.getCollectdServer_Memory(); + + /** + * The meta object literal for the 'Swap' containment reference feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__SWAP = eINSTANCE.getCollectdServer_Swap(); + + /** + * The meta object literal for the 'Processes' containment reference feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__PROCESSES = eINSTANCE.getCollectdServer_Processes(); + + /** + * The meta object literal for the 'Vmem' containment reference feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__VMEM = eINSTANCE.getCollectdServer_Vmem(); + + /** + * The meta object literal for the 'Filesystems' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__FILESYSTEMS = eINSTANCE.getCollectdServer_Filesystems(); + + /** + * The meta object literal for the 'Disks' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__DISKS = eINSTANCE.getCollectdServer_Disks(); + + /** + * The meta object literal for the 'Interfaces' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__INTERFACES = eINSTANCE.getCollectdServer_Interfaces(); + + /** + * The meta object literal for the 'Instances' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_SERVER__INSTANCES = eINSTANCE.getCollectdServer_Instances(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl Memory}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdMemory() + * @generated + */ + EClass COLLECTD_MEMORY = eINSTANCE.getCollectdMemory(); + + /** + * The meta object literal for the 'Buffered' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_MEMORY__BUFFERED = eINSTANCE.getCollectdMemory_Buffered(); + + /** + * The meta object literal for the 'Cached' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_MEMORY__CACHED = eINSTANCE.getCollectdMemory_Cached(); + + /** + * The meta object literal for the 'Free' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_MEMORY__FREE = eINSTANCE.getCollectdMemory_Free(); + + /** + * The meta object literal for the 'Used' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_MEMORY__USED = eINSTANCE.getCollectdMemory_Used(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl Swap}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdSwap() + * @generated + */ + EClass COLLECTD_SWAP = eINSTANCE.getCollectdSwap(); + + /** + * The meta object literal for the 'Cached' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SWAP__CACHED = eINSTANCE.getCollectdSwap_Cached(); + + /** + * The meta object literal for the 'Free' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SWAP__FREE = eINSTANCE.getCollectdSwap_Free(); + + /** + * The meta object literal for the 'Used' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_SWAP__USED = eINSTANCE.getCollectdSwap_Used(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl Processes}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdProcesses() + * @generated + */ + EClass COLLECTD_PROCESSES = eINSTANCE.getCollectdProcesses(); + + /** + * The meta object literal for the 'Fork rate' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__FORK_RATE = eINSTANCE.getCollectdProcesses_Fork_rate(); + + /** + * The meta object literal for the 'Blocked' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__BLOCKED = eINSTANCE.getCollectdProcesses_Blocked(); + + /** + * The meta object literal for the 'Paging' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__PAGING = eINSTANCE.getCollectdProcesses_Paging(); + + /** + * The meta object literal for the 'Running' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__RUNNING = eINSTANCE.getCollectdProcesses_Running(); + + /** + * The meta object literal for the 'Sleeping' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__SLEEPING = eINSTANCE.getCollectdProcesses_Sleeping(); + + /** + * The meta object literal for the 'Stopped' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__STOPPED = eINSTANCE.getCollectdProcesses_Stopped(); + + /** + * The meta object literal for the 'Zombies' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_PROCESSES__ZOMBIES = eINSTANCE.getCollectdProcesses_Zombies(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl Vmem}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdVmem() + * @generated + */ + EClass COLLECTD_VMEM = eINSTANCE.getCollectdVmem(); + + /** + * The meta object literal for the 'Active anon' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ACTIVE_ANON = eINSTANCE.getCollectdVmem_Active_anon(); + + /** + * The meta object literal for the 'Active file' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ACTIVE_FILE = eINSTANCE.getCollectdVmem_Active_file(); + + /** + * The meta object literal for the 'Anon pages' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ANON_PAGES = eINSTANCE.getCollectdVmem_Anon_pages(); + + /** + * The meta object literal for the 'Anon transparent hugepages' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES = eINSTANCE.getCollectdVmem_Anon_transparent_hugepages(); + + /** + * The meta object literal for the 'Bounce' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__BOUNCE = eINSTANCE.getCollectdVmem_Bounce(); + + /** + * The meta object literal for the 'Dirtied' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__DIRTIED = eINSTANCE.getCollectdVmem_Dirtied(); + + /** + * The meta object literal for the 'Dirty' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__DIRTY = eINSTANCE.getCollectdVmem_Dirty(); + + /** + * The meta object literal for the 'Dirty background threshold' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD = eINSTANCE.getCollectdVmem_Dirty_background_threshold(); + + /** + * The meta object literal for the 'Dirty threshold' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__DIRTY_THRESHOLD = eINSTANCE.getCollectdVmem_Dirty_threshold(); + + /** + * The meta object literal for the 'File pages' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__FILE_PAGES = eINSTANCE.getCollectdVmem_File_pages(); + + /** + * The meta object literal for the 'Free pages' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__FREE_PAGES = eINSTANCE.getCollectdVmem_Free_pages(); + + /** + * The meta object literal for the 'Inactive anon' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__INACTIVE_ANON = eINSTANCE.getCollectdVmem_Inactive_anon(); + + /** + * The meta object literal for the 'Inactive file' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__INACTIVE_FILE = eINSTANCE.getCollectdVmem_Inactive_file(); + + /** + * The meta object literal for the 'Isolated anon' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ISOLATED_ANON = eINSTANCE.getCollectdVmem_Isolated_anon(); + + /** + * The meta object literal for the 'Isolated file' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__ISOLATED_FILE = eINSTANCE.getCollectdVmem_Isolated_file(); + + /** + * The meta object literal for the 'Kernel stack' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__KERNEL_STACK = eINSTANCE.getCollectdVmem_Kernel_stack(); + + /** + * The meta object literal for the 'Mapped' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__MAPPED = eINSTANCE.getCollectdVmem_Mapped(); + + /** + * The meta object literal for the 'Mlock' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__MLOCK = eINSTANCE.getCollectdVmem_Mlock(); + + /** + * The meta object literal for the 'Page table pages' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__PAGE_TABLE_PAGES = eINSTANCE.getCollectdVmem_Page_table_pages(); + + /** + * The meta object literal for the 'Shmem' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__SHMEM = eINSTANCE.getCollectdVmem_Shmem(); + + /** + * The meta object literal for the 'Slab reclaimable' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__SLAB_RECLAIMABLE = eINSTANCE.getCollectdVmem_Slab_reclaimable(); + + /** + * The meta object literal for the 'Slab unreclaimable' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__SLAB_UNRECLAIMABLE = eINSTANCE.getCollectdVmem_Slab_unreclaimable(); + + /** + * The meta object literal for the 'Unevictable' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__UNEVICTABLE = eINSTANCE.getCollectdVmem_Unevictable(); + + /** + * The meta object literal for the 'Unstable' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__UNSTABLE = eINSTANCE.getCollectdVmem_Unstable(); + + /** + * The meta object literal for the 'Vmscan immediate reclaim' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM = eINSTANCE.getCollectdVmem_Vmscan_immediate_reclaim(); + + /** + * The meta object literal for the 'Vmscan write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__VMSCAN_WRITE = eINSTANCE.getCollectdVmem_Vmscan_write(); + + /** + * The meta object literal for the 'Writeback' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__WRITEBACK = eINSTANCE.getCollectdVmem_Writeback(); + + /** + * The meta object literal for the 'Writeback temp' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__WRITEBACK_TEMP = eINSTANCE.getCollectdVmem_Writeback_temp(); + + /** + * The meta object literal for the 'Written' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__WRITTEN = eINSTANCE.getCollectdVmem_Written(); + + /** + * The meta object literal for the 'Memory in' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__MEMORY_IN = eINSTANCE.getCollectdVmem_Memory_in(); + + /** + * The meta object literal for the 'Memory out' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__MEMORY_OUT = eINSTANCE.getCollectdVmem_Memory_out(); + + /** + * The meta object literal for the 'Swap in' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__SWAP_IN = eINSTANCE.getCollectdVmem_Swap_in(); + + /** + * The meta object literal for the 'Swap out' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__SWAP_OUT = eINSTANCE.getCollectdVmem_Swap_out(); + + /** + * The meta object literal for the 'Faults minor' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__FAULTS_MINOR = eINSTANCE.getCollectdVmem_Faults_minor(); + + /** + * The meta object literal for the 'Faults major' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_VMEM__FAULTS_MAJOR = eINSTANCE.getCollectdVmem_Faults_major(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl Cpu}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdCpu() + * @generated + */ + EClass COLLECTD_CPU = eINSTANCE.getCollectdCpu(); + + /** + * The meta object literal for the 'Idle' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_CPU__IDLE = eINSTANCE.getCollectdCpu_Idle(); + + /** + * The meta object literal for the 'Wait' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_CPU__WAIT = eINSTANCE.getCollectdCpu_Wait(); + + /** + * The meta object literal for the 'User' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_CPU__USER = eINSTANCE.getCollectdCpu_User(); + + /** + * The meta object literal for the 'System' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_CPU__SYSTEM = eINSTANCE.getCollectdCpu_System(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl Disk}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdDisk() + * @generated + */ + EClass COLLECTD_DISK = eINSTANCE.getCollectdDisk(); + + /** + * The meta object literal for the 'Disk merged read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_MERGED_READ = eINSTANCE.getCollectdDisk_Disk_merged_read(); + + /** + * The meta object literal for the 'Disk merged write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_MERGED_WRITE = eINSTANCE.getCollectdDisk_Disk_merged_write(); + + /** + * The meta object literal for the 'Disk octets read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_OCTETS_READ = eINSTANCE.getCollectdDisk_Disk_octets_read(); + + /** + * The meta object literal for the 'Disk octets write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_OCTETS_WRITE = eINSTANCE.getCollectdDisk_Disk_octets_write(); + + /** + * The meta object literal for the 'Disk ops read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_OPS_READ = eINSTANCE.getCollectdDisk_Disk_ops_read(); + + /** + * The meta object literal for the 'Disk ops write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_OPS_WRITE = eINSTANCE.getCollectdDisk_Disk_ops_write(); + + /** + * The meta object literal for the 'Disk time read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_TIME_READ = eINSTANCE.getCollectdDisk_Disk_time_read(); + + /** + * The meta object literal for the 'Disk time write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_DISK__DISK_TIME_WRITE = eINSTANCE.getCollectdDisk_Disk_time_write(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl File System}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdFileSystem() + * @generated + */ + EClass COLLECTD_FILE_SYSTEM = eINSTANCE.getCollectdFileSystem(); + + /** + * The meta object literal for the 'Used' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_FILE_SYSTEM__USED = eINSTANCE.getCollectdFileSystem_Used(); + + /** + * The meta object literal for the 'Free' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_FILE_SYSTEM__FREE = eINSTANCE.getCollectdFileSystem_Free(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl Interface}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdInterface() + * @generated + */ + EClass COLLECTD_INTERFACE = eINSTANCE.getCollectdInterface(); + + /** + * The meta object literal for the 'If errors rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_ERRORS_RX = eINSTANCE.getCollectdInterface_If_errors_rx(); + + /** + * The meta object literal for the 'If errors tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_ERRORS_TX = eINSTANCE.getCollectdInterface_If_errors_tx(); + + /** + * The meta object literal for the 'If octets rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_OCTETS_RX = eINSTANCE.getCollectdInterface_If_octets_rx(); + + /** + * The meta object literal for the 'If octets tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_OCTETS_TX = eINSTANCE.getCollectdInterface_If_octets_tx(); + + /** + * The meta object literal for the 'If packets rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_PACKETS_RX = eINSTANCE.getCollectdInterface_If_packets_rx(); + + /** + * The meta object literal for the 'If packets tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_INTERFACE__IF_PACKETS_TX = eINSTANCE.getCollectdInterface_If_packets_tx(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl Kvm Instance}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmInstance() + * @generated + */ + EClass COLLECTD_KVM_INSTANCE = eINSTANCE.getCollectdKvmInstance(); + + /** + * The meta object literal for the 'Virt cpu total' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL = eINSTANCE.getCollectdKvmInstance_Virt_cpu_total(); + + /** + * The meta object literal for the 'Disks' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_KVM_INSTANCE__DISKS = eINSTANCE.getCollectdKvmInstance_Disks(); + + /** + * The meta object literal for the 'Interfaces' containment reference list feature. + * + * + * @generated + */ + EReference COLLECTD_KVM_INSTANCE__INTERFACES = eINSTANCE.getCollectdKvmInstance_Interfaces(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl Kvm Disk}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmDisk() + * @generated + */ + EClass COLLECTD_KVM_DISK = eINSTANCE.getCollectdKvmDisk(); + + /** + * The meta object literal for the 'Disk octets read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_DISK__DISK_OCTETS_READ = eINSTANCE.getCollectdKvmDisk_Disk_octets_read(); + + /** + * The meta object literal for the 'Disk octets write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_DISK__DISK_OCTETS_WRITE = eINSTANCE.getCollectdKvmDisk_Disk_octets_write(); + + /** + * The meta object literal for the 'Disk ops read' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_DISK__DISK_OPS_READ = eINSTANCE.getCollectdKvmDisk_Disk_ops_read(); + + /** + * The meta object literal for the 'Disk ops write' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_DISK__DISK_OPS_WRITE = eINSTANCE.getCollectdKvmDisk_Disk_ops_write(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl Kvm Interface}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdPackageImpl#getCollectdKvmInterface() + * @generated + */ + EClass COLLECTD_KVM_INTERFACE = eINSTANCE.getCollectdKvmInterface(); + + /** + * The meta object literal for the 'If errors rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_ERRORS_RX = eINSTANCE.getCollectdKvmInterface_If_errors_rx(); + + /** + * The meta object literal for the 'If errors tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_ERRORS_TX = eINSTANCE.getCollectdKvmInterface_If_errors_tx(); + + /** + * The meta object literal for the 'If dropped rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_DROPPED_RX = eINSTANCE.getCollectdKvmInterface_If_dropped_rx(); + + /** + * The meta object literal for the 'If dropped tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_DROPPED_TX = eINSTANCE.getCollectdKvmInterface_If_dropped_tx(); + + /** + * The meta object literal for the 'If octets rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_OCTETS_RX = eINSTANCE.getCollectdKvmInterface_If_octets_rx(); + + /** + * The meta object literal for the 'If octets tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_OCTETS_TX = eINSTANCE.getCollectdKvmInterface_If_octets_tx(); + + /** + * The meta object literal for the 'If packets rx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_PACKETS_RX = eINSTANCE.getCollectdKvmInterface_If_packets_rx(); + + /** + * The meta object literal for the 'If packets tx' attribute feature. + * + * + * @generated + */ + EAttribute COLLECTD_KVM_INTERFACE__IF_PACKETS_TX = eINSTANCE.getCollectdKvmInterface_If_packets_tx(); + + } + +} //CollectdPackage diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdProcesses.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdProcesses.java new file mode 100644 index 0000000..30f2e04 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/CollectdProcesses.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.sirius.manager.agent.collectd; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Processes'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getFork_rate Fork rate}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getBlocked Blocked}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getPaging Paging}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getRunning Running}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getSleeping Sleeping}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getStopped Stopped}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getZombies Zombies}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses() + * @model + * @generated + */ +public interface CollectdProcesses extends EObject { + /** + * Returns the value of the 'Fork rate' attribute. + * + *

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

+ * + * @return the value of the 'Fork rate' attribute. + * @see #setFork_rate(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Fork_rate() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getFork_rate(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getFork_rate Fork rate}' attribute. + * + * + * @param value the new value of the 'Fork rate' attribute. + * @see #getFork_rate() + * @generated + */ + void setFork_rate(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Blocked' attribute. + * + *

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

+ * + * @return the value of the 'Blocked' attribute. + * @see #setBlocked(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Blocked() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getBlocked(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getBlocked Blocked}' attribute. + * + * + * @param value the new value of the 'Blocked' attribute. + * @see #getBlocked() + * @generated + */ + void setBlocked(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Paging' attribute. + * + *

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

+ * + * @return the value of the 'Paging' attribute. + * @see #setPaging(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Paging() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getPaging(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getPaging Paging}' attribute. + * + * + * @param value the new value of the 'Paging' attribute. + * @see #getPaging() + * @generated + */ + void setPaging(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Running' attribute. + * + *

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

+ * + * @return the value of the 'Running' attribute. + * @see #setRunning(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Running() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getRunning(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getRunning Running}' attribute. + * + * + * @param value the new value of the 'Running' attribute. + * @see #getRunning() + * @generated + */ + void setRunning(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Sleeping' attribute. + * + *

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

+ * + * @return the value of the 'Sleeping' attribute. + * @see #setSleeping(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Sleeping() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getSleeping(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getSleeping Sleeping}' attribute. + * + * + * @param value the new value of the 'Sleeping' attribute. + * @see #getSleeping() + * @generated + */ + void setSleeping(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Stopped' attribute. + * + *

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

+ * + * @return the value of the 'Stopped' attribute. + * @see #setStopped(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdProcesses_Stopped() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getStopped(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses#getStopped Stopped}' attribute. + * + * + * @param value the new value of the 'Stopped' attribute. + * @see #getStopped() + * @generated + */ + void setStopped(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Zombies' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_shortterm Load shortterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_midterm Load midterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_longterm Load longterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getEntropy Entropy}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getContextswitches Contextswitches}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getCpus Cpus}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getMemory Memory}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getSwap Swap}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getProcesses Processes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getVmem Vmem}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getFilesystems Filesystems}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getDisks Disks}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInterfaces Interfaces}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getInstances Instances}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer() + * @model + * @generated + */ +public interface CollectdServer extends NamedEntity, AlertContainer { + /** + * Returns the value of the 'Load shortterm' attribute. + * + *

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

+ * + * @return the value of the 'Load shortterm' attribute. + * @see #setLoad_shortterm(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Load_shortterm() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getLoad_shortterm(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_shortterm Load shortterm}' attribute. + * + * + * @param value the new value of the 'Load shortterm' attribute. + * @see #getLoad_shortterm() + * @generated + */ + void setLoad_shortterm(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Load midterm' attribute. + * + *

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

+ * + * @return the value of the 'Load midterm' attribute. + * @see #setLoad_midterm(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Load_midterm() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getLoad_midterm(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_midterm Load midterm}' attribute. + * + * + * @param value the new value of the 'Load midterm' attribute. + * @see #getLoad_midterm() + * @generated + */ + void setLoad_midterm(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Load longterm' attribute. + * + *

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

+ * + * @return the value of the 'Load longterm' attribute. + * @see #setLoad_longterm(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Load_longterm() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getLoad_longterm(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getLoad_longterm Load longterm}' attribute. + * + * + * @param value the new value of the 'Load longterm' attribute. + * @see #getLoad_longterm() + * @generated + */ + void setLoad_longterm(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Entropy' attribute. + * + *

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

+ * + * @return the value of the 'Entropy' attribute. + * @see #setEntropy(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Entropy() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getEntropy(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getEntropy Entropy}' attribute. + * + * + * @param value the new value of the 'Entropy' attribute. + * @see #getEntropy() + * @generated + */ + void setEntropy(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Contextswitches' attribute. + * + *

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

+ * + * @return the value of the 'Contextswitches' attribute. + * @see #setContextswitches(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Contextswitches() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getContextswitches(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getContextswitches Contextswitches}' attribute. + * + * + * @param value the new value of the 'Contextswitches' attribute. + * @see #getContextswitches() + * @generated + */ + void setContextswitches(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Cpus' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu}. + * + *

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

+ * + * @return the value of the 'Cpus' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Cpus() + * @model containment="true" + * @generated + */ + EList getCpus(); + + /** + * Returns the value of the 'Memory' containment reference. + * + *

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

+ * + * @return the value of the 'Memory' containment reference. + * @see #setMemory(CollectdMemory) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Memory() + * @model containment="true" + * @generated + */ + CollectdMemory getMemory(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getMemory Memory}' containment reference. + * + * + * @param value the new value of the 'Memory' containment reference. + * @see #getMemory() + * @generated + */ + void setMemory(CollectdMemory value); + + /** + * Returns the value of the 'Swap' containment reference. + * + *

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

+ * + * @return the value of the 'Swap' containment reference. + * @see #setSwap(CollectdSwap) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Swap() + * @model containment="true" + * @generated + */ + CollectdSwap getSwap(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getSwap Swap}' containment reference. + * + * + * @param value the new value of the 'Swap' containment reference. + * @see #getSwap() + * @generated + */ + void setSwap(CollectdSwap value); + + /** + * Returns the value of the 'Processes' containment reference. + * + *

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

+ * + * @return the value of the 'Processes' containment reference. + * @see #setProcesses(CollectdProcesses) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Processes() + * @model containment="true" + * @generated + */ + CollectdProcesses getProcesses(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getProcesses Processes}' containment reference. + * + * + * @param value the new value of the 'Processes' containment reference. + * @see #getProcesses() + * @generated + */ + void setProcesses(CollectdProcesses value); + + /** + * Returns the value of the 'Vmem' containment reference. + * + *

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

+ * + * @return the value of the 'Vmem' containment reference. + * @see #setVmem(CollectdVmem) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Vmem() + * @model containment="true" + * @generated + */ + CollectdVmem getVmem(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer#getVmem Vmem}' containment reference. + * + * + * @param value the new value of the 'Vmem' containment reference. + * @see #getVmem() + * @generated + */ + void setVmem(CollectdVmem value); + + /** + * Returns the value of the 'Filesystems' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem}. + * + *

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

+ * + * @return the value of the 'Filesystems' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Filesystems() + * @model containment="true" + * @generated + */ + EList getFilesystems(); + + /** + * Returns the value of the 'Disks' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk}. + * + *

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

+ * + * @return the value of the 'Disks' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Disks() + * @model containment="true" + * @generated + */ + EList getDisks(); + + /** + * Returns the value of the 'Interfaces' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface}. + * + *

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

+ * + * @return the value of the 'Interfaces' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdServer_Interfaces() + * @model containment="true" + * @generated + */ + EList getInterfaces(); + + /** + * Returns the value of the 'Instances' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getCached Cached}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getFree Free}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getUsed Used}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdSwap() + * @model + * @generated + */ +public interface CollectdSwap extends EObject { + /** + * Returns the value of the 'Cached' attribute. + * + *

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

+ * + * @return the value of the 'Cached' attribute. + * @see #setCached(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdSwap_Cached() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getCached(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getCached Cached}' attribute. + * + * + * @param value the new value of the 'Cached' attribute. + * @see #getCached() + * @generated + */ + void setCached(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Free' attribute. + * + *

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

+ * + * @return the value of the 'Free' attribute. + * @see #setFree(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdSwap_Free() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getFree(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap#getFree Free}' attribute. + * + * + * @param value the new value of the 'Free' attribute. + * @see #getFree() + * @generated + */ + void setFree(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Used' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_anon Active anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_file Active file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_pages Anon pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_transparent_hugepages Anon transparent hugepages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getBounce Bounce}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirtied Dirtied}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty Dirty}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_background_threshold Dirty background threshold}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_threshold Dirty threshold}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFile_pages File pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFree_pages Free pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_anon Inactive anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_file Inactive file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_anon Isolated anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_file Isolated file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getKernel_stack Kernel stack}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMapped Mapped}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMlock Mlock}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getPage_table_pages Page table pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getShmem Shmem}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_reclaimable Slab reclaimable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_unreclaimable Slab unreclaimable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnevictable Unevictable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnstable Unstable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_immediate_reclaim Vmscan immediate reclaim}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_write Vmscan write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback Writeback}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback_temp Writeback temp}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWritten Written}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_in Memory in}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_out Memory out}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_in Swap in}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_out Swap out}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_minor Faults minor}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_major Faults major}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem() + * @model + * @generated + */ +public interface CollectdVmem extends EObject { + /** + * Returns the value of the 'Active anon' attribute. + * + *

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

+ * + * @return the value of the 'Active anon' attribute. + * @see #setActive_anon(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Active_anon() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getActive_anon(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_anon Active anon}' attribute. + * + * + * @param value the new value of the 'Active anon' attribute. + * @see #getActive_anon() + * @generated + */ + void setActive_anon(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Active file' attribute. + * + *

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

+ * + * @return the value of the 'Active file' attribute. + * @see #setActive_file(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Active_file() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getActive_file(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getActive_file Active file}' attribute. + * + * + * @param value the new value of the 'Active file' attribute. + * @see #getActive_file() + * @generated + */ + void setActive_file(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Anon pages' attribute. + * + *

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

+ * + * @return the value of the 'Anon pages' attribute. + * @see #setAnon_pages(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Anon_pages() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getAnon_pages(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_pages Anon pages}' attribute. + * + * + * @param value the new value of the 'Anon pages' attribute. + * @see #getAnon_pages() + * @generated + */ + void setAnon_pages(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Anon transparent hugepages' attribute. + * + *

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

+ * + * @return the value of the 'Anon transparent hugepages' attribute. + * @see #setAnon_transparent_hugepages(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Anon_transparent_hugepages() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getAnon_transparent_hugepages(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getAnon_transparent_hugepages Anon transparent hugepages}' attribute. + * + * + * @param value the new value of the 'Anon transparent hugepages' attribute. + * @see #getAnon_transparent_hugepages() + * @generated + */ + void setAnon_transparent_hugepages(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Bounce' attribute. + * + *

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

+ * + * @return the value of the 'Bounce' attribute. + * @see #setBounce(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Bounce() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getBounce(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getBounce Bounce}' attribute. + * + * + * @param value the new value of the 'Bounce' attribute. + * @see #getBounce() + * @generated + */ + void setBounce(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Dirtied' attribute. + * + *

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

+ * + * @return the value of the 'Dirtied' attribute. + * @see #setDirtied(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Dirtied() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getDirtied(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirtied Dirtied}' attribute. + * + * + * @param value the new value of the 'Dirtied' attribute. + * @see #getDirtied() + * @generated + */ + void setDirtied(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Dirty' attribute. + * + *

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

+ * + * @return the value of the 'Dirty' attribute. + * @see #setDirty(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Dirty() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getDirty(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty Dirty}' attribute. + * + * + * @param value the new value of the 'Dirty' attribute. + * @see #getDirty() + * @generated + */ + void setDirty(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Dirty background threshold' attribute. + * + *

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

+ * + * @return the value of the 'Dirty background threshold' attribute. + * @see #setDirty_background_threshold(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Dirty_background_threshold() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getDirty_background_threshold(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_background_threshold Dirty background threshold}' attribute. + * + * + * @param value the new value of the 'Dirty background threshold' attribute. + * @see #getDirty_background_threshold() + * @generated + */ + void setDirty_background_threshold(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Dirty threshold' attribute. + * + *

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

+ * + * @return the value of the 'Dirty threshold' attribute. + * @see #setDirty_threshold(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Dirty_threshold() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getDirty_threshold(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getDirty_threshold Dirty threshold}' attribute. + * + * + * @param value the new value of the 'Dirty threshold' attribute. + * @see #getDirty_threshold() + * @generated + */ + void setDirty_threshold(DoubleMetricAttribute value); + + /** + * Returns the value of the 'File pages' attribute. + * + *

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

+ * + * @return the value of the 'File pages' attribute. + * @see #setFile_pages(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_File_pages() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getFile_pages(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFile_pages File pages}' attribute. + * + * + * @param value the new value of the 'File pages' attribute. + * @see #getFile_pages() + * @generated + */ + void setFile_pages(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Free pages' attribute. + * + *

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

+ * + * @return the value of the 'Free pages' attribute. + * @see #setFree_pages(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Free_pages() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getFree_pages(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFree_pages Free pages}' attribute. + * + * + * @param value the new value of the 'Free pages' attribute. + * @see #getFree_pages() + * @generated + */ + void setFree_pages(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Inactive anon' attribute. + * + *

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

+ * + * @return the value of the 'Inactive anon' attribute. + * @see #setInactive_anon(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Inactive_anon() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getInactive_anon(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_anon Inactive anon}' attribute. + * + * + * @param value the new value of the 'Inactive anon' attribute. + * @see #getInactive_anon() + * @generated + */ + void setInactive_anon(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Inactive file' attribute. + * + *

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

+ * + * @return the value of the 'Inactive file' attribute. + * @see #setInactive_file(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Inactive_file() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getInactive_file(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getInactive_file Inactive file}' attribute. + * + * + * @param value the new value of the 'Inactive file' attribute. + * @see #getInactive_file() + * @generated + */ + void setInactive_file(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Isolated anon' attribute. + * + *

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

+ * + * @return the value of the 'Isolated anon' attribute. + * @see #setIsolated_anon(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Isolated_anon() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getIsolated_anon(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_anon Isolated anon}' attribute. + * + * + * @param value the new value of the 'Isolated anon' attribute. + * @see #getIsolated_anon() + * @generated + */ + void setIsolated_anon(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Isolated file' attribute. + * + *

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

+ * + * @return the value of the 'Isolated file' attribute. + * @see #setIsolated_file(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Isolated_file() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getIsolated_file(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getIsolated_file Isolated file}' attribute. + * + * + * @param value the new value of the 'Isolated file' attribute. + * @see #getIsolated_file() + * @generated + */ + void setIsolated_file(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Kernel stack' attribute. + * + *

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

+ * + * @return the value of the 'Kernel stack' attribute. + * @see #setKernel_stack(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Kernel_stack() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getKernel_stack(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getKernel_stack Kernel stack}' attribute. + * + * + * @param value the new value of the 'Kernel stack' attribute. + * @see #getKernel_stack() + * @generated + */ + void setKernel_stack(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Mapped' attribute. + * + *

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

+ * + * @return the value of the 'Mapped' attribute. + * @see #setMapped(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Mapped() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getMapped(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMapped Mapped}' attribute. + * + * + * @param value the new value of the 'Mapped' attribute. + * @see #getMapped() + * @generated + */ + void setMapped(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Mlock' attribute. + * + *

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

+ * + * @return the value of the 'Mlock' attribute. + * @see #setMlock(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Mlock() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getMlock(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMlock Mlock}' attribute. + * + * + * @param value the new value of the 'Mlock' attribute. + * @see #getMlock() + * @generated + */ + void setMlock(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Page table pages' attribute. + * + *

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

+ * + * @return the value of the 'Page table pages' attribute. + * @see #setPage_table_pages(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Page_table_pages() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getPage_table_pages(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getPage_table_pages Page table pages}' attribute. + * + * + * @param value the new value of the 'Page table pages' attribute. + * @see #getPage_table_pages() + * @generated + */ + void setPage_table_pages(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Shmem' attribute. + * + *

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

+ * + * @return the value of the 'Shmem' attribute. + * @see #setShmem(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Shmem() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getShmem(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getShmem Shmem}' attribute. + * + * + * @param value the new value of the 'Shmem' attribute. + * @see #getShmem() + * @generated + */ + void setShmem(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Slab reclaimable' attribute. + * + *

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

+ * + * @return the value of the 'Slab reclaimable' attribute. + * @see #setSlab_reclaimable(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Slab_reclaimable() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getSlab_reclaimable(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_reclaimable Slab reclaimable}' attribute. + * + * + * @param value the new value of the 'Slab reclaimable' attribute. + * @see #getSlab_reclaimable() + * @generated + */ + void setSlab_reclaimable(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Slab unreclaimable' attribute. + * + *

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

+ * + * @return the value of the 'Slab unreclaimable' attribute. + * @see #setSlab_unreclaimable(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Slab_unreclaimable() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getSlab_unreclaimable(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSlab_unreclaimable Slab unreclaimable}' attribute. + * + * + * @param value the new value of the 'Slab unreclaimable' attribute. + * @see #getSlab_unreclaimable() + * @generated + */ + void setSlab_unreclaimable(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Unevictable' attribute. + * + *

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

+ * + * @return the value of the 'Unevictable' attribute. + * @see #setUnevictable(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Unevictable() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getUnevictable(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnevictable Unevictable}' attribute. + * + * + * @param value the new value of the 'Unevictable' attribute. + * @see #getUnevictable() + * @generated + */ + void setUnevictable(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Unstable' attribute. + * + *

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

+ * + * @return the value of the 'Unstable' attribute. + * @see #setUnstable(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Unstable() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getUnstable(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getUnstable Unstable}' attribute. + * + * + * @param value the new value of the 'Unstable' attribute. + * @see #getUnstable() + * @generated + */ + void setUnstable(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Vmscan immediate reclaim' attribute. + * + *

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

+ * + * @return the value of the 'Vmscan immediate reclaim' attribute. + * @see #setVmscan_immediate_reclaim(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Vmscan_immediate_reclaim() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getVmscan_immediate_reclaim(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_immediate_reclaim Vmscan immediate reclaim}' attribute. + * + * + * @param value the new value of the 'Vmscan immediate reclaim' attribute. + * @see #getVmscan_immediate_reclaim() + * @generated + */ + void setVmscan_immediate_reclaim(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Vmscan write' attribute. + * + *

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

+ * + * @return the value of the 'Vmscan write' attribute. + * @see #setVmscan_write(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Vmscan_write() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getVmscan_write(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getVmscan_write Vmscan write}' attribute. + * + * + * @param value the new value of the 'Vmscan write' attribute. + * @see #getVmscan_write() + * @generated + */ + void setVmscan_write(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Writeback' attribute. + * + *

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

+ * + * @return the value of the 'Writeback' attribute. + * @see #setWriteback(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Writeback() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getWriteback(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback Writeback}' attribute. + * + * + * @param value the new value of the 'Writeback' attribute. + * @see #getWriteback() + * @generated + */ + void setWriteback(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Writeback temp' attribute. + * + *

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

+ * + * @return the value of the 'Writeback temp' attribute. + * @see #setWriteback_temp(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Writeback_temp() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getWriteback_temp(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWriteback_temp Writeback temp}' attribute. + * + * + * @param value the new value of the 'Writeback temp' attribute. + * @see #getWriteback_temp() + * @generated + */ + void setWriteback_temp(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Written' attribute. + * + *

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

+ * + * @return the value of the 'Written' attribute. + * @see #setWritten(DoubleMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Written() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getWritten(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getWritten Written}' attribute. + * + * + * @param value the new value of the 'Written' attribute. + * @see #getWritten() + * @generated + */ + void setWritten(DoubleMetricAttribute value); + + /** + * Returns the value of the 'Memory in' attribute. + * + *

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

+ * + * @return the value of the 'Memory in' attribute. + * @see #setMemory_in(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Memory_in() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getMemory_in(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_in Memory in}' attribute. + * + * + * @param value the new value of the 'Memory in' attribute. + * @see #getMemory_in() + * @generated + */ + void setMemory_in(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Memory out' attribute. + * + *

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

+ * + * @return the value of the 'Memory out' attribute. + * @see #setMemory_out(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Memory_out() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getMemory_out(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getMemory_out Memory out}' attribute. + * + * + * @param value the new value of the 'Memory out' attribute. + * @see #getMemory_out() + * @generated + */ + void setMemory_out(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Swap in' attribute. + * + *

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

+ * + * @return the value of the 'Swap in' attribute. + * @see #setSwap_in(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Swap_in() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getSwap_in(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_in Swap in}' attribute. + * + * + * @param value the new value of the 'Swap in' attribute. + * @see #getSwap_in() + * @generated + */ + void setSwap_in(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Swap out' attribute. + * + *

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

+ * + * @return the value of the 'Swap out' attribute. + * @see #setSwap_out(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Swap_out() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getSwap_out(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getSwap_out Swap out}' attribute. + * + * + * @param value the new value of the 'Swap out' attribute. + * @see #getSwap_out() + * @generated + */ + void setSwap_out(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Faults minor' attribute. + * + *

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

+ * + * @return the value of the 'Faults minor' attribute. + * @see #setFaults_minor(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Faults_minor() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getFaults_minor(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_minor Faults minor}' attribute. + * + * + * @param value the new value of the 'Faults minor' attribute. + * @see #getFaults_minor() + * @generated + */ + void setFaults_minor(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Faults major' attribute. + * + *

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

+ * + * @return the value of the 'Faults major' attribute. + * @see #setFaults_major(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage#getCollectdVmem_Faults_major() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getFaults_major(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem#getFaults_major Faults major}' attribute. + * + * + * @param value the new value of the 'Faults major' attribute. + * @see #getFaults_major() + * @generated + */ + void setFaults_major(IncreasingULongMetricAttribute value); + +} // CollectdVmem diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdCpuImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdCpuImpl.java new file mode 100644 index 0000000..5997e29 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdCpuImpl.java @@ -0,0 +1,506 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Cpu'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getIdle Idle}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getWait Wait}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getUser User}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdCpuImpl#getSystem System}
  • + *
+ *

+ * + * @generated + */ +public class CollectdCpuImpl extends NamedEntityImpl implements CollectdCpu { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getIdle() Idle}' attribute. + * + * + * @see #getIdle() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IDLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIdle() Idle}' attribute. + * + * + * @see #getIdle() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute idle = IDLE_EDEFAULT; + + /** + * The default value of the '{@link #getWait() Wait}' attribute. + * + * + * @see #getWait() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute WAIT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWait() Wait}' attribute. + * + * + * @see #getWait() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute wait = WAIT_EDEFAULT; + + /** + * The default value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute USER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUser() User}' attribute. + * + * + * @see #getUser() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute user = USER_EDEFAULT; + + /** + * The default value of the '{@link #getSystem() System}' attribute. + * + * + * @see #getSystem() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute SYSTEM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSystem() System}' attribute. + * + * + * @see #getSystem() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute system = SYSTEM_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdCpuImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_CPU; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_CPU__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIdle() { + return idle; + } + + /** + * + * + * @generated + */ + public void setIdle(IncreasingULongMetricAttribute newIdle) { + IncreasingULongMetricAttribute oldIdle = idle; + idle = newIdle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_CPU__IDLE, oldIdle, idle)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getWait() { + return wait; + } + + /** + * + * + * @generated + */ + public void setWait(IncreasingULongMetricAttribute newWait) { + IncreasingULongMetricAttribute oldWait = wait; + wait = newWait; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_CPU__WAIT, oldWait, wait)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getUser() { + return user; + } + + /** + * + * + * @generated + */ + public void setUser(IncreasingULongMetricAttribute newUser) { + IncreasingULongMetricAttribute oldUser = user; + user = newUser; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_CPU__USER, oldUser, user)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getSystem() { + return system; + } + + /** + * + * + * @generated + */ + public void setSystem(IncreasingULongMetricAttribute newSystem) { + IncreasingULongMetricAttribute oldSystem = system; + system = newSystem; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_CPU__SYSTEM, oldSystem, system)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_CPU__IDLE: + return getIdle(); + case CollectdPackage.COLLECTD_CPU__WAIT: + return getWait(); + case CollectdPackage.COLLECTD_CPU__USER: + return getUser(); + case CollectdPackage.COLLECTD_CPU__SYSTEM: + return getSystem(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_CPU__IDLE: + setIdle((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_CPU__WAIT: + setWait((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_CPU__USER: + setUser((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_CPU__SYSTEM: + setSystem((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_CPU__IDLE: + setIdle(IDLE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_CPU__WAIT: + setWait(WAIT_EDEFAULT); + return; + case CollectdPackage.COLLECTD_CPU__USER: + setUser(USER_EDEFAULT); + return; + case CollectdPackage.COLLECTD_CPU__SYSTEM: + setSystem(SYSTEM_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_CPU__IDLE: + return IDLE_EDEFAULT == null ? idle != null : !IDLE_EDEFAULT.equals(idle); + case CollectdPackage.COLLECTD_CPU__WAIT: + return WAIT_EDEFAULT == null ? wait != null : !WAIT_EDEFAULT.equals(wait); + case CollectdPackage.COLLECTD_CPU__USER: + return USER_EDEFAULT == null ? user != null : !USER_EDEFAULT.equals(user); + case CollectdPackage.COLLECTD_CPU__SYSTEM: + return SYSTEM_EDEFAULT == null ? system != null : !SYSTEM_EDEFAULT.equals(system); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_CPU__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_CPU__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_CPU__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (idle: "); + result.append(idle); + result.append(", wait: "); + result.append(wait); + result.append(", user: "); + result.append(user); + result.append(", system: "); + result.append(system); + result.append(')'); + return result.toString(); + } + +} //CollectdCpuImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdDiskImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdDiskImpl.java new file mode 100644 index 0000000..bdeb637 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdDiskImpl.java @@ -0,0 +1,722 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Disk'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_merged_read Disk merged read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_merged_write Disk merged write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_octets_read Disk octets read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_octets_write Disk octets write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_ops_read Disk ops read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_ops_write Disk ops write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_time_read Disk time read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdDiskImpl#getDisk_time_write Disk time write}
  • + *
+ *

+ * + * @generated + */ +public class CollectdDiskImpl extends NamedEntityImpl implements CollectdDisk { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getDisk_merged_read() Disk merged read}' attribute. + * + * + * @see #getDisk_merged_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_MERGED_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_merged_read() Disk merged read}' attribute. + * + * + * @see #getDisk_merged_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_merged_read = DISK_MERGED_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_merged_write() Disk merged write}' attribute. + * + * + * @see #getDisk_merged_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_MERGED_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_merged_write() Disk merged write}' attribute. + * + * + * @see #getDisk_merged_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_merged_write = DISK_MERGED_WRITE_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_octets_read() Disk octets read}' attribute. + * + * + * @see #getDisk_octets_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OCTETS_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_octets_read() Disk octets read}' attribute. + * + * + * @see #getDisk_octets_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_octets_read = DISK_OCTETS_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_octets_write() Disk octets write}' attribute. + * + * + * @see #getDisk_octets_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OCTETS_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_octets_write() Disk octets write}' attribute. + * + * + * @see #getDisk_octets_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_octets_write = DISK_OCTETS_WRITE_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_ops_read() Disk ops read}' attribute. + * + * + * @see #getDisk_ops_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OPS_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_ops_read() Disk ops read}' attribute. + * + * + * @see #getDisk_ops_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_ops_read = DISK_OPS_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_ops_write() Disk ops write}' attribute. + * + * + * @see #getDisk_ops_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OPS_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_ops_write() Disk ops write}' attribute. + * + * + * @see #getDisk_ops_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_ops_write = DISK_OPS_WRITE_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_time_read() Disk time read}' attribute. + * + * + * @see #getDisk_time_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_TIME_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_time_read() Disk time read}' attribute. + * + * + * @see #getDisk_time_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_time_read = DISK_TIME_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_time_write() Disk time write}' attribute. + * + * + * @see #getDisk_time_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_TIME_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_time_write() Disk time write}' attribute. + * + * + * @see #getDisk_time_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_time_write = DISK_TIME_WRITE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdDiskImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_DISK; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_DISK__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_merged_read() { + return disk_merged_read; + } + + /** + * + * + * @generated + */ + public void setDisk_merged_read(IncreasingULongMetricAttribute newDisk_merged_read) { + IncreasingULongMetricAttribute oldDisk_merged_read = disk_merged_read; + disk_merged_read = newDisk_merged_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_MERGED_READ, oldDisk_merged_read, disk_merged_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_merged_write() { + return disk_merged_write; + } + + /** + * + * + * @generated + */ + public void setDisk_merged_write(IncreasingULongMetricAttribute newDisk_merged_write) { + IncreasingULongMetricAttribute oldDisk_merged_write = disk_merged_write; + disk_merged_write = newDisk_merged_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_MERGED_WRITE, oldDisk_merged_write, disk_merged_write)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_octets_read() { + return disk_octets_read; + } + + /** + * + * + * @generated + */ + public void setDisk_octets_read(IncreasingULongMetricAttribute newDisk_octets_read) { + IncreasingULongMetricAttribute oldDisk_octets_read = disk_octets_read; + disk_octets_read = newDisk_octets_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_OCTETS_READ, oldDisk_octets_read, disk_octets_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_octets_write() { + return disk_octets_write; + } + + /** + * + * + * @generated + */ + public void setDisk_octets_write(IncreasingULongMetricAttribute newDisk_octets_write) { + IncreasingULongMetricAttribute oldDisk_octets_write = disk_octets_write; + disk_octets_write = newDisk_octets_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_OCTETS_WRITE, oldDisk_octets_write, disk_octets_write)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_ops_read() { + return disk_ops_read; + } + + /** + * + * + * @generated + */ + public void setDisk_ops_read(IncreasingULongMetricAttribute newDisk_ops_read) { + IncreasingULongMetricAttribute oldDisk_ops_read = disk_ops_read; + disk_ops_read = newDisk_ops_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_OPS_READ, oldDisk_ops_read, disk_ops_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_ops_write() { + return disk_ops_write; + } + + /** + * + * + * @generated + */ + public void setDisk_ops_write(IncreasingULongMetricAttribute newDisk_ops_write) { + IncreasingULongMetricAttribute oldDisk_ops_write = disk_ops_write; + disk_ops_write = newDisk_ops_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_OPS_WRITE, oldDisk_ops_write, disk_ops_write)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_time_read() { + return disk_time_read; + } + + /** + * + * + * @generated + */ + public void setDisk_time_read(IncreasingULongMetricAttribute newDisk_time_read) { + IncreasingULongMetricAttribute oldDisk_time_read = disk_time_read; + disk_time_read = newDisk_time_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_TIME_READ, oldDisk_time_read, disk_time_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_time_write() { + return disk_time_write; + } + + /** + * + * + * @generated + */ + public void setDisk_time_write(IncreasingULongMetricAttribute newDisk_time_write) { + IncreasingULongMetricAttribute oldDisk_time_write = disk_time_write; + disk_time_write = newDisk_time_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_DISK__DISK_TIME_WRITE, oldDisk_time_write, disk_time_write)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_READ: + return getDisk_merged_read(); + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_WRITE: + return getDisk_merged_write(); + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_READ: + return getDisk_octets_read(); + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_WRITE: + return getDisk_octets_write(); + case CollectdPackage.COLLECTD_DISK__DISK_OPS_READ: + return getDisk_ops_read(); + case CollectdPackage.COLLECTD_DISK__DISK_OPS_WRITE: + return getDisk_ops_write(); + case CollectdPackage.COLLECTD_DISK__DISK_TIME_READ: + return getDisk_time_read(); + case CollectdPackage.COLLECTD_DISK__DISK_TIME_WRITE: + return getDisk_time_write(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_READ: + setDisk_merged_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_WRITE: + setDisk_merged_write((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_READ: + setDisk_octets_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_WRITE: + setDisk_octets_write((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OPS_READ: + setDisk_ops_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OPS_WRITE: + setDisk_ops_write((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_TIME_READ: + setDisk_time_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_DISK__DISK_TIME_WRITE: + setDisk_time_write((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_READ: + setDisk_merged_read(DISK_MERGED_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_WRITE: + setDisk_merged_write(DISK_MERGED_WRITE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_READ: + setDisk_octets_read(DISK_OCTETS_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_WRITE: + setDisk_octets_write(DISK_OCTETS_WRITE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OPS_READ: + setDisk_ops_read(DISK_OPS_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_OPS_WRITE: + setDisk_ops_write(DISK_OPS_WRITE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_TIME_READ: + setDisk_time_read(DISK_TIME_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_DISK__DISK_TIME_WRITE: + setDisk_time_write(DISK_TIME_WRITE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_READ: + return DISK_MERGED_READ_EDEFAULT == null ? disk_merged_read != null : !DISK_MERGED_READ_EDEFAULT.equals(disk_merged_read); + case CollectdPackage.COLLECTD_DISK__DISK_MERGED_WRITE: + return DISK_MERGED_WRITE_EDEFAULT == null ? disk_merged_write != null : !DISK_MERGED_WRITE_EDEFAULT.equals(disk_merged_write); + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_READ: + return DISK_OCTETS_READ_EDEFAULT == null ? disk_octets_read != null : !DISK_OCTETS_READ_EDEFAULT.equals(disk_octets_read); + case CollectdPackage.COLLECTD_DISK__DISK_OCTETS_WRITE: + return DISK_OCTETS_WRITE_EDEFAULT == null ? disk_octets_write != null : !DISK_OCTETS_WRITE_EDEFAULT.equals(disk_octets_write); + case CollectdPackage.COLLECTD_DISK__DISK_OPS_READ: + return DISK_OPS_READ_EDEFAULT == null ? disk_ops_read != null : !DISK_OPS_READ_EDEFAULT.equals(disk_ops_read); + case CollectdPackage.COLLECTD_DISK__DISK_OPS_WRITE: + return DISK_OPS_WRITE_EDEFAULT == null ? disk_ops_write != null : !DISK_OPS_WRITE_EDEFAULT.equals(disk_ops_write); + case CollectdPackage.COLLECTD_DISK__DISK_TIME_READ: + return DISK_TIME_READ_EDEFAULT == null ? disk_time_read != null : !DISK_TIME_READ_EDEFAULT.equals(disk_time_read); + case CollectdPackage.COLLECTD_DISK__DISK_TIME_WRITE: + return DISK_TIME_WRITE_EDEFAULT == null ? disk_time_write != null : !DISK_TIME_WRITE_EDEFAULT.equals(disk_time_write); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_DISK__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_DISK__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_DISK__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (disk_merged_read: "); + result.append(disk_merged_read); + result.append(", disk_merged_write: "); + result.append(disk_merged_write); + result.append(", disk_octets_read: "); + result.append(disk_octets_read); + result.append(", disk_octets_write: "); + result.append(disk_octets_write); + result.append(", disk_ops_read: "); + result.append(disk_ops_read); + result.append(", disk_ops_write: "); + result.append(disk_ops_write); + result.append(", disk_time_read: "); + result.append(disk_time_read); + result.append(", disk_time_write: "); + result.append(disk_time_write); + result.append(')'); + return result.toString(); + } + +} //CollectdDiskImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFactoryImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFactoryImpl.java new file mode 100644 index 0000000..9b47ef8 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFactoryImpl.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.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CollectdFactoryImpl extends EFactoryImpl implements CollectdFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CollectdFactory init() { + try { + CollectdFactory theCollectdFactory = (CollectdFactory)EPackage.Registry.INSTANCE.getEFactory(CollectdPackage.eNS_URI); + if (theCollectdFactory != null) { + return theCollectdFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CollectdFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CollectdFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CollectdPackage.COLLECTD_SERVER: return createCollectdServer(); + case CollectdPackage.COLLECTD_MEMORY: return createCollectdMemory(); + case CollectdPackage.COLLECTD_SWAP: return createCollectdSwap(); + case CollectdPackage.COLLECTD_PROCESSES: return createCollectdProcesses(); + case CollectdPackage.COLLECTD_VMEM: return createCollectdVmem(); + case CollectdPackage.COLLECTD_CPU: return createCollectdCpu(); + case CollectdPackage.COLLECTD_DISK: return createCollectdDisk(); + case CollectdPackage.COLLECTD_FILE_SYSTEM: return createCollectdFileSystem(); + case CollectdPackage.COLLECTD_INTERFACE: return createCollectdInterface(); + case CollectdPackage.COLLECTD_KVM_INSTANCE: return createCollectdKvmInstance(); + case CollectdPackage.COLLECTD_KVM_DISK: return createCollectdKvmDisk(); + case CollectdPackage.COLLECTD_KVM_INTERFACE: return createCollectdKvmInterface(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public CollectdServer createCollectdServer() { + CollectdServerImpl collectdServer = new CollectdServerImpl(); + return collectdServer; + } + + /** + * + * + * @generated + */ + public CollectdMemory createCollectdMemory() { + CollectdMemoryImpl collectdMemory = new CollectdMemoryImpl(); + return collectdMemory; + } + + /** + * + * + * @generated + */ + public CollectdSwap createCollectdSwap() { + CollectdSwapImpl collectdSwap = new CollectdSwapImpl(); + return collectdSwap; + } + + /** + * + * + * @generated + */ + public CollectdProcesses createCollectdProcesses() { + CollectdProcessesImpl collectdProcesses = new CollectdProcessesImpl(); + return collectdProcesses; + } + + /** + * + * + * @generated + */ + public CollectdVmem createCollectdVmem() { + CollectdVmemImpl collectdVmem = new CollectdVmemImpl(); + return collectdVmem; + } + + /** + * + * + * @generated + */ + public CollectdCpu createCollectdCpu() { + CollectdCpuImpl collectdCpu = new CollectdCpuImpl(); + return collectdCpu; + } + + /** + * + * + * @generated + */ + public CollectdDisk createCollectdDisk() { + CollectdDiskImpl collectdDisk = new CollectdDiskImpl(); + return collectdDisk; + } + + /** + * + * + * @generated + */ + public CollectdFileSystem createCollectdFileSystem() { + CollectdFileSystemImpl collectdFileSystem = new CollectdFileSystemImpl(); + return collectdFileSystem; + } + + /** + * + * + * @generated + */ + public CollectdInterface createCollectdInterface() { + CollectdInterfaceImpl collectdInterface = new CollectdInterfaceImpl(); + return collectdInterface; + } + + /** + * + * + * @generated + */ + public CollectdKvmInstance createCollectdKvmInstance() { + CollectdKvmInstanceImpl collectdKvmInstance = new CollectdKvmInstanceImpl(); + return collectdKvmInstance; + } + + /** + * + * + * @generated + */ + public CollectdKvmDisk createCollectdKvmDisk() { + CollectdKvmDiskImpl collectdKvmDisk = new CollectdKvmDiskImpl(); + return collectdKvmDisk; + } + + /** + * + * + * @generated + */ + public CollectdKvmInterface createCollectdKvmInterface() { + CollectdKvmInterfaceImpl collectdKvmInterface = new CollectdKvmInterfaceImpl(); + return collectdKvmInterface; + } + + /** + * + * + * @generated + */ + public CollectdPackage getCollectdPackage() { + return (CollectdPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CollectdPackage getPackage() { + return CollectdPackage.eINSTANCE; + } + +} //CollectdFactoryImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFileSystemImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFileSystemImpl.java new file mode 100644 index 0000000..3f7d6a4 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdFileSystemImpl.java @@ -0,0 +1,398 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'File System'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl#getUsed Used}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdFileSystemImpl#getFree Free}
  • + *
+ *

+ * + * @generated + */ +public class CollectdFileSystemImpl extends NamedEntityImpl implements CollectdFileSystem { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute USED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected DoubleMetricAttribute used = USED_EDEFAULT; + + /** + * The default value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute FREE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected DoubleMetricAttribute free = FREE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdFileSystemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_FILE_SYSTEM; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getUsed() { + return used; + } + + /** + * + * + * @generated + */ + public void setUsed(DoubleMetricAttribute newUsed) { + DoubleMetricAttribute oldUsed = used; + used = newUsed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_FILE_SYSTEM__USED, oldUsed, used)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getFree() { + return free; + } + + /** + * + * + * @generated + */ + public void setFree(DoubleMetricAttribute newFree) { + DoubleMetricAttribute oldFree = free; + free = newFree; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_FILE_SYSTEM__FREE, oldFree, free)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_FILE_SYSTEM__USED: + return getUsed(); + case CollectdPackage.COLLECTD_FILE_SYSTEM__FREE: + return getFree(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__USED: + setUsed((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__FREE: + setFree((DoubleMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__USED: + setUsed(USED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_FILE_SYSTEM__FREE: + setFree(FREE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_FILE_SYSTEM__USED: + return USED_EDEFAULT == null ? used != null : !USED_EDEFAULT.equals(used); + case CollectdPackage.COLLECTD_FILE_SYSTEM__FREE: + return FREE_EDEFAULT == null ? free != null : !FREE_EDEFAULT.equals(free); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_FILE_SYSTEM__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (used: "); + result.append(used); + result.append(", free: "); + result.append(free); + result.append(')'); + return result.toString(); + } + +} //CollectdFileSystemImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdInterfaceImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdInterfaceImpl.java new file mode 100644 index 0000000..8b26b29 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdInterfaceImpl.java @@ -0,0 +1,614 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Interface'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_errors_rx If errors rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_errors_tx If errors tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_octets_rx If octets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_octets_tx If octets tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_packets_rx If packets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdInterfaceImpl#getIf_packets_tx If packets tx}
  • + *
+ *

+ * + * @generated + */ +public class CollectdInterfaceImpl extends NamedEntityImpl implements CollectdInterface { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getIf_errors_rx() If errors rx}' attribute. + * + * + * @see #getIf_errors_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_ERRORS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_errors_rx() If errors rx}' attribute. + * + * + * @see #getIf_errors_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_errors_rx = IF_ERRORS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_errors_tx() If errors tx}' attribute. + * + * + * @see #getIf_errors_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_ERRORS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_errors_tx() If errors tx}' attribute. + * + * + * @see #getIf_errors_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_errors_tx = IF_ERRORS_TX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_octets_rx() If octets rx}' attribute. + * + * + * @see #getIf_octets_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_OCTETS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_octets_rx() If octets rx}' attribute. + * + * + * @see #getIf_octets_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_octets_rx = IF_OCTETS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_octets_tx() If octets tx}' attribute. + * + * + * @see #getIf_octets_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_OCTETS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_octets_tx() If octets tx}' attribute. + * + * + * @see #getIf_octets_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_octets_tx = IF_OCTETS_TX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_packets_rx() If packets rx}' attribute. + * + * + * @see #getIf_packets_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_PACKETS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_packets_rx() If packets rx}' attribute. + * + * + * @see #getIf_packets_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_packets_rx = IF_PACKETS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_packets_tx() If packets tx}' attribute. + * + * + * @see #getIf_packets_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_PACKETS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_packets_tx() If packets tx}' attribute. + * + * + * @see #getIf_packets_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_packets_tx = IF_PACKETS_TX_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdInterfaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_INTERFACE; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_INTERFACE__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_errors_rx() { + return if_errors_rx; + } + + /** + * + * + * @generated + */ + public void setIf_errors_rx(IncreasingULongMetricAttribute newIf_errors_rx) { + IncreasingULongMetricAttribute oldIf_errors_rx = if_errors_rx; + if_errors_rx = newIf_errors_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_RX, oldIf_errors_rx, if_errors_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_errors_tx() { + return if_errors_tx; + } + + /** + * + * + * @generated + */ + public void setIf_errors_tx(IncreasingULongMetricAttribute newIf_errors_tx) { + IncreasingULongMetricAttribute oldIf_errors_tx = if_errors_tx; + if_errors_tx = newIf_errors_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_TX, oldIf_errors_tx, if_errors_tx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_octets_rx() { + return if_octets_rx; + } + + /** + * + * + * @generated + */ + public void setIf_octets_rx(IncreasingULongMetricAttribute newIf_octets_rx) { + IncreasingULongMetricAttribute oldIf_octets_rx = if_octets_rx; + if_octets_rx = newIf_octets_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_RX, oldIf_octets_rx, if_octets_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_octets_tx() { + return if_octets_tx; + } + + /** + * + * + * @generated + */ + public void setIf_octets_tx(IncreasingULongMetricAttribute newIf_octets_tx) { + IncreasingULongMetricAttribute oldIf_octets_tx = if_octets_tx; + if_octets_tx = newIf_octets_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_TX, oldIf_octets_tx, if_octets_tx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_packets_rx() { + return if_packets_rx; + } + + /** + * + * + * @generated + */ + public void setIf_packets_rx(IncreasingULongMetricAttribute newIf_packets_rx) { + IncreasingULongMetricAttribute oldIf_packets_rx = if_packets_rx; + if_packets_rx = newIf_packets_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_RX, oldIf_packets_rx, if_packets_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_packets_tx() { + return if_packets_tx; + } + + /** + * + * + * @generated + */ + public void setIf_packets_tx(IncreasingULongMetricAttribute newIf_packets_tx) { + IncreasingULongMetricAttribute oldIf_packets_tx = if_packets_tx; + if_packets_tx = newIf_packets_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_TX, oldIf_packets_tx, if_packets_tx)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_RX: + return getIf_errors_rx(); + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_TX: + return getIf_errors_tx(); + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_RX: + return getIf_octets_rx(); + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_TX: + return getIf_octets_tx(); + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_RX: + return getIf_packets_rx(); + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_TX: + return getIf_packets_tx(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_RX: + setIf_errors_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_TX: + setIf_errors_tx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_RX: + setIf_octets_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_TX: + setIf_octets_tx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_RX: + setIf_packets_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_TX: + setIf_packets_tx((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_RX: + setIf_errors_rx(IF_ERRORS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_TX: + setIf_errors_tx(IF_ERRORS_TX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_RX: + setIf_octets_rx(IF_OCTETS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_TX: + setIf_octets_tx(IF_OCTETS_TX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_RX: + setIf_packets_rx(IF_PACKETS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_TX: + setIf_packets_tx(IF_PACKETS_TX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_RX: + return IF_ERRORS_RX_EDEFAULT == null ? if_errors_rx != null : !IF_ERRORS_RX_EDEFAULT.equals(if_errors_rx); + case CollectdPackage.COLLECTD_INTERFACE__IF_ERRORS_TX: + return IF_ERRORS_TX_EDEFAULT == null ? if_errors_tx != null : !IF_ERRORS_TX_EDEFAULT.equals(if_errors_tx); + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_RX: + return IF_OCTETS_RX_EDEFAULT == null ? if_octets_rx != null : !IF_OCTETS_RX_EDEFAULT.equals(if_octets_rx); + case CollectdPackage.COLLECTD_INTERFACE__IF_OCTETS_TX: + return IF_OCTETS_TX_EDEFAULT == null ? if_octets_tx != null : !IF_OCTETS_TX_EDEFAULT.equals(if_octets_tx); + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_RX: + return IF_PACKETS_RX_EDEFAULT == null ? if_packets_rx != null : !IF_PACKETS_RX_EDEFAULT.equals(if_packets_rx); + case CollectdPackage.COLLECTD_INTERFACE__IF_PACKETS_TX: + return IF_PACKETS_TX_EDEFAULT == null ? if_packets_tx != null : !IF_PACKETS_TX_EDEFAULT.equals(if_packets_tx); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_INTERFACE__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_INTERFACE__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_INTERFACE__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (if_errors_rx: "); + result.append(if_errors_rx); + result.append(", if_errors_tx: "); + result.append(if_errors_tx); + result.append(", if_octets_rx: "); + result.append(if_octets_rx); + result.append(", if_octets_tx: "); + result.append(if_octets_tx); + result.append(", if_packets_rx: "); + result.append(if_packets_rx); + result.append(", if_packets_tx: "); + result.append(if_packets_tx); + result.append(')'); + return result.toString(); + } + +} //CollectdInterfaceImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmDiskImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmDiskImpl.java new file mode 100644 index 0000000..954a91e --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmDiskImpl.java @@ -0,0 +1,506 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Kvm Disk'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getDisk_octets_read Disk octets read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getDisk_octets_write Disk octets write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getDisk_ops_read Disk ops read}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmDiskImpl#getDisk_ops_write Disk ops write}
  • + *
+ *

+ * + * @generated + */ +public class CollectdKvmDiskImpl extends NamedEntityImpl implements CollectdKvmDisk { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getDisk_octets_read() Disk octets read}' attribute. + * + * + * @see #getDisk_octets_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OCTETS_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_octets_read() Disk octets read}' attribute. + * + * + * @see #getDisk_octets_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_octets_read = DISK_OCTETS_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_octets_write() Disk octets write}' attribute. + * + * + * @see #getDisk_octets_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OCTETS_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_octets_write() Disk octets write}' attribute. + * + * + * @see #getDisk_octets_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_octets_write = DISK_OCTETS_WRITE_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_ops_read() Disk ops read}' attribute. + * + * + * @see #getDisk_ops_read() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OPS_READ_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_ops_read() Disk ops read}' attribute. + * + * + * @see #getDisk_ops_read() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_ops_read = DISK_OPS_READ_EDEFAULT; + + /** + * The default value of the '{@link #getDisk_ops_write() Disk ops write}' attribute. + * + * + * @see #getDisk_ops_write() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute DISK_OPS_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDisk_ops_write() Disk ops write}' attribute. + * + * + * @see #getDisk_ops_write() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute disk_ops_write = DISK_OPS_WRITE_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdKvmDiskImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_KVM_DISK; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_KVM_DISK__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_octets_read() { + return disk_octets_read; + } + + /** + * + * + * @generated + */ + public void setDisk_octets_read(IncreasingULongMetricAttribute newDisk_octets_read) { + IncreasingULongMetricAttribute oldDisk_octets_read = disk_octets_read; + disk_octets_read = newDisk_octets_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_READ, oldDisk_octets_read, disk_octets_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_octets_write() { + return disk_octets_write; + } + + /** + * + * + * @generated + */ + public void setDisk_octets_write(IncreasingULongMetricAttribute newDisk_octets_write) { + IncreasingULongMetricAttribute oldDisk_octets_write = disk_octets_write; + disk_octets_write = newDisk_octets_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_WRITE, oldDisk_octets_write, disk_octets_write)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_ops_read() { + return disk_ops_read; + } + + /** + * + * + * @generated + */ + public void setDisk_ops_read(IncreasingULongMetricAttribute newDisk_ops_read) { + IncreasingULongMetricAttribute oldDisk_ops_read = disk_ops_read; + disk_ops_read = newDisk_ops_read; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_READ, oldDisk_ops_read, disk_ops_read)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getDisk_ops_write() { + return disk_ops_write; + } + + /** + * + * + * @generated + */ + public void setDisk_ops_write(IncreasingULongMetricAttribute newDisk_ops_write) { + IncreasingULongMetricAttribute oldDisk_ops_write = disk_ops_write; + disk_ops_write = newDisk_ops_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_WRITE, oldDisk_ops_write, disk_ops_write)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_READ: + return getDisk_octets_read(); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_WRITE: + return getDisk_octets_write(); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_READ: + return getDisk_ops_read(); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_WRITE: + return getDisk_ops_write(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_READ: + setDisk_octets_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_WRITE: + setDisk_octets_write((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_READ: + setDisk_ops_read((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_WRITE: + setDisk_ops_write((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_READ: + setDisk_octets_read(DISK_OCTETS_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_WRITE: + setDisk_octets_write(DISK_OCTETS_WRITE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_READ: + setDisk_ops_read(DISK_OPS_READ_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_WRITE: + setDisk_ops_write(DISK_OPS_WRITE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_READ: + return DISK_OCTETS_READ_EDEFAULT == null ? disk_octets_read != null : !DISK_OCTETS_READ_EDEFAULT.equals(disk_octets_read); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OCTETS_WRITE: + return DISK_OCTETS_WRITE_EDEFAULT == null ? disk_octets_write != null : !DISK_OCTETS_WRITE_EDEFAULT.equals(disk_octets_write); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_READ: + return DISK_OPS_READ_EDEFAULT == null ? disk_ops_read != null : !DISK_OPS_READ_EDEFAULT.equals(disk_ops_read); + case CollectdPackage.COLLECTD_KVM_DISK__DISK_OPS_WRITE: + return DISK_OPS_WRITE_EDEFAULT == null ? disk_ops_write != null : !DISK_OPS_WRITE_EDEFAULT.equals(disk_ops_write); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_KVM_DISK__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_KVM_DISK__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_KVM_DISK__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (disk_octets_read: "); + result.append(disk_octets_read); + result.append(", disk_octets_write: "); + result.append(disk_octets_write); + result.append(", disk_ops_read: "); + result.append(disk_ops_read); + result.append(", disk_ops_write: "); + result.append(disk_ops_write); + result.append(')'); + return result.toString(); + } + +} //CollectdKvmDiskImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInstanceImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInstanceImpl.java new file mode 100644 index 0000000..997c6aa --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInstanceImpl.java @@ -0,0 +1,418 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Kvm Instance'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl#getVirt_cpu_total Virt cpu total}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl#getDisks Disks}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInstanceImpl#getInterfaces Interfaces}
  • + *
+ *

+ * + * @generated + */ +public class CollectdKvmInstanceImpl extends NamedEntityImpl implements CollectdKvmInstance { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getVirt_cpu_total() Virt cpu total}' attribute. + * + * + * @see #getVirt_cpu_total() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute VIRT_CPU_TOTAL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVirt_cpu_total() Virt cpu total}' attribute. + * + * + * @see #getVirt_cpu_total() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute virt_cpu_total = VIRT_CPU_TOTAL_EDEFAULT; + + /** + * The cached value of the '{@link #getDisks() Disks}' containment reference list. + * + * + * @see #getDisks() + * @generated + * @ordered + */ + protected EList disks; + + /** + * The cached value of the '{@link #getInterfaces() Interfaces}' containment reference list. + * + * + * @see #getInterfaces() + * @generated + * @ordered + */ + protected EList interfaces; + + /** + * + * + * @generated + */ + protected CollectdKvmInstanceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_KVM_INSTANCE; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getVirt_cpu_total() { + return virt_cpu_total; + } + + /** + * + * + * @generated + */ + public void setVirt_cpu_total(IncreasingULongMetricAttribute newVirt_cpu_total) { + IncreasingULongMetricAttribute oldVirt_cpu_total = virt_cpu_total; + virt_cpu_total = newVirt_cpu_total; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL, oldVirt_cpu_total, virt_cpu_total)); + } + + /** + * + * + * @generated + */ + public EList getDisks() { + if (disks == null) { + disks = new EObjectContainmentEList(CollectdKvmDisk.class, this, CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS); + } + return disks; + } + + /** + * + * + * @generated + */ + public EList getInterfaces() { + if (interfaces == null) { + interfaces = new EObjectContainmentEList(CollectdKvmInterface.class, this, CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES); + } + return interfaces; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS: + return ((InternalEList)getDisks()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES: + return ((InternalEList)getInterfaces()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL: + return getVirt_cpu_total(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS: + return getDisks(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES: + return getInterfaces(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL: + setVirt_cpu_total((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS: + getDisks().clear(); + getDisks().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES: + getInterfaces().clear(); + getInterfaces().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL: + setVirt_cpu_total(VIRT_CPU_TOTAL_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS: + getDisks().clear(); + return; + case CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES: + getInterfaces().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL: + return VIRT_CPU_TOTAL_EDEFAULT == null ? virt_cpu_total != null : !VIRT_CPU_TOTAL_EDEFAULT.equals(virt_cpu_total); + case CollectdPackage.COLLECTD_KVM_INSTANCE__DISKS: + return disks != null && !disks.isEmpty(); + case CollectdPackage.COLLECTD_KVM_INSTANCE__INTERFACES: + return interfaces != null && !interfaces.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_KVM_INSTANCE__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (virt_cpu_total: "); + result.append(virt_cpu_total); + result.append(')'); + return result.toString(); + } + +} //CollectdKvmInstanceImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInterfaceImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInterfaceImpl.java new file mode 100644 index 0000000..b879890 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdKvmInterfaceImpl.java @@ -0,0 +1,722 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Kvm Interface'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_errors_rx If errors rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_errors_tx If errors tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_dropped_rx If dropped rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_dropped_tx If dropped tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_octets_rx If octets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_octets_tx If octets tx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_packets_rx If packets rx}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdKvmInterfaceImpl#getIf_packets_tx If packets tx}
  • + *
+ *

+ * + * @generated + */ +public class CollectdKvmInterfaceImpl extends NamedEntityImpl implements CollectdKvmInterface { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getIf_errors_rx() If errors rx}' attribute. + * + * + * @see #getIf_errors_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_ERRORS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_errors_rx() If errors rx}' attribute. + * + * + * @see #getIf_errors_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_errors_rx = IF_ERRORS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_errors_tx() If errors tx}' attribute. + * + * + * @see #getIf_errors_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_ERRORS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_errors_tx() If errors tx}' attribute. + * + * + * @see #getIf_errors_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_errors_tx = IF_ERRORS_TX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_dropped_rx() If dropped rx}' attribute. + * + * + * @see #getIf_dropped_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_DROPPED_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_dropped_rx() If dropped rx}' attribute. + * + * + * @see #getIf_dropped_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_dropped_rx = IF_DROPPED_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_dropped_tx() If dropped tx}' attribute. + * + * + * @see #getIf_dropped_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_DROPPED_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_dropped_tx() If dropped tx}' attribute. + * + * + * @see #getIf_dropped_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_dropped_tx = IF_DROPPED_TX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_octets_rx() If octets rx}' attribute. + * + * + * @see #getIf_octets_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_OCTETS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_octets_rx() If octets rx}' attribute. + * + * + * @see #getIf_octets_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_octets_rx = IF_OCTETS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_octets_tx() If octets tx}' attribute. + * + * + * @see #getIf_octets_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_OCTETS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_octets_tx() If octets tx}' attribute. + * + * + * @see #getIf_octets_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_octets_tx = IF_OCTETS_TX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_packets_rx() If packets rx}' attribute. + * + * + * @see #getIf_packets_rx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_PACKETS_RX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_packets_rx() If packets rx}' attribute. + * + * + * @see #getIf_packets_rx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_packets_rx = IF_PACKETS_RX_EDEFAULT; + + /** + * The default value of the '{@link #getIf_packets_tx() If packets tx}' attribute. + * + * + * @see #getIf_packets_tx() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute IF_PACKETS_TX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIf_packets_tx() If packets tx}' attribute. + * + * + * @see #getIf_packets_tx() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute if_packets_tx = IF_PACKETS_TX_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdKvmInterfaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_KVM_INTERFACE; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_errors_rx() { + return if_errors_rx; + } + + /** + * + * + * @generated + */ + public void setIf_errors_rx(IncreasingULongMetricAttribute newIf_errors_rx) { + IncreasingULongMetricAttribute oldIf_errors_rx = if_errors_rx; + if_errors_rx = newIf_errors_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_RX, oldIf_errors_rx, if_errors_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_errors_tx() { + return if_errors_tx; + } + + /** + * + * + * @generated + */ + public void setIf_errors_tx(IncreasingULongMetricAttribute newIf_errors_tx) { + IncreasingULongMetricAttribute oldIf_errors_tx = if_errors_tx; + if_errors_tx = newIf_errors_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_TX, oldIf_errors_tx, if_errors_tx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_dropped_rx() { + return if_dropped_rx; + } + + /** + * + * + * @generated + */ + public void setIf_dropped_rx(IncreasingULongMetricAttribute newIf_dropped_rx) { + IncreasingULongMetricAttribute oldIf_dropped_rx = if_dropped_rx; + if_dropped_rx = newIf_dropped_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_RX, oldIf_dropped_rx, if_dropped_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_dropped_tx() { + return if_dropped_tx; + } + + /** + * + * + * @generated + */ + public void setIf_dropped_tx(IncreasingULongMetricAttribute newIf_dropped_tx) { + IncreasingULongMetricAttribute oldIf_dropped_tx = if_dropped_tx; + if_dropped_tx = newIf_dropped_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_TX, oldIf_dropped_tx, if_dropped_tx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_octets_rx() { + return if_octets_rx; + } + + /** + * + * + * @generated + */ + public void setIf_octets_rx(IncreasingULongMetricAttribute newIf_octets_rx) { + IncreasingULongMetricAttribute oldIf_octets_rx = if_octets_rx; + if_octets_rx = newIf_octets_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_RX, oldIf_octets_rx, if_octets_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_octets_tx() { + return if_octets_tx; + } + + /** + * + * + * @generated + */ + public void setIf_octets_tx(IncreasingULongMetricAttribute newIf_octets_tx) { + IncreasingULongMetricAttribute oldIf_octets_tx = if_octets_tx; + if_octets_tx = newIf_octets_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_TX, oldIf_octets_tx, if_octets_tx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_packets_rx() { + return if_packets_rx; + } + + /** + * + * + * @generated + */ + public void setIf_packets_rx(IncreasingULongMetricAttribute newIf_packets_rx) { + IncreasingULongMetricAttribute oldIf_packets_rx = if_packets_rx; + if_packets_rx = newIf_packets_rx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_RX, oldIf_packets_rx, if_packets_rx)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getIf_packets_tx() { + return if_packets_tx; + } + + /** + * + * + * @generated + */ + public void setIf_packets_tx(IncreasingULongMetricAttribute newIf_packets_tx) { + IncreasingULongMetricAttribute oldIf_packets_tx = if_packets_tx; + if_packets_tx = newIf_packets_tx; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_TX, oldIf_packets_tx, if_packets_tx)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_RX: + return getIf_errors_rx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_TX: + return getIf_errors_tx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_RX: + return getIf_dropped_rx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_TX: + return getIf_dropped_tx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_RX: + return getIf_octets_rx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_TX: + return getIf_octets_tx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_RX: + return getIf_packets_rx(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_TX: + return getIf_packets_tx(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_RX: + setIf_errors_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_TX: + setIf_errors_tx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_RX: + setIf_dropped_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_TX: + setIf_dropped_tx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_RX: + setIf_octets_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_TX: + setIf_octets_tx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_RX: + setIf_packets_rx((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_TX: + setIf_packets_tx((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_RX: + setIf_errors_rx(IF_ERRORS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_TX: + setIf_errors_tx(IF_ERRORS_TX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_RX: + setIf_dropped_rx(IF_DROPPED_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_TX: + setIf_dropped_tx(IF_DROPPED_TX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_RX: + setIf_octets_rx(IF_OCTETS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_TX: + setIf_octets_tx(IF_OCTETS_TX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_RX: + setIf_packets_rx(IF_PACKETS_RX_EDEFAULT); + return; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_TX: + setIf_packets_tx(IF_PACKETS_TX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_RX: + return IF_ERRORS_RX_EDEFAULT == null ? if_errors_rx != null : !IF_ERRORS_RX_EDEFAULT.equals(if_errors_rx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_ERRORS_TX: + return IF_ERRORS_TX_EDEFAULT == null ? if_errors_tx != null : !IF_ERRORS_TX_EDEFAULT.equals(if_errors_tx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_RX: + return IF_DROPPED_RX_EDEFAULT == null ? if_dropped_rx != null : !IF_DROPPED_RX_EDEFAULT.equals(if_dropped_rx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_DROPPED_TX: + return IF_DROPPED_TX_EDEFAULT == null ? if_dropped_tx != null : !IF_DROPPED_TX_EDEFAULT.equals(if_dropped_tx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_RX: + return IF_OCTETS_RX_EDEFAULT == null ? if_octets_rx != null : !IF_OCTETS_RX_EDEFAULT.equals(if_octets_rx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_OCTETS_TX: + return IF_OCTETS_TX_EDEFAULT == null ? if_octets_tx != null : !IF_OCTETS_TX_EDEFAULT.equals(if_octets_tx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_RX: + return IF_PACKETS_RX_EDEFAULT == null ? if_packets_rx != null : !IF_PACKETS_RX_EDEFAULT.equals(if_packets_rx); + case CollectdPackage.COLLECTD_KVM_INTERFACE__IF_PACKETS_TX: + return IF_PACKETS_TX_EDEFAULT == null ? if_packets_tx != null : !IF_PACKETS_TX_EDEFAULT.equals(if_packets_tx); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_KVM_INTERFACE__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (if_errors_rx: "); + result.append(if_errors_rx); + result.append(", if_errors_tx: "); + result.append(if_errors_tx); + result.append(", if_dropped_rx: "); + result.append(if_dropped_rx); + result.append(", if_dropped_tx: "); + result.append(if_dropped_tx); + result.append(", if_octets_rx: "); + result.append(if_octets_rx); + result.append(", if_octets_tx: "); + result.append(if_octets_tx); + result.append(", if_packets_rx: "); + result.append(if_packets_rx); + result.append(", if_packets_tx: "); + result.append(if_packets_tx); + result.append(')'); + return result.toString(); + } + +} //CollectdKvmInterfaceImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdMemoryImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdMemoryImpl.java new file mode 100644 index 0000000..7813084 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdMemoryImpl.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.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Memory'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl#getBuffered Buffered}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl#getCached Cached}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl#getFree Free}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdMemoryImpl#getUsed Used}
  • + *
+ *

+ * + * @generated + */ +public class CollectdMemoryImpl extends MinimalEObjectImpl.Container implements CollectdMemory { + /** + * The default value of the '{@link #getBuffered() Buffered}' attribute. + * + * + * @see #getBuffered() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute BUFFERED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBuffered() Buffered}' attribute. + * + * + * @see #getBuffered() + * @generated + * @ordered + */ + protected DoubleMetricAttribute buffered = BUFFERED_EDEFAULT; + + /** + * The default value of the '{@link #getCached() Cached}' attribute. + * + * + * @see #getCached() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute CACHED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCached() Cached}' attribute. + * + * + * @see #getCached() + * @generated + * @ordered + */ + protected DoubleMetricAttribute cached = CACHED_EDEFAULT; + + /** + * The default value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute FREE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected DoubleMetricAttribute free = FREE_EDEFAULT; + + /** + * The default value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute USED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected DoubleMetricAttribute used = USED_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdMemoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_MEMORY; + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getBuffered() { + return buffered; + } + + /** + * + * + * @generated + */ + public void setBuffered(DoubleMetricAttribute newBuffered) { + DoubleMetricAttribute oldBuffered = buffered; + buffered = newBuffered; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_MEMORY__BUFFERED, oldBuffered, buffered)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getCached() { + return cached; + } + + /** + * + * + * @generated + */ + public void setCached(DoubleMetricAttribute newCached) { + DoubleMetricAttribute oldCached = cached; + cached = newCached; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_MEMORY__CACHED, oldCached, cached)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getFree() { + return free; + } + + /** + * + * + * @generated + */ + public void setFree(DoubleMetricAttribute newFree) { + DoubleMetricAttribute oldFree = free; + free = newFree; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_MEMORY__FREE, oldFree, free)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getUsed() { + return used; + } + + /** + * + * + * @generated + */ + public void setUsed(DoubleMetricAttribute newUsed) { + DoubleMetricAttribute oldUsed = used; + used = newUsed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_MEMORY__USED, oldUsed, used)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_MEMORY__BUFFERED: + return getBuffered(); + case CollectdPackage.COLLECTD_MEMORY__CACHED: + return getCached(); + case CollectdPackage.COLLECTD_MEMORY__FREE: + return getFree(); + case CollectdPackage.COLLECTD_MEMORY__USED: + return getUsed(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_MEMORY__BUFFERED: + setBuffered((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_MEMORY__CACHED: + setCached((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_MEMORY__FREE: + setFree((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_MEMORY__USED: + setUsed((DoubleMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_MEMORY__BUFFERED: + setBuffered(BUFFERED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_MEMORY__CACHED: + setCached(CACHED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_MEMORY__FREE: + setFree(FREE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_MEMORY__USED: + setUsed(USED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_MEMORY__BUFFERED: + return BUFFERED_EDEFAULT == null ? buffered != null : !BUFFERED_EDEFAULT.equals(buffered); + case CollectdPackage.COLLECTD_MEMORY__CACHED: + return CACHED_EDEFAULT == null ? cached != null : !CACHED_EDEFAULT.equals(cached); + case CollectdPackage.COLLECTD_MEMORY__FREE: + return FREE_EDEFAULT == null ? free != null : !FREE_EDEFAULT.equals(free); + case CollectdPackage.COLLECTD_MEMORY__USED: + return USED_EDEFAULT == null ? used != null : !USED_EDEFAULT.equals(used); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (buffered: "); + result.append(buffered); + result.append(", cached: "); + result.append(cached); + result.append(", free: "); + result.append(free); + result.append(", used: "); + result.append(used); + result.append(')'); + return result.toString(); + } + +} //CollectdMemoryImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdPackageImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdPackageImpl.java new file mode 100644 index 0000000..8c78ec6 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdPackageImpl.java @@ -0,0 +1,1562 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.alerts.AlertsPackage; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFactory; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem; + +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.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CollectdPackageImpl extends EPackageImpl implements CollectdPackage { + /** + * + * + * @generated + */ + private EClass collectdServerEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdMemoryEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdSwapEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdProcessesEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdVmemEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdCpuEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdDiskEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdFileSystemEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdInterfaceEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdKvmInstanceEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdKvmDiskEClass = null; + + /** + * + * + * @generated + */ + private EClass collectdKvmInterfaceEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link CollectdPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CollectdPackage init() { + if (isInited) return (CollectdPackage)EPackage.Registry.INSTANCE.getEPackage(CollectdPackage.eNS_URI); + + // Obtain or create and register package + CollectdPackageImpl theCollectdPackage = (CollectdPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CollectdPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CollectdPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + AlertsPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCollectdPackage.createPackageContents(); + + // Initialize created meta-data + theCollectdPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCollectdPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CollectdPackage.eNS_URI, theCollectdPackage); + return theCollectdPackage; + } + + /** + * + * + * @generated + */ + public EClass getCollectdServer() { + return collectdServerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdServer_Load_shortterm() { + return (EAttribute)collectdServerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdServer_Load_midterm() { + return (EAttribute)collectdServerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdServer_Load_longterm() { + return (EAttribute)collectdServerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdServer_Entropy() { + return (EAttribute)collectdServerEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdServer_Contextswitches() { + return (EAttribute)collectdServerEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Cpus() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Memory() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Swap() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Processes() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Vmem() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Filesystems() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Disks() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Interfaces() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EReference getCollectdServer_Instances() { + return (EReference)collectdServerEClass.getEStructuralFeatures().get(13); + } + + /** + * + * + * @generated + */ + public EClass getCollectdMemory() { + return collectdMemoryEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdMemory_Buffered() { + return (EAttribute)collectdMemoryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdMemory_Cached() { + return (EAttribute)collectdMemoryEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdMemory_Free() { + return (EAttribute)collectdMemoryEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdMemory_Used() { + return (EAttribute)collectdMemoryEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getCollectdSwap() { + return collectdSwapEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdSwap_Cached() { + return (EAttribute)collectdSwapEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdSwap_Free() { + return (EAttribute)collectdSwapEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdSwap_Used() { + return (EAttribute)collectdSwapEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getCollectdProcesses() { + return collectdProcessesEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Fork_rate() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Blocked() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Paging() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Running() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Sleeping() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Stopped() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdProcesses_Zombies() { + return (EAttribute)collectdProcessesEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getCollectdVmem() { + return collectdVmemEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Active_anon() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Active_file() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Anon_pages() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Anon_transparent_hugepages() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Bounce() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Dirtied() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Dirty() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Dirty_background_threshold() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Dirty_threshold() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_File_pages() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Free_pages() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(10); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Inactive_anon() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Inactive_file() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(12); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Isolated_anon() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(13); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Isolated_file() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(14); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Kernel_stack() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(15); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Mapped() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(16); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Mlock() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(17); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Page_table_pages() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(18); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Shmem() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(19); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Slab_reclaimable() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(20); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Slab_unreclaimable() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(21); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Unevictable() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(22); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Unstable() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(23); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Vmscan_immediate_reclaim() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(24); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Vmscan_write() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(25); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Writeback() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(26); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Writeback_temp() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(27); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Written() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(28); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Memory_in() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(29); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Memory_out() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(30); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Swap_in() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(31); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Swap_out() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(32); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Faults_minor() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(33); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdVmem_Faults_major() { + return (EAttribute)collectdVmemEClass.getEStructuralFeatures().get(34); + } + + /** + * + * + * @generated + */ + public EClass getCollectdCpu() { + return collectdCpuEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdCpu_Idle() { + return (EAttribute)collectdCpuEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdCpu_Wait() { + return (EAttribute)collectdCpuEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdCpu_User() { + return (EAttribute)collectdCpuEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdCpu_System() { + return (EAttribute)collectdCpuEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getCollectdDisk() { + return collectdDiskEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_merged_read() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_merged_write() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_octets_read() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_octets_write() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_ops_read() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_ops_write() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_time_read() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdDisk_Disk_time_write() { + return (EAttribute)collectdDiskEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EClass getCollectdFileSystem() { + return collectdFileSystemEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdFileSystem_Used() { + return (EAttribute)collectdFileSystemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdFileSystem_Free() { + return (EAttribute)collectdFileSystemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getCollectdInterface() { + return collectdInterfaceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_errors_rx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_errors_tx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_octets_rx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_octets_tx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_packets_rx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdInterface_If_packets_tx() { + return (EAttribute)collectdInterfaceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getCollectdKvmInstance() { + return collectdKvmInstanceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInstance_Virt_cpu_total() { + return (EAttribute)collectdKvmInstanceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCollectdKvmInstance_Disks() { + return (EReference)collectdKvmInstanceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCollectdKvmInstance_Interfaces() { + return (EReference)collectdKvmInstanceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getCollectdKvmDisk() { + return collectdKvmDiskEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmDisk_Disk_octets_read() { + return (EAttribute)collectdKvmDiskEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmDisk_Disk_octets_write() { + return (EAttribute)collectdKvmDiskEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmDisk_Disk_ops_read() { + return (EAttribute)collectdKvmDiskEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmDisk_Disk_ops_write() { + return (EAttribute)collectdKvmDiskEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getCollectdKvmInterface() { + return collectdKvmInterfaceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_errors_rx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_errors_tx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_dropped_rx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_dropped_tx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_octets_rx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_octets_tx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_packets_rx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getCollectdKvmInterface_If_packets_tx() { + return (EAttribute)collectdKvmInterfaceEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public CollectdFactory getCollectdFactory() { + return (CollectdFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + collectdServerEClass = createEClass(COLLECTD_SERVER); + createEAttribute(collectdServerEClass, COLLECTD_SERVER__LOAD_SHORTTERM); + createEAttribute(collectdServerEClass, COLLECTD_SERVER__LOAD_MIDTERM); + createEAttribute(collectdServerEClass, COLLECTD_SERVER__LOAD_LONGTERM); + createEAttribute(collectdServerEClass, COLLECTD_SERVER__ENTROPY); + createEAttribute(collectdServerEClass, COLLECTD_SERVER__CONTEXTSWITCHES); + createEReference(collectdServerEClass, COLLECTD_SERVER__CPUS); + createEReference(collectdServerEClass, COLLECTD_SERVER__MEMORY); + createEReference(collectdServerEClass, COLLECTD_SERVER__SWAP); + createEReference(collectdServerEClass, COLLECTD_SERVER__PROCESSES); + createEReference(collectdServerEClass, COLLECTD_SERVER__VMEM); + createEReference(collectdServerEClass, COLLECTD_SERVER__FILESYSTEMS); + createEReference(collectdServerEClass, COLLECTD_SERVER__DISKS); + createEReference(collectdServerEClass, COLLECTD_SERVER__INTERFACES); + createEReference(collectdServerEClass, COLLECTD_SERVER__INSTANCES); + + collectdMemoryEClass = createEClass(COLLECTD_MEMORY); + createEAttribute(collectdMemoryEClass, COLLECTD_MEMORY__BUFFERED); + createEAttribute(collectdMemoryEClass, COLLECTD_MEMORY__CACHED); + createEAttribute(collectdMemoryEClass, COLLECTD_MEMORY__FREE); + createEAttribute(collectdMemoryEClass, COLLECTD_MEMORY__USED); + + collectdSwapEClass = createEClass(COLLECTD_SWAP); + createEAttribute(collectdSwapEClass, COLLECTD_SWAP__CACHED); + createEAttribute(collectdSwapEClass, COLLECTD_SWAP__FREE); + createEAttribute(collectdSwapEClass, COLLECTD_SWAP__USED); + + collectdProcessesEClass = createEClass(COLLECTD_PROCESSES); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__FORK_RATE); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__BLOCKED); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__PAGING); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__RUNNING); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__SLEEPING); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__STOPPED); + createEAttribute(collectdProcessesEClass, COLLECTD_PROCESSES__ZOMBIES); + + collectdVmemEClass = createEClass(COLLECTD_VMEM); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ACTIVE_ANON); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ACTIVE_FILE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ANON_PAGES); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__BOUNCE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__DIRTIED); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__DIRTY); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__DIRTY_THRESHOLD); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__FILE_PAGES); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__FREE_PAGES); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__INACTIVE_ANON); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__INACTIVE_FILE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ISOLATED_ANON); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__ISOLATED_FILE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__KERNEL_STACK); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__MAPPED); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__MLOCK); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__PAGE_TABLE_PAGES); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__SHMEM); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__SLAB_RECLAIMABLE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__SLAB_UNRECLAIMABLE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__UNEVICTABLE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__UNSTABLE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__VMSCAN_WRITE); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__WRITEBACK); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__WRITEBACK_TEMP); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__WRITTEN); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__MEMORY_IN); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__MEMORY_OUT); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__SWAP_IN); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__SWAP_OUT); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__FAULTS_MINOR); + createEAttribute(collectdVmemEClass, COLLECTD_VMEM__FAULTS_MAJOR); + + collectdCpuEClass = createEClass(COLLECTD_CPU); + createEAttribute(collectdCpuEClass, COLLECTD_CPU__IDLE); + createEAttribute(collectdCpuEClass, COLLECTD_CPU__WAIT); + createEAttribute(collectdCpuEClass, COLLECTD_CPU__USER); + createEAttribute(collectdCpuEClass, COLLECTD_CPU__SYSTEM); + + collectdDiskEClass = createEClass(COLLECTD_DISK); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_MERGED_READ); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_MERGED_WRITE); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_OCTETS_READ); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_OCTETS_WRITE); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_OPS_READ); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_OPS_WRITE); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_TIME_READ); + createEAttribute(collectdDiskEClass, COLLECTD_DISK__DISK_TIME_WRITE); + + collectdFileSystemEClass = createEClass(COLLECTD_FILE_SYSTEM); + createEAttribute(collectdFileSystemEClass, COLLECTD_FILE_SYSTEM__USED); + createEAttribute(collectdFileSystemEClass, COLLECTD_FILE_SYSTEM__FREE); + + collectdInterfaceEClass = createEClass(COLLECTD_INTERFACE); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_ERRORS_RX); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_ERRORS_TX); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_OCTETS_RX); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_OCTETS_TX); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_PACKETS_RX); + createEAttribute(collectdInterfaceEClass, COLLECTD_INTERFACE__IF_PACKETS_TX); + + collectdKvmInstanceEClass = createEClass(COLLECTD_KVM_INSTANCE); + createEAttribute(collectdKvmInstanceEClass, COLLECTD_KVM_INSTANCE__VIRT_CPU_TOTAL); + createEReference(collectdKvmInstanceEClass, COLLECTD_KVM_INSTANCE__DISKS); + createEReference(collectdKvmInstanceEClass, COLLECTD_KVM_INSTANCE__INTERFACES); + + collectdKvmDiskEClass = createEClass(COLLECTD_KVM_DISK); + createEAttribute(collectdKvmDiskEClass, COLLECTD_KVM_DISK__DISK_OCTETS_READ); + createEAttribute(collectdKvmDiskEClass, COLLECTD_KVM_DISK__DISK_OCTETS_WRITE); + createEAttribute(collectdKvmDiskEClass, COLLECTD_KVM_DISK__DISK_OPS_READ); + createEAttribute(collectdKvmDiskEClass, COLLECTD_KVM_DISK__DISK_OPS_WRITE); + + collectdKvmInterfaceEClass = createEClass(COLLECTD_KVM_INTERFACE); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_ERRORS_RX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_ERRORS_TX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_DROPPED_RX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_DROPPED_TX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_OCTETS_RX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_OCTETS_TX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_PACKETS_RX); + createEAttribute(collectdKvmInterfaceEClass, COLLECTD_KVM_INTERFACE__IF_PACKETS_TX); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + AlertsPackage theAlertsPackage = (AlertsPackage)EPackage.Registry.INSTANCE.getEPackage(AlertsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + collectdServerEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdServerEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdCpuEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdCpuEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdDiskEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdDiskEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdFileSystemEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdFileSystemEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdInterfaceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdInterfaceEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdKvmInstanceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdKvmInstanceEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdKvmDiskEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdKvmDiskEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + collectdKvmInterfaceEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + collectdKvmInterfaceEClass.getESuperTypes().add(theAlertsPackage.getAlertContainer()); + + // Initialize classes, features, and operations; add parameters + initEClass(collectdServerEClass, CollectdServer.class, "CollectdServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdServer_Load_shortterm(), theCorePackage.getDoubleMetricAttribute(), "load_shortterm", null, 0, 1, CollectdServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdServer_Load_midterm(), theCorePackage.getDoubleMetricAttribute(), "load_midterm", null, 0, 1, CollectdServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdServer_Load_longterm(), theCorePackage.getDoubleMetricAttribute(), "load_longterm", null, 0, 1, CollectdServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdServer_Entropy(), theCorePackage.getDoubleMetricAttribute(), "entropy", null, 0, 1, CollectdServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdServer_Contextswitches(), theCorePackage.getIncreasingULongMetricAttribute(), "contextswitches", null, 0, 1, CollectdServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Cpus(), this.getCollectdCpu(), null, "cpus", null, 0, -1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Memory(), this.getCollectdMemory(), null, "memory", null, 0, 1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Swap(), this.getCollectdSwap(), null, "swap", null, 0, 1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Processes(), this.getCollectdProcesses(), null, "processes", null, 0, 1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Vmem(), this.getCollectdVmem(), null, "vmem", null, 0, 1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Filesystems(), this.getCollectdFileSystem(), null, "filesystems", null, 0, -1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Disks(), this.getCollectdDisk(), null, "disks", null, 0, -1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Interfaces(), this.getCollectdInterface(), null, "interfaces", null, 0, -1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdServer_Instances(), this.getCollectdKvmInstance(), null, "instances", null, 0, -1, CollectdServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdMemoryEClass, CollectdMemory.class, "CollectdMemory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdMemory_Buffered(), theCorePackage.getDoubleMetricAttribute(), "buffered", null, 0, 1, CollectdMemory.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdMemory_Cached(), theCorePackage.getDoubleMetricAttribute(), "cached", null, 0, 1, CollectdMemory.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdMemory_Free(), theCorePackage.getDoubleMetricAttribute(), "free", null, 0, 1, CollectdMemory.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdMemory_Used(), theCorePackage.getDoubleMetricAttribute(), "used", null, 0, 1, CollectdMemory.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdSwapEClass, CollectdSwap.class, "CollectdSwap", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdSwap_Cached(), theCorePackage.getDoubleMetricAttribute(), "cached", null, 0, 1, CollectdSwap.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdSwap_Free(), theCorePackage.getDoubleMetricAttribute(), "free", null, 0, 1, CollectdSwap.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdSwap_Used(), theCorePackage.getDoubleMetricAttribute(), "used", null, 0, 1, CollectdSwap.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdProcessesEClass, CollectdProcesses.class, "CollectdProcesses", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdProcesses_Fork_rate(), theCorePackage.getIncreasingULongMetricAttribute(), "fork_rate", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Blocked(), theCorePackage.getDoubleMetricAttribute(), "blocked", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Paging(), theCorePackage.getDoubleMetricAttribute(), "paging", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Running(), theCorePackage.getDoubleMetricAttribute(), "running", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Sleeping(), theCorePackage.getDoubleMetricAttribute(), "sleeping", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Stopped(), theCorePackage.getDoubleMetricAttribute(), "stopped", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdProcesses_Zombies(), theCorePackage.getDoubleMetricAttribute(), "zombies", null, 0, 1, CollectdProcesses.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdVmemEClass, CollectdVmem.class, "CollectdVmem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdVmem_Active_anon(), theCorePackage.getDoubleMetricAttribute(), "active_anon", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Active_file(), theCorePackage.getDoubleMetricAttribute(), "active_file", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Anon_pages(), theCorePackage.getDoubleMetricAttribute(), "anon_pages", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Anon_transparent_hugepages(), theCorePackage.getDoubleMetricAttribute(), "anon_transparent_hugepages", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Bounce(), theCorePackage.getDoubleMetricAttribute(), "bounce", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Dirtied(), theCorePackage.getDoubleMetricAttribute(), "dirtied", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Dirty(), theCorePackage.getDoubleMetricAttribute(), "dirty", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Dirty_background_threshold(), theCorePackage.getDoubleMetricAttribute(), "dirty_background_threshold", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Dirty_threshold(), theCorePackage.getDoubleMetricAttribute(), "dirty_threshold", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_File_pages(), theCorePackage.getDoubleMetricAttribute(), "file_pages", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Free_pages(), theCorePackage.getDoubleMetricAttribute(), "free_pages", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Inactive_anon(), theCorePackage.getDoubleMetricAttribute(), "inactive_anon", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Inactive_file(), theCorePackage.getDoubleMetricAttribute(), "inactive_file", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Isolated_anon(), theCorePackage.getDoubleMetricAttribute(), "isolated_anon", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Isolated_file(), theCorePackage.getDoubleMetricAttribute(), "isolated_file", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Kernel_stack(), theCorePackage.getDoubleMetricAttribute(), "kernel_stack", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Mapped(), theCorePackage.getDoubleMetricAttribute(), "mapped", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Mlock(), theCorePackage.getDoubleMetricAttribute(), "mlock", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Page_table_pages(), theCorePackage.getDoubleMetricAttribute(), "page_table_pages", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Shmem(), theCorePackage.getDoubleMetricAttribute(), "shmem", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Slab_reclaimable(), theCorePackage.getDoubleMetricAttribute(), "slab_reclaimable", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Slab_unreclaimable(), theCorePackage.getDoubleMetricAttribute(), "slab_unreclaimable", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Unevictable(), theCorePackage.getDoubleMetricAttribute(), "unevictable", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Unstable(), theCorePackage.getDoubleMetricAttribute(), "unstable", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Vmscan_immediate_reclaim(), theCorePackage.getDoubleMetricAttribute(), "vmscan_immediate_reclaim", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Vmscan_write(), theCorePackage.getDoubleMetricAttribute(), "vmscan_write", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Writeback(), theCorePackage.getDoubleMetricAttribute(), "writeback", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Writeback_temp(), theCorePackage.getDoubleMetricAttribute(), "writeback_temp", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Written(), theCorePackage.getDoubleMetricAttribute(), "written", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Memory_in(), theCorePackage.getIncreasingULongMetricAttribute(), "memory_in", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Memory_out(), theCorePackage.getIncreasingULongMetricAttribute(), "memory_out", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Swap_in(), theCorePackage.getIncreasingULongMetricAttribute(), "swap_in", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Swap_out(), theCorePackage.getIncreasingULongMetricAttribute(), "swap_out", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Faults_minor(), theCorePackage.getIncreasingULongMetricAttribute(), "faults_minor", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdVmem_Faults_major(), theCorePackage.getIncreasingULongMetricAttribute(), "faults_major", null, 0, 1, CollectdVmem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdCpuEClass, CollectdCpu.class, "CollectdCpu", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdCpu_Idle(), theCorePackage.getIncreasingULongMetricAttribute(), "idle", null, 0, 1, CollectdCpu.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdCpu_Wait(), theCorePackage.getIncreasingULongMetricAttribute(), "wait", null, 0, 1, CollectdCpu.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdCpu_User(), theCorePackage.getIncreasingULongMetricAttribute(), "user", null, 0, 1, CollectdCpu.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdCpu_System(), theCorePackage.getIncreasingULongMetricAttribute(), "system", null, 0, 1, CollectdCpu.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdDiskEClass, CollectdDisk.class, "CollectdDisk", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdDisk_Disk_merged_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_merged_read", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_merged_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_merged_write", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_octets_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_octets_read", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_octets_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_octets_write", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_ops_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_ops_read", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_ops_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_ops_write", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_time_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_time_read", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdDisk_Disk_time_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_time_write", null, 0, 1, CollectdDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdFileSystemEClass, CollectdFileSystem.class, "CollectdFileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdFileSystem_Used(), theCorePackage.getDoubleMetricAttribute(), "used", null, 0, 1, CollectdFileSystem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdFileSystem_Free(), theCorePackage.getDoubleMetricAttribute(), "free", null, 0, 1, CollectdFileSystem.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdInterfaceEClass, CollectdInterface.class, "CollectdInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdInterface_If_errors_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_errors_rx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdInterface_If_errors_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_errors_tx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdInterface_If_octets_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_octets_rx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdInterface_If_octets_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_octets_tx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdInterface_If_packets_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_packets_rx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdInterface_If_packets_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_packets_tx", null, 0, 1, CollectdInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdKvmInstanceEClass, CollectdKvmInstance.class, "CollectdKvmInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdKvmInstance_Virt_cpu_total(), theCorePackage.getIncreasingULongMetricAttribute(), "virt_cpu_total", null, 0, 1, CollectdKvmInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdKvmInstance_Disks(), this.getCollectdKvmDisk(), null, "disks", null, 0, -1, CollectdKvmInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCollectdKvmInstance_Interfaces(), this.getCollectdKvmInterface(), null, "interfaces", null, 0, -1, CollectdKvmInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdKvmDiskEClass, CollectdKvmDisk.class, "CollectdKvmDisk", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdKvmDisk_Disk_octets_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_octets_read", null, 0, 1, CollectdKvmDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmDisk_Disk_octets_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_octets_write", null, 0, 1, CollectdKvmDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmDisk_Disk_ops_read(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_ops_read", null, 0, 1, CollectdKvmDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmDisk_Disk_ops_write(), theCorePackage.getIncreasingULongMetricAttribute(), "disk_ops_write", null, 0, 1, CollectdKvmDisk.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(collectdKvmInterfaceEClass, CollectdKvmInterface.class, "CollectdKvmInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCollectdKvmInterface_If_errors_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_errors_rx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_errors_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_errors_tx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_dropped_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_dropped_rx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_dropped_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_dropped_tx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_octets_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_octets_rx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_octets_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_octets_tx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_packets_rx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_packets_rx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCollectdKvmInterface_If_packets_tx(), theCorePackage.getIncreasingULongMetricAttribute(), "if_packets_tx", null, 0, 1, CollectdKvmInterface.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org/sirius/doc + createDocAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "doc", "http://openecomp.org/sirius/doc" + }); + } + + /** + * Initializes the annotations for http://openecomp.org/sirius/doc. + * + * + * @generated + */ + protected void createDocAnnotations() { + String source = "http://openecomp.org/sirius/doc"; + addAnnotation + (getCollectdDisk_Disk_octets_read(), + source, + new String[] { + "unit", "byte" + }); + } + +} //CollectdPackageImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdProcessesImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdProcessesImpl.java new file mode 100644 index 0000000..f3ee4e9 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdProcessesImpl.java @@ -0,0 +1,511 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Processes'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getFork_rate Fork rate}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getBlocked Blocked}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getPaging Paging}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getRunning Running}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getSleeping Sleeping}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getStopped Stopped}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdProcessesImpl#getZombies Zombies}
  • + *
+ *

+ * + * @generated + */ +public class CollectdProcessesImpl extends MinimalEObjectImpl.Container implements CollectdProcesses { + /** + * The default value of the '{@link #getFork_rate() Fork rate}' attribute. + * + * + * @see #getFork_rate() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute FORK_RATE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFork_rate() Fork rate}' attribute. + * + * + * @see #getFork_rate() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute fork_rate = FORK_RATE_EDEFAULT; + + /** + * The default value of the '{@link #getBlocked() Blocked}' attribute. + * + * + * @see #getBlocked() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute BLOCKED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBlocked() Blocked}' attribute. + * + * + * @see #getBlocked() + * @generated + * @ordered + */ + protected DoubleMetricAttribute blocked = BLOCKED_EDEFAULT; + + /** + * The default value of the '{@link #getPaging() Paging}' attribute. + * + * + * @see #getPaging() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute PAGING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPaging() Paging}' attribute. + * + * + * @see #getPaging() + * @generated + * @ordered + */ + protected DoubleMetricAttribute paging = PAGING_EDEFAULT; + + /** + * The default value of the '{@link #getRunning() Running}' attribute. + * + * + * @see #getRunning() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute RUNNING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRunning() Running}' attribute. + * + * + * @see #getRunning() + * @generated + * @ordered + */ + protected DoubleMetricAttribute running = RUNNING_EDEFAULT; + + /** + * The default value of the '{@link #getSleeping() Sleeping}' attribute. + * + * + * @see #getSleeping() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute SLEEPING_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSleeping() Sleeping}' attribute. + * + * + * @see #getSleeping() + * @generated + * @ordered + */ + protected DoubleMetricAttribute sleeping = SLEEPING_EDEFAULT; + + /** + * The default value of the '{@link #getStopped() Stopped}' attribute. + * + * + * @see #getStopped() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute STOPPED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStopped() Stopped}' attribute. + * + * + * @see #getStopped() + * @generated + * @ordered + */ + protected DoubleMetricAttribute stopped = STOPPED_EDEFAULT; + + /** + * The default value of the '{@link #getZombies() Zombies}' attribute. + * + * + * @see #getZombies() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ZOMBIES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getZombies() Zombies}' attribute. + * + * + * @see #getZombies() + * @generated + * @ordered + */ + protected DoubleMetricAttribute zombies = ZOMBIES_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdProcessesImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_PROCESSES; + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getFork_rate() { + return fork_rate; + } + + /** + * + * + * @generated + */ + public void setFork_rate(IncreasingULongMetricAttribute newFork_rate) { + IncreasingULongMetricAttribute oldFork_rate = fork_rate; + fork_rate = newFork_rate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__FORK_RATE, oldFork_rate, fork_rate)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getBlocked() { + return blocked; + } + + /** + * + * + * @generated + */ + public void setBlocked(DoubleMetricAttribute newBlocked) { + DoubleMetricAttribute oldBlocked = blocked; + blocked = newBlocked; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__BLOCKED, oldBlocked, blocked)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getPaging() { + return paging; + } + + /** + * + * + * @generated + */ + public void setPaging(DoubleMetricAttribute newPaging) { + DoubleMetricAttribute oldPaging = paging; + paging = newPaging; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__PAGING, oldPaging, paging)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getRunning() { + return running; + } + + /** + * + * + * @generated + */ + public void setRunning(DoubleMetricAttribute newRunning) { + DoubleMetricAttribute oldRunning = running; + running = newRunning; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__RUNNING, oldRunning, running)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getSleeping() { + return sleeping; + } + + /** + * + * + * @generated + */ + public void setSleeping(DoubleMetricAttribute newSleeping) { + DoubleMetricAttribute oldSleeping = sleeping; + sleeping = newSleeping; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__SLEEPING, oldSleeping, sleeping)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getStopped() { + return stopped; + } + + /** + * + * + * @generated + */ + public void setStopped(DoubleMetricAttribute newStopped) { + DoubleMetricAttribute oldStopped = stopped; + stopped = newStopped; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__STOPPED, oldStopped, stopped)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getZombies() { + return zombies; + } + + /** + * + * + * @generated + */ + public void setZombies(DoubleMetricAttribute newZombies) { + DoubleMetricAttribute oldZombies = zombies; + zombies = newZombies; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_PROCESSES__ZOMBIES, oldZombies, zombies)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_PROCESSES__FORK_RATE: + return getFork_rate(); + case CollectdPackage.COLLECTD_PROCESSES__BLOCKED: + return getBlocked(); + case CollectdPackage.COLLECTD_PROCESSES__PAGING: + return getPaging(); + case CollectdPackage.COLLECTD_PROCESSES__RUNNING: + return getRunning(); + case CollectdPackage.COLLECTD_PROCESSES__SLEEPING: + return getSleeping(); + case CollectdPackage.COLLECTD_PROCESSES__STOPPED: + return getStopped(); + case CollectdPackage.COLLECTD_PROCESSES__ZOMBIES: + return getZombies(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_PROCESSES__FORK_RATE: + setFork_rate((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__BLOCKED: + setBlocked((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__PAGING: + setPaging((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__RUNNING: + setRunning((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__SLEEPING: + setSleeping((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__STOPPED: + setStopped((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_PROCESSES__ZOMBIES: + setZombies((DoubleMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_PROCESSES__FORK_RATE: + setFork_rate(FORK_RATE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__BLOCKED: + setBlocked(BLOCKED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__PAGING: + setPaging(PAGING_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__RUNNING: + setRunning(RUNNING_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__SLEEPING: + setSleeping(SLEEPING_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__STOPPED: + setStopped(STOPPED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_PROCESSES__ZOMBIES: + setZombies(ZOMBIES_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_PROCESSES__FORK_RATE: + return FORK_RATE_EDEFAULT == null ? fork_rate != null : !FORK_RATE_EDEFAULT.equals(fork_rate); + case CollectdPackage.COLLECTD_PROCESSES__BLOCKED: + return BLOCKED_EDEFAULT == null ? blocked != null : !BLOCKED_EDEFAULT.equals(blocked); + case CollectdPackage.COLLECTD_PROCESSES__PAGING: + return PAGING_EDEFAULT == null ? paging != null : !PAGING_EDEFAULT.equals(paging); + case CollectdPackage.COLLECTD_PROCESSES__RUNNING: + return RUNNING_EDEFAULT == null ? running != null : !RUNNING_EDEFAULT.equals(running); + case CollectdPackage.COLLECTD_PROCESSES__SLEEPING: + return SLEEPING_EDEFAULT == null ? sleeping != null : !SLEEPING_EDEFAULT.equals(sleeping); + case CollectdPackage.COLLECTD_PROCESSES__STOPPED: + return STOPPED_EDEFAULT == null ? stopped != null : !STOPPED_EDEFAULT.equals(stopped); + case CollectdPackage.COLLECTD_PROCESSES__ZOMBIES: + return ZOMBIES_EDEFAULT == null ? zombies != null : !ZOMBIES_EDEFAULT.equals(zombies); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (fork_rate: "); + result.append(fork_rate); + result.append(", blocked: "); + result.append(blocked); + result.append(", paging: "); + result.append(paging); + result.append(", running: "); + result.append(running); + result.append(", sleeping: "); + result.append(sleeping); + result.append(", stopped: "); + result.append(stopped); + result.append(", zombies: "); + result.append(zombies); + result.append(')'); + return result.toString(); + } + +} //CollectdProcessesImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdServerImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdServerImpl.java new file mode 100644 index 0000000..c2e6385 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdServerImpl.java @@ -0,0 +1,1014 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.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 org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Server'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getAlertingTemplate Alerting Template}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getLoad_shortterm Load shortterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getLoad_midterm Load midterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getLoad_longterm Load longterm}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getEntropy Entropy}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getContextswitches Contextswitches}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getCpus Cpus}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getMemory Memory}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getSwap Swap}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getProcesses Processes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getVmem Vmem}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getFilesystems Filesystems}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getDisks Disks}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getInterfaces Interfaces}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdServerImpl#getInstances Instances}
  • + *
+ *

+ * + * @generated + */ +public class CollectdServerImpl extends NamedEntityImpl implements CollectdServer { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * The default value of the '{@link #getLoad_shortterm() Load shortterm}' attribute. + * + * + * @see #getLoad_shortterm() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute LOAD_SHORTTERM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLoad_shortterm() Load shortterm}' attribute. + * + * + * @see #getLoad_shortterm() + * @generated + * @ordered + */ + protected DoubleMetricAttribute load_shortterm = LOAD_SHORTTERM_EDEFAULT; + + /** + * The default value of the '{@link #getLoad_midterm() Load midterm}' attribute. + * + * + * @see #getLoad_midterm() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute LOAD_MIDTERM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLoad_midterm() Load midterm}' attribute. + * + * + * @see #getLoad_midterm() + * @generated + * @ordered + */ + protected DoubleMetricAttribute load_midterm = LOAD_MIDTERM_EDEFAULT; + + /** + * The default value of the '{@link #getLoad_longterm() Load longterm}' attribute. + * + * + * @see #getLoad_longterm() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute LOAD_LONGTERM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLoad_longterm() Load longterm}' attribute. + * + * + * @see #getLoad_longterm() + * @generated + * @ordered + */ + protected DoubleMetricAttribute load_longterm = LOAD_LONGTERM_EDEFAULT; + + /** + * The default value of the '{@link #getEntropy() Entropy}' attribute. + * + * + * @see #getEntropy() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ENTROPY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEntropy() Entropy}' attribute. + * + * + * @see #getEntropy() + * @generated + * @ordered + */ + protected DoubleMetricAttribute entropy = ENTROPY_EDEFAULT; + + /** + * The default value of the '{@link #getContextswitches() Contextswitches}' attribute. + * + * + * @see #getContextswitches() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute CONTEXTSWITCHES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getContextswitches() Contextswitches}' attribute. + * + * + * @see #getContextswitches() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute contextswitches = CONTEXTSWITCHES_EDEFAULT; + + /** + * The cached value of the '{@link #getCpus() Cpus}' containment reference list. + * + * + * @see #getCpus() + * @generated + * @ordered + */ + protected EList cpus; + + /** + * The cached value of the '{@link #getMemory() Memory}' containment reference. + * + * + * @see #getMemory() + * @generated + * @ordered + */ + protected CollectdMemory memory; + + /** + * The cached value of the '{@link #getSwap() Swap}' containment reference. + * + * + * @see #getSwap() + * @generated + * @ordered + */ + protected CollectdSwap swap; + + /** + * The cached value of the '{@link #getProcesses() Processes}' containment reference. + * + * + * @see #getProcesses() + * @generated + * @ordered + */ + protected CollectdProcesses processes; + + /** + * The cached value of the '{@link #getVmem() Vmem}' containment reference. + * + * + * @see #getVmem() + * @generated + * @ordered + */ + protected CollectdVmem vmem; + + /** + * The cached value of the '{@link #getFilesystems() Filesystems}' containment reference list. + * + * + * @see #getFilesystems() + * @generated + * @ordered + */ + protected EList filesystems; + + /** + * The cached value of the '{@link #getDisks() Disks}' containment reference list. + * + * + * @see #getDisks() + * @generated + * @ordered + */ + protected EList disks; + + /** + * The cached value of the '{@link #getInterfaces() Interfaces}' containment reference list. + * + * + * @see #getInterfaces() + * @generated + * @ordered + */ + protected EList interfaces; + + /** + * The cached value of the '{@link #getInstances() Instances}' containment reference list. + * + * + * @see #getInstances() + * @generated + * @ordered + */ + protected EList instances; + + /** + * + * + * @generated + */ + protected CollectdServerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_SERVER; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, CollectdPackage.COLLECTD_SERVER__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getLoad_shortterm() { + return load_shortterm; + } + + /** + * + * + * @generated + */ + public void setLoad_shortterm(DoubleMetricAttribute newLoad_shortterm) { + DoubleMetricAttribute oldLoad_shortterm = load_shortterm; + load_shortterm = newLoad_shortterm; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__LOAD_SHORTTERM, oldLoad_shortterm, load_shortterm)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getLoad_midterm() { + return load_midterm; + } + + /** + * + * + * @generated + */ + public void setLoad_midterm(DoubleMetricAttribute newLoad_midterm) { + DoubleMetricAttribute oldLoad_midterm = load_midterm; + load_midterm = newLoad_midterm; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__LOAD_MIDTERM, oldLoad_midterm, load_midterm)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getLoad_longterm() { + return load_longterm; + } + + /** + * + * + * @generated + */ + public void setLoad_longterm(DoubleMetricAttribute newLoad_longterm) { + DoubleMetricAttribute oldLoad_longterm = load_longterm; + load_longterm = newLoad_longterm; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__LOAD_LONGTERM, oldLoad_longterm, load_longterm)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getEntropy() { + return entropy; + } + + /** + * + * + * @generated + */ + public void setEntropy(DoubleMetricAttribute newEntropy) { + DoubleMetricAttribute oldEntropy = entropy; + entropy = newEntropy; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__ENTROPY, oldEntropy, entropy)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getContextswitches() { + return contextswitches; + } + + /** + * + * + * @generated + */ + public void setContextswitches(IncreasingULongMetricAttribute newContextswitches) { + IncreasingULongMetricAttribute oldContextswitches = contextswitches; + contextswitches = newContextswitches; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__CONTEXTSWITCHES, oldContextswitches, contextswitches)); + } + + /** + * + * + * @generated + */ + public EList getCpus() { + if (cpus == null) { + cpus = new EObjectContainmentEList(CollectdCpu.class, this, CollectdPackage.COLLECTD_SERVER__CPUS); + } + return cpus; + } + + /** + * + * + * @generated + */ + public CollectdMemory getMemory() { + return memory; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetMemory(CollectdMemory newMemory, NotificationChain msgs) { + CollectdMemory oldMemory = memory; + memory = newMemory; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__MEMORY, oldMemory, newMemory); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setMemory(CollectdMemory newMemory) { + if (newMemory != memory) { + NotificationChain msgs = null; + if (memory != null) + msgs = ((InternalEObject)memory).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__MEMORY, null, msgs); + if (newMemory != null) + msgs = ((InternalEObject)newMemory).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__MEMORY, null, msgs); + msgs = basicSetMemory(newMemory, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__MEMORY, newMemory, newMemory)); + } + + /** + * + * + * @generated + */ + public CollectdSwap getSwap() { + return swap; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSwap(CollectdSwap newSwap, NotificationChain msgs) { + CollectdSwap oldSwap = swap; + swap = newSwap; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__SWAP, oldSwap, newSwap); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSwap(CollectdSwap newSwap) { + if (newSwap != swap) { + NotificationChain msgs = null; + if (swap != null) + msgs = ((InternalEObject)swap).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__SWAP, null, msgs); + if (newSwap != null) + msgs = ((InternalEObject)newSwap).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__SWAP, null, msgs); + msgs = basicSetSwap(newSwap, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__SWAP, newSwap, newSwap)); + } + + /** + * + * + * @generated + */ + public CollectdProcesses getProcesses() { + return processes; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetProcesses(CollectdProcesses newProcesses, NotificationChain msgs) { + CollectdProcesses oldProcesses = processes; + processes = newProcesses; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__PROCESSES, oldProcesses, newProcesses); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setProcesses(CollectdProcesses newProcesses) { + if (newProcesses != processes) { + NotificationChain msgs = null; + if (processes != null) + msgs = ((InternalEObject)processes).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__PROCESSES, null, msgs); + if (newProcesses != null) + msgs = ((InternalEObject)newProcesses).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__PROCESSES, null, msgs); + msgs = basicSetProcesses(newProcesses, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__PROCESSES, newProcesses, newProcesses)); + } + + /** + * + * + * @generated + */ + public CollectdVmem getVmem() { + return vmem; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetVmem(CollectdVmem newVmem, NotificationChain msgs) { + CollectdVmem oldVmem = vmem; + vmem = newVmem; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__VMEM, oldVmem, newVmem); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setVmem(CollectdVmem newVmem) { + if (newVmem != vmem) { + NotificationChain msgs = null; + if (vmem != null) + msgs = ((InternalEObject)vmem).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__VMEM, null, msgs); + if (newVmem != null) + msgs = ((InternalEObject)newVmem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CollectdPackage.COLLECTD_SERVER__VMEM, null, msgs); + msgs = basicSetVmem(newVmem, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SERVER__VMEM, newVmem, newVmem)); + } + + /** + * + * + * @generated + */ + public EList getFilesystems() { + if (filesystems == null) { + filesystems = new EObjectContainmentEList(CollectdFileSystem.class, this, CollectdPackage.COLLECTD_SERVER__FILESYSTEMS); + } + return filesystems; + } + + /** + * + * + * @generated + */ + public EList getDisks() { + if (disks == null) { + disks = new EObjectContainmentEList(CollectdDisk.class, this, CollectdPackage.COLLECTD_SERVER__DISKS); + } + return disks; + } + + /** + * + * + * @generated + */ + public EList getInterfaces() { + if (interfaces == null) { + interfaces = new EObjectContainmentEList(CollectdInterface.class, this, CollectdPackage.COLLECTD_SERVER__INTERFACES); + } + return interfaces; + } + + /** + * + * + * @generated + */ + public EList getInstances() { + if (instances == null) { + instances = new EObjectContainmentEList(CollectdKvmInstance.class, this, CollectdPackage.COLLECTD_SERVER__INSTANCES); + } + return instances; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_SERVER__CPUS: + return ((InternalEList)getCpus()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_SERVER__MEMORY: + return basicSetMemory(null, msgs); + case CollectdPackage.COLLECTD_SERVER__SWAP: + return basicSetSwap(null, msgs); + case CollectdPackage.COLLECTD_SERVER__PROCESSES: + return basicSetProcesses(null, msgs); + case CollectdPackage.COLLECTD_SERVER__VMEM: + return basicSetVmem(null, msgs); + case CollectdPackage.COLLECTD_SERVER__FILESYSTEMS: + return ((InternalEList)getFilesystems()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_SERVER__DISKS: + return ((InternalEList)getDisks()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_SERVER__INTERFACES: + return ((InternalEList)getInterfaces()).basicRemove(otherEnd, msgs); + case CollectdPackage.COLLECTD_SERVER__INSTANCES: + return ((InternalEList)getInstances()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: + return getAlerts(); + case CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + case CollectdPackage.COLLECTD_SERVER__LOAD_SHORTTERM: + return getLoad_shortterm(); + case CollectdPackage.COLLECTD_SERVER__LOAD_MIDTERM: + return getLoad_midterm(); + case CollectdPackage.COLLECTD_SERVER__LOAD_LONGTERM: + return getLoad_longterm(); + case CollectdPackage.COLLECTD_SERVER__ENTROPY: + return getEntropy(); + case CollectdPackage.COLLECTD_SERVER__CONTEXTSWITCHES: + return getContextswitches(); + case CollectdPackage.COLLECTD_SERVER__CPUS: + return getCpus(); + case CollectdPackage.COLLECTD_SERVER__MEMORY: + return getMemory(); + case CollectdPackage.COLLECTD_SERVER__SWAP: + return getSwap(); + case CollectdPackage.COLLECTD_SERVER__PROCESSES: + return getProcesses(); + case CollectdPackage.COLLECTD_SERVER__VMEM: + return getVmem(); + case CollectdPackage.COLLECTD_SERVER__FILESYSTEMS: + return getFilesystems(); + case CollectdPackage.COLLECTD_SERVER__DISKS: + return getDisks(); + case CollectdPackage.COLLECTD_SERVER__INTERFACES: + return getInterfaces(); + case CollectdPackage.COLLECTD_SERVER__INSTANCES: + return getInstances(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_SHORTTERM: + setLoad_shortterm((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_MIDTERM: + setLoad_midterm((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_LONGTERM: + setLoad_longterm((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__ENTROPY: + setEntropy((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__CONTEXTSWITCHES: + setContextswitches((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__CPUS: + getCpus().clear(); + getCpus().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__MEMORY: + setMemory((CollectdMemory)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__SWAP: + setSwap((CollectdSwap)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__PROCESSES: + setProcesses((CollectdProcesses)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__VMEM: + setVmem((CollectdVmem)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__FILESYSTEMS: + getFilesystems().clear(); + getFilesystems().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__DISKS: + getDisks().clear(); + getDisks().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__INTERFACES: + getInterfaces().clear(); + getInterfaces().addAll((Collection)newValue); + return; + case CollectdPackage.COLLECTD_SERVER__INSTANCES: + getInstances().clear(); + getInstances().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: + getAlerts().clear(); + return; + case CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_SHORTTERM: + setLoad_shortterm(LOAD_SHORTTERM_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_MIDTERM: + setLoad_midterm(LOAD_MIDTERM_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SERVER__LOAD_LONGTERM: + setLoad_longterm(LOAD_LONGTERM_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SERVER__ENTROPY: + setEntropy(ENTROPY_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SERVER__CONTEXTSWITCHES: + setContextswitches(CONTEXTSWITCHES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SERVER__CPUS: + getCpus().clear(); + return; + case CollectdPackage.COLLECTD_SERVER__MEMORY: + setMemory((CollectdMemory)null); + return; + case CollectdPackage.COLLECTD_SERVER__SWAP: + setSwap((CollectdSwap)null); + return; + case CollectdPackage.COLLECTD_SERVER__PROCESSES: + setProcesses((CollectdProcesses)null); + return; + case CollectdPackage.COLLECTD_SERVER__VMEM: + setVmem((CollectdVmem)null); + return; + case CollectdPackage.COLLECTD_SERVER__FILESYSTEMS: + getFilesystems().clear(); + return; + case CollectdPackage.COLLECTD_SERVER__DISKS: + getDisks().clear(); + return; + case CollectdPackage.COLLECTD_SERVER__INTERFACES: + getInterfaces().clear(); + return; + case CollectdPackage.COLLECTD_SERVER__INSTANCES: + getInstances().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: + return alerts != null && !alerts.isEmpty(); + case CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE: + return alertingTemplate != null; + case CollectdPackage.COLLECTD_SERVER__LOAD_SHORTTERM: + return LOAD_SHORTTERM_EDEFAULT == null ? load_shortterm != null : !LOAD_SHORTTERM_EDEFAULT.equals(load_shortterm); + case CollectdPackage.COLLECTD_SERVER__LOAD_MIDTERM: + return LOAD_MIDTERM_EDEFAULT == null ? load_midterm != null : !LOAD_MIDTERM_EDEFAULT.equals(load_midterm); + case CollectdPackage.COLLECTD_SERVER__LOAD_LONGTERM: + return LOAD_LONGTERM_EDEFAULT == null ? load_longterm != null : !LOAD_LONGTERM_EDEFAULT.equals(load_longterm); + case CollectdPackage.COLLECTD_SERVER__ENTROPY: + return ENTROPY_EDEFAULT == null ? entropy != null : !ENTROPY_EDEFAULT.equals(entropy); + case CollectdPackage.COLLECTD_SERVER__CONTEXTSWITCHES: + return CONTEXTSWITCHES_EDEFAULT == null ? contextswitches != null : !CONTEXTSWITCHES_EDEFAULT.equals(contextswitches); + case CollectdPackage.COLLECTD_SERVER__CPUS: + return cpus != null && !cpus.isEmpty(); + case CollectdPackage.COLLECTD_SERVER__MEMORY: + return memory != null; + case CollectdPackage.COLLECTD_SERVER__SWAP: + return swap != null; + case CollectdPackage.COLLECTD_SERVER__PROCESSES: + return processes != null; + case CollectdPackage.COLLECTD_SERVER__VMEM: + return vmem != null; + case CollectdPackage.COLLECTD_SERVER__FILESYSTEMS: + return filesystems != null && !filesystems.isEmpty(); + case CollectdPackage.COLLECTD_SERVER__DISKS: + return disks != null && !disks.isEmpty(); + case CollectdPackage.COLLECTD_SERVER__INTERFACES: + return interfaces != null && !interfaces.isEmpty(); + case CollectdPackage.COLLECTD_SERVER__INSTANCES: + return instances != null && !instances.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (derivedFeatureID) { + case CollectdPackage.COLLECTD_SERVER__ALERTS: return AlertsPackage.ALERT_CONTAINER__ALERTS; + case CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE: return AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AlertContainer.class) { + switch (baseFeatureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: return CollectdPackage.COLLECTD_SERVER__ALERTS; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: return CollectdPackage.COLLECTD_SERVER__ALERTING_TEMPLATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (load_shortterm: "); + result.append(load_shortterm); + result.append(", load_midterm: "); + result.append(load_midterm); + result.append(", load_longterm: "); + result.append(load_longterm); + result.append(", entropy: "); + result.append(entropy); + result.append(", contextswitches: "); + result.append(contextswitches); + result.append(')'); + return result.toString(); + } + +} //CollectdServerImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdSwapImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdSwapImpl.java new file mode 100644 index 0000000..dee03a4 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdSwapImpl.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Swap'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl#getCached Cached}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl#getFree Free}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdSwapImpl#getUsed Used}
  • + *
+ *

+ * + * @generated + */ +public class CollectdSwapImpl extends MinimalEObjectImpl.Container implements CollectdSwap { + /** + * The default value of the '{@link #getCached() Cached}' attribute. + * + * + * @see #getCached() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute CACHED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCached() Cached}' attribute. + * + * + * @see #getCached() + * @generated + * @ordered + */ + protected DoubleMetricAttribute cached = CACHED_EDEFAULT; + + /** + * The default value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute FREE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFree() Free}' attribute. + * + * + * @see #getFree() + * @generated + * @ordered + */ + protected DoubleMetricAttribute free = FREE_EDEFAULT; + + /** + * The default value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute USED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUsed() Used}' attribute. + * + * + * @see #getUsed() + * @generated + * @ordered + */ + protected DoubleMetricAttribute used = USED_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdSwapImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_SWAP; + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getCached() { + return cached; + } + + /** + * + * + * @generated + */ + public void setCached(DoubleMetricAttribute newCached) { + DoubleMetricAttribute oldCached = cached; + cached = newCached; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SWAP__CACHED, oldCached, cached)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getFree() { + return free; + } + + /** + * + * + * @generated + */ + public void setFree(DoubleMetricAttribute newFree) { + DoubleMetricAttribute oldFree = free; + free = newFree; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SWAP__FREE, oldFree, free)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getUsed() { + return used; + } + + /** + * + * + * @generated + */ + public void setUsed(DoubleMetricAttribute newUsed) { + DoubleMetricAttribute oldUsed = used; + used = newUsed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_SWAP__USED, oldUsed, used)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_SWAP__CACHED: + return getCached(); + case CollectdPackage.COLLECTD_SWAP__FREE: + return getFree(); + case CollectdPackage.COLLECTD_SWAP__USED: + return getUsed(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_SWAP__CACHED: + setCached((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SWAP__FREE: + setFree((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_SWAP__USED: + setUsed((DoubleMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_SWAP__CACHED: + setCached(CACHED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SWAP__FREE: + setFree(FREE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_SWAP__USED: + setUsed(USED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_SWAP__CACHED: + return CACHED_EDEFAULT == null ? cached != null : !CACHED_EDEFAULT.equals(cached); + case CollectdPackage.COLLECTD_SWAP__FREE: + return FREE_EDEFAULT == null ? free != null : !FREE_EDEFAULT.equals(free); + case CollectdPackage.COLLECTD_SWAP__USED: + return USED_EDEFAULT == null ? used != null : !USED_EDEFAULT.equals(used); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (cached: "); + result.append(cached); + result.append(", free: "); + result.append(free); + result.append(", used: "); + result.append(used); + result.append(')'); + return result.toString(); + } + +} //CollectdSwapImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdVmemImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdVmemImpl.java new file mode 100644 index 0000000..dd65dd6 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/impl/CollectdVmemImpl.java @@ -0,0 +1,2023 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.impl; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Vmem'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getActive_anon Active anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getActive_file Active file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getAnon_pages Anon pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getAnon_transparent_hugepages Anon transparent hugepages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getBounce Bounce}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getDirtied Dirtied}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getDirty Dirty}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getDirty_background_threshold Dirty background threshold}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getDirty_threshold Dirty threshold}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getFile_pages File pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getFree_pages Free pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getInactive_anon Inactive anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getInactive_file Inactive file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getIsolated_anon Isolated anon}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getIsolated_file Isolated file}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getKernel_stack Kernel stack}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getMapped Mapped}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getMlock Mlock}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getPage_table_pages Page table pages}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getShmem Shmem}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getSlab_reclaimable Slab reclaimable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getSlab_unreclaimable Slab unreclaimable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getUnevictable Unevictable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getUnstable Unstable}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getVmscan_immediate_reclaim Vmscan immediate reclaim}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getVmscan_write Vmscan write}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getWriteback Writeback}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getWriteback_temp Writeback temp}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getWritten Written}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getMemory_in Memory in}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getMemory_out Memory out}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getSwap_in Swap in}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getSwap_out Swap out}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getFaults_minor Faults minor}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.collectd.impl.CollectdVmemImpl#getFaults_major Faults major}
  • + *
+ *

+ * + * @generated + */ +public class CollectdVmemImpl extends MinimalEObjectImpl.Container implements CollectdVmem { + /** + * The default value of the '{@link #getActive_anon() Active anon}' attribute. + * + * + * @see #getActive_anon() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ACTIVE_ANON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getActive_anon() Active anon}' attribute. + * + * + * @see #getActive_anon() + * @generated + * @ordered + */ + protected DoubleMetricAttribute active_anon = ACTIVE_ANON_EDEFAULT; + + /** + * The default value of the '{@link #getActive_file() Active file}' attribute. + * + * + * @see #getActive_file() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ACTIVE_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getActive_file() Active file}' attribute. + * + * + * @see #getActive_file() + * @generated + * @ordered + */ + protected DoubleMetricAttribute active_file = ACTIVE_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getAnon_pages() Anon pages}' attribute. + * + * + * @see #getAnon_pages() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ANON_PAGES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAnon_pages() Anon pages}' attribute. + * + * + * @see #getAnon_pages() + * @generated + * @ordered + */ + protected DoubleMetricAttribute anon_pages = ANON_PAGES_EDEFAULT; + + /** + * The default value of the '{@link #getAnon_transparent_hugepages() Anon transparent hugepages}' attribute. + * + * + * @see #getAnon_transparent_hugepages() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ANON_TRANSPARENT_HUGEPAGES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAnon_transparent_hugepages() Anon transparent hugepages}' attribute. + * + * + * @see #getAnon_transparent_hugepages() + * @generated + * @ordered + */ + protected DoubleMetricAttribute anon_transparent_hugepages = ANON_TRANSPARENT_HUGEPAGES_EDEFAULT; + + /** + * The default value of the '{@link #getBounce() Bounce}' attribute. + * + * + * @see #getBounce() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute BOUNCE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBounce() Bounce}' attribute. + * + * + * @see #getBounce() + * @generated + * @ordered + */ + protected DoubleMetricAttribute bounce = BOUNCE_EDEFAULT; + + /** + * The default value of the '{@link #getDirtied() Dirtied}' attribute. + * + * + * @see #getDirtied() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute DIRTIED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDirtied() Dirtied}' attribute. + * + * + * @see #getDirtied() + * @generated + * @ordered + */ + protected DoubleMetricAttribute dirtied = DIRTIED_EDEFAULT; + + /** + * The default value of the '{@link #getDirty() Dirty}' attribute. + * + * + * @see #getDirty() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute DIRTY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDirty() Dirty}' attribute. + * + * + * @see #getDirty() + * @generated + * @ordered + */ + protected DoubleMetricAttribute dirty = DIRTY_EDEFAULT; + + /** + * The default value of the '{@link #getDirty_background_threshold() Dirty background threshold}' attribute. + * + * + * @see #getDirty_background_threshold() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute DIRTY_BACKGROUND_THRESHOLD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDirty_background_threshold() Dirty background threshold}' attribute. + * + * + * @see #getDirty_background_threshold() + * @generated + * @ordered + */ + protected DoubleMetricAttribute dirty_background_threshold = DIRTY_BACKGROUND_THRESHOLD_EDEFAULT; + + /** + * The default value of the '{@link #getDirty_threshold() Dirty threshold}' attribute. + * + * + * @see #getDirty_threshold() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute DIRTY_THRESHOLD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDirty_threshold() Dirty threshold}' attribute. + * + * + * @see #getDirty_threshold() + * @generated + * @ordered + */ + protected DoubleMetricAttribute dirty_threshold = DIRTY_THRESHOLD_EDEFAULT; + + /** + * The default value of the '{@link #getFile_pages() File pages}' attribute. + * + * + * @see #getFile_pages() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute FILE_PAGES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFile_pages() File pages}' attribute. + * + * + * @see #getFile_pages() + * @generated + * @ordered + */ + protected DoubleMetricAttribute file_pages = FILE_PAGES_EDEFAULT; + + /** + * The default value of the '{@link #getFree_pages() Free pages}' attribute. + * + * + * @see #getFree_pages() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute FREE_PAGES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFree_pages() Free pages}' attribute. + * + * + * @see #getFree_pages() + * @generated + * @ordered + */ + protected DoubleMetricAttribute free_pages = FREE_PAGES_EDEFAULT; + + /** + * The default value of the '{@link #getInactive_anon() Inactive anon}' attribute. + * + * + * @see #getInactive_anon() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute INACTIVE_ANON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getInactive_anon() Inactive anon}' attribute. + * + * + * @see #getInactive_anon() + * @generated + * @ordered + */ + protected DoubleMetricAttribute inactive_anon = INACTIVE_ANON_EDEFAULT; + + /** + * The default value of the '{@link #getInactive_file() Inactive file}' attribute. + * + * + * @see #getInactive_file() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute INACTIVE_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getInactive_file() Inactive file}' attribute. + * + * + * @see #getInactive_file() + * @generated + * @ordered + */ + protected DoubleMetricAttribute inactive_file = INACTIVE_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getIsolated_anon() Isolated anon}' attribute. + * + * + * @see #getIsolated_anon() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ISOLATED_ANON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIsolated_anon() Isolated anon}' attribute. + * + * + * @see #getIsolated_anon() + * @generated + * @ordered + */ + protected DoubleMetricAttribute isolated_anon = ISOLATED_ANON_EDEFAULT; + + /** + * The default value of the '{@link #getIsolated_file() Isolated file}' attribute. + * + * + * @see #getIsolated_file() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute ISOLATED_FILE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIsolated_file() Isolated file}' attribute. + * + * + * @see #getIsolated_file() + * @generated + * @ordered + */ + protected DoubleMetricAttribute isolated_file = ISOLATED_FILE_EDEFAULT; + + /** + * The default value of the '{@link #getKernel_stack() Kernel stack}' attribute. + * + * + * @see #getKernel_stack() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute KERNEL_STACK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getKernel_stack() Kernel stack}' attribute. + * + * + * @see #getKernel_stack() + * @generated + * @ordered + */ + protected DoubleMetricAttribute kernel_stack = KERNEL_STACK_EDEFAULT; + + /** + * The default value of the '{@link #getMapped() Mapped}' attribute. + * + * + * @see #getMapped() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute MAPPED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMapped() Mapped}' attribute. + * + * + * @see #getMapped() + * @generated + * @ordered + */ + protected DoubleMetricAttribute mapped = MAPPED_EDEFAULT; + + /** + * The default value of the '{@link #getMlock() Mlock}' attribute. + * + * + * @see #getMlock() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute MLOCK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMlock() Mlock}' attribute. + * + * + * @see #getMlock() + * @generated + * @ordered + */ + protected DoubleMetricAttribute mlock = MLOCK_EDEFAULT; + + /** + * The default value of the '{@link #getPage_table_pages() Page table pages}' attribute. + * + * + * @see #getPage_table_pages() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute PAGE_TABLE_PAGES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPage_table_pages() Page table pages}' attribute. + * + * + * @see #getPage_table_pages() + * @generated + * @ordered + */ + protected DoubleMetricAttribute page_table_pages = PAGE_TABLE_PAGES_EDEFAULT; + + /** + * The default value of the '{@link #getShmem() Shmem}' attribute. + * + * + * @see #getShmem() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute SHMEM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getShmem() Shmem}' attribute. + * + * + * @see #getShmem() + * @generated + * @ordered + */ + protected DoubleMetricAttribute shmem = SHMEM_EDEFAULT; + + /** + * The default value of the '{@link #getSlab_reclaimable() Slab reclaimable}' attribute. + * + * + * @see #getSlab_reclaimable() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute SLAB_RECLAIMABLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSlab_reclaimable() Slab reclaimable}' attribute. + * + * + * @see #getSlab_reclaimable() + * @generated + * @ordered + */ + protected DoubleMetricAttribute slab_reclaimable = SLAB_RECLAIMABLE_EDEFAULT; + + /** + * The default value of the '{@link #getSlab_unreclaimable() Slab unreclaimable}' attribute. + * + * + * @see #getSlab_unreclaimable() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute SLAB_UNRECLAIMABLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSlab_unreclaimable() Slab unreclaimable}' attribute. + * + * + * @see #getSlab_unreclaimable() + * @generated + * @ordered + */ + protected DoubleMetricAttribute slab_unreclaimable = SLAB_UNRECLAIMABLE_EDEFAULT; + + /** + * The default value of the '{@link #getUnevictable() Unevictable}' attribute. + * + * + * @see #getUnevictable() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute UNEVICTABLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUnevictable() Unevictable}' attribute. + * + * + * @see #getUnevictable() + * @generated + * @ordered + */ + protected DoubleMetricAttribute unevictable = UNEVICTABLE_EDEFAULT; + + /** + * The default value of the '{@link #getUnstable() Unstable}' attribute. + * + * + * @see #getUnstable() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute UNSTABLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUnstable() Unstable}' attribute. + * + * + * @see #getUnstable() + * @generated + * @ordered + */ + protected DoubleMetricAttribute unstable = UNSTABLE_EDEFAULT; + + /** + * The default value of the '{@link #getVmscan_immediate_reclaim() Vmscan immediate reclaim}' attribute. + * + * + * @see #getVmscan_immediate_reclaim() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute VMSCAN_IMMEDIATE_RECLAIM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVmscan_immediate_reclaim() Vmscan immediate reclaim}' attribute. + * + * + * @see #getVmscan_immediate_reclaim() + * @generated + * @ordered + */ + protected DoubleMetricAttribute vmscan_immediate_reclaim = VMSCAN_IMMEDIATE_RECLAIM_EDEFAULT; + + /** + * The default value of the '{@link #getVmscan_write() Vmscan write}' attribute. + * + * + * @see #getVmscan_write() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute VMSCAN_WRITE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVmscan_write() Vmscan write}' attribute. + * + * + * @see #getVmscan_write() + * @generated + * @ordered + */ + protected DoubleMetricAttribute vmscan_write = VMSCAN_WRITE_EDEFAULT; + + /** + * The default value of the '{@link #getWriteback() Writeback}' attribute. + * + * + * @see #getWriteback() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute WRITEBACK_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWriteback() Writeback}' attribute. + * + * + * @see #getWriteback() + * @generated + * @ordered + */ + protected DoubleMetricAttribute writeback = WRITEBACK_EDEFAULT; + + /** + * The default value of the '{@link #getWriteback_temp() Writeback temp}' attribute. + * + * + * @see #getWriteback_temp() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute WRITEBACK_TEMP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWriteback_temp() Writeback temp}' attribute. + * + * + * @see #getWriteback_temp() + * @generated + * @ordered + */ + protected DoubleMetricAttribute writeback_temp = WRITEBACK_TEMP_EDEFAULT; + + /** + * The default value of the '{@link #getWritten() Written}' attribute. + * + * + * @see #getWritten() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute WRITTEN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getWritten() Written}' attribute. + * + * + * @see #getWritten() + * @generated + * @ordered + */ + protected DoubleMetricAttribute written = WRITTEN_EDEFAULT; + + /** + * The default value of the '{@link #getMemory_in() Memory in}' attribute. + * + * + * @see #getMemory_in() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute MEMORY_IN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMemory_in() Memory in}' attribute. + * + * + * @see #getMemory_in() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute memory_in = MEMORY_IN_EDEFAULT; + + /** + * The default value of the '{@link #getMemory_out() Memory out}' attribute. + * + * + * @see #getMemory_out() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute MEMORY_OUT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMemory_out() Memory out}' attribute. + * + * + * @see #getMemory_out() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute memory_out = MEMORY_OUT_EDEFAULT; + + /** + * The default value of the '{@link #getSwap_in() Swap in}' attribute. + * + * + * @see #getSwap_in() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute SWAP_IN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSwap_in() Swap in}' attribute. + * + * + * @see #getSwap_in() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute swap_in = SWAP_IN_EDEFAULT; + + /** + * The default value of the '{@link #getSwap_out() Swap out}' attribute. + * + * + * @see #getSwap_out() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute SWAP_OUT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSwap_out() Swap out}' attribute. + * + * + * @see #getSwap_out() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute swap_out = SWAP_OUT_EDEFAULT; + + /** + * The default value of the '{@link #getFaults_minor() Faults minor}' attribute. + * + * + * @see #getFaults_minor() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute FAULTS_MINOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFaults_minor() Faults minor}' attribute. + * + * + * @see #getFaults_minor() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute faults_minor = FAULTS_MINOR_EDEFAULT; + + /** + * The default value of the '{@link #getFaults_major() Faults major}' attribute. + * + * + * @see #getFaults_major() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute FAULTS_MAJOR_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFaults_major() Faults major}' attribute. + * + * + * @see #getFaults_major() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute faults_major = FAULTS_MAJOR_EDEFAULT; + + /** + * + * + * @generated + */ + protected CollectdVmemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CollectdPackage.Literals.COLLECTD_VMEM; + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getActive_anon() { + return active_anon; + } + + /** + * + * + * @generated + */ + public void setActive_anon(DoubleMetricAttribute newActive_anon) { + DoubleMetricAttribute oldActive_anon = active_anon; + active_anon = newActive_anon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ACTIVE_ANON, oldActive_anon, active_anon)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getActive_file() { + return active_file; + } + + /** + * + * + * @generated + */ + public void setActive_file(DoubleMetricAttribute newActive_file) { + DoubleMetricAttribute oldActive_file = active_file; + active_file = newActive_file; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ACTIVE_FILE, oldActive_file, active_file)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getAnon_pages() { + return anon_pages; + } + + /** + * + * + * @generated + */ + public void setAnon_pages(DoubleMetricAttribute newAnon_pages) { + DoubleMetricAttribute oldAnon_pages = anon_pages; + anon_pages = newAnon_pages; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ANON_PAGES, oldAnon_pages, anon_pages)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getAnon_transparent_hugepages() { + return anon_transparent_hugepages; + } + + /** + * + * + * @generated + */ + public void setAnon_transparent_hugepages(DoubleMetricAttribute newAnon_transparent_hugepages) { + DoubleMetricAttribute oldAnon_transparent_hugepages = anon_transparent_hugepages; + anon_transparent_hugepages = newAnon_transparent_hugepages; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES, oldAnon_transparent_hugepages, anon_transparent_hugepages)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getBounce() { + return bounce; + } + + /** + * + * + * @generated + */ + public void setBounce(DoubleMetricAttribute newBounce) { + DoubleMetricAttribute oldBounce = bounce; + bounce = newBounce; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__BOUNCE, oldBounce, bounce)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getDirtied() { + return dirtied; + } + + /** + * + * + * @generated + */ + public void setDirtied(DoubleMetricAttribute newDirtied) { + DoubleMetricAttribute oldDirtied = dirtied; + dirtied = newDirtied; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__DIRTIED, oldDirtied, dirtied)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getDirty() { + return dirty; + } + + /** + * + * + * @generated + */ + public void setDirty(DoubleMetricAttribute newDirty) { + DoubleMetricAttribute oldDirty = dirty; + dirty = newDirty; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__DIRTY, oldDirty, dirty)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getDirty_background_threshold() { + return dirty_background_threshold; + } + + /** + * + * + * @generated + */ + public void setDirty_background_threshold(DoubleMetricAttribute newDirty_background_threshold) { + DoubleMetricAttribute oldDirty_background_threshold = dirty_background_threshold; + dirty_background_threshold = newDirty_background_threshold; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD, oldDirty_background_threshold, dirty_background_threshold)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getDirty_threshold() { + return dirty_threshold; + } + + /** + * + * + * @generated + */ + public void setDirty_threshold(DoubleMetricAttribute newDirty_threshold) { + DoubleMetricAttribute oldDirty_threshold = dirty_threshold; + dirty_threshold = newDirty_threshold; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__DIRTY_THRESHOLD, oldDirty_threshold, dirty_threshold)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getFile_pages() { + return file_pages; + } + + /** + * + * + * @generated + */ + public void setFile_pages(DoubleMetricAttribute newFile_pages) { + DoubleMetricAttribute oldFile_pages = file_pages; + file_pages = newFile_pages; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__FILE_PAGES, oldFile_pages, file_pages)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getFree_pages() { + return free_pages; + } + + /** + * + * + * @generated + */ + public void setFree_pages(DoubleMetricAttribute newFree_pages) { + DoubleMetricAttribute oldFree_pages = free_pages; + free_pages = newFree_pages; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__FREE_PAGES, oldFree_pages, free_pages)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getInactive_anon() { + return inactive_anon; + } + + /** + * + * + * @generated + */ + public void setInactive_anon(DoubleMetricAttribute newInactive_anon) { + DoubleMetricAttribute oldInactive_anon = inactive_anon; + inactive_anon = newInactive_anon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__INACTIVE_ANON, oldInactive_anon, inactive_anon)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getInactive_file() { + return inactive_file; + } + + /** + * + * + * @generated + */ + public void setInactive_file(DoubleMetricAttribute newInactive_file) { + DoubleMetricAttribute oldInactive_file = inactive_file; + inactive_file = newInactive_file; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__INACTIVE_FILE, oldInactive_file, inactive_file)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getIsolated_anon() { + return isolated_anon; + } + + /** + * + * + * @generated + */ + public void setIsolated_anon(DoubleMetricAttribute newIsolated_anon) { + DoubleMetricAttribute oldIsolated_anon = isolated_anon; + isolated_anon = newIsolated_anon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ISOLATED_ANON, oldIsolated_anon, isolated_anon)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getIsolated_file() { + return isolated_file; + } + + /** + * + * + * @generated + */ + public void setIsolated_file(DoubleMetricAttribute newIsolated_file) { + DoubleMetricAttribute oldIsolated_file = isolated_file; + isolated_file = newIsolated_file; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__ISOLATED_FILE, oldIsolated_file, isolated_file)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getKernel_stack() { + return kernel_stack; + } + + /** + * + * + * @generated + */ + public void setKernel_stack(DoubleMetricAttribute newKernel_stack) { + DoubleMetricAttribute oldKernel_stack = kernel_stack; + kernel_stack = newKernel_stack; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__KERNEL_STACK, oldKernel_stack, kernel_stack)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getMapped() { + return mapped; + } + + /** + * + * + * @generated + */ + public void setMapped(DoubleMetricAttribute newMapped) { + DoubleMetricAttribute oldMapped = mapped; + mapped = newMapped; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__MAPPED, oldMapped, mapped)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getMlock() { + return mlock; + } + + /** + * + * + * @generated + */ + public void setMlock(DoubleMetricAttribute newMlock) { + DoubleMetricAttribute oldMlock = mlock; + mlock = newMlock; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__MLOCK, oldMlock, mlock)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getPage_table_pages() { + return page_table_pages; + } + + /** + * + * + * @generated + */ + public void setPage_table_pages(DoubleMetricAttribute newPage_table_pages) { + DoubleMetricAttribute oldPage_table_pages = page_table_pages; + page_table_pages = newPage_table_pages; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__PAGE_TABLE_PAGES, oldPage_table_pages, page_table_pages)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getShmem() { + return shmem; + } + + /** + * + * + * @generated + */ + public void setShmem(DoubleMetricAttribute newShmem) { + DoubleMetricAttribute oldShmem = shmem; + shmem = newShmem; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__SHMEM, oldShmem, shmem)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getSlab_reclaimable() { + return slab_reclaimable; + } + + /** + * + * + * @generated + */ + public void setSlab_reclaimable(DoubleMetricAttribute newSlab_reclaimable) { + DoubleMetricAttribute oldSlab_reclaimable = slab_reclaimable; + slab_reclaimable = newSlab_reclaimable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__SLAB_RECLAIMABLE, oldSlab_reclaimable, slab_reclaimable)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getSlab_unreclaimable() { + return slab_unreclaimable; + } + + /** + * + * + * @generated + */ + public void setSlab_unreclaimable(DoubleMetricAttribute newSlab_unreclaimable) { + DoubleMetricAttribute oldSlab_unreclaimable = slab_unreclaimable; + slab_unreclaimable = newSlab_unreclaimable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__SLAB_UNRECLAIMABLE, oldSlab_unreclaimable, slab_unreclaimable)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getUnevictable() { + return unevictable; + } + + /** + * + * + * @generated + */ + public void setUnevictable(DoubleMetricAttribute newUnevictable) { + DoubleMetricAttribute oldUnevictable = unevictable; + unevictable = newUnevictable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__UNEVICTABLE, oldUnevictable, unevictable)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getUnstable() { + return unstable; + } + + /** + * + * + * @generated + */ + public void setUnstable(DoubleMetricAttribute newUnstable) { + DoubleMetricAttribute oldUnstable = unstable; + unstable = newUnstable; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__UNSTABLE, oldUnstable, unstable)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getVmscan_immediate_reclaim() { + return vmscan_immediate_reclaim; + } + + /** + * + * + * @generated + */ + public void setVmscan_immediate_reclaim(DoubleMetricAttribute newVmscan_immediate_reclaim) { + DoubleMetricAttribute oldVmscan_immediate_reclaim = vmscan_immediate_reclaim; + vmscan_immediate_reclaim = newVmscan_immediate_reclaim; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM, oldVmscan_immediate_reclaim, vmscan_immediate_reclaim)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getVmscan_write() { + return vmscan_write; + } + + /** + * + * + * @generated + */ + public void setVmscan_write(DoubleMetricAttribute newVmscan_write) { + DoubleMetricAttribute oldVmscan_write = vmscan_write; + vmscan_write = newVmscan_write; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__VMSCAN_WRITE, oldVmscan_write, vmscan_write)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getWriteback() { + return writeback; + } + + /** + * + * + * @generated + */ + public void setWriteback(DoubleMetricAttribute newWriteback) { + DoubleMetricAttribute oldWriteback = writeback; + writeback = newWriteback; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__WRITEBACK, oldWriteback, writeback)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getWriteback_temp() { + return writeback_temp; + } + + /** + * + * + * @generated + */ + public void setWriteback_temp(DoubleMetricAttribute newWriteback_temp) { + DoubleMetricAttribute oldWriteback_temp = writeback_temp; + writeback_temp = newWriteback_temp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__WRITEBACK_TEMP, oldWriteback_temp, writeback_temp)); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getWritten() { + return written; + } + + /** + * + * + * @generated + */ + public void setWritten(DoubleMetricAttribute newWritten) { + DoubleMetricAttribute oldWritten = written; + written = newWritten; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__WRITTEN, oldWritten, written)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getMemory_in() { + return memory_in; + } + + /** + * + * + * @generated + */ + public void setMemory_in(IncreasingULongMetricAttribute newMemory_in) { + IncreasingULongMetricAttribute oldMemory_in = memory_in; + memory_in = newMemory_in; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__MEMORY_IN, oldMemory_in, memory_in)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getMemory_out() { + return memory_out; + } + + /** + * + * + * @generated + */ + public void setMemory_out(IncreasingULongMetricAttribute newMemory_out) { + IncreasingULongMetricAttribute oldMemory_out = memory_out; + memory_out = newMemory_out; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__MEMORY_OUT, oldMemory_out, memory_out)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getSwap_in() { + return swap_in; + } + + /** + * + * + * @generated + */ + public void setSwap_in(IncreasingULongMetricAttribute newSwap_in) { + IncreasingULongMetricAttribute oldSwap_in = swap_in; + swap_in = newSwap_in; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__SWAP_IN, oldSwap_in, swap_in)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getSwap_out() { + return swap_out; + } + + /** + * + * + * @generated + */ + public void setSwap_out(IncreasingULongMetricAttribute newSwap_out) { + IncreasingULongMetricAttribute oldSwap_out = swap_out; + swap_out = newSwap_out; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__SWAP_OUT, oldSwap_out, swap_out)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getFaults_minor() { + return faults_minor; + } + + /** + * + * + * @generated + */ + public void setFaults_minor(IncreasingULongMetricAttribute newFaults_minor) { + IncreasingULongMetricAttribute oldFaults_minor = faults_minor; + faults_minor = newFaults_minor; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__FAULTS_MINOR, oldFaults_minor, faults_minor)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getFaults_major() { + return faults_major; + } + + /** + * + * + * @generated + */ + public void setFaults_major(IncreasingULongMetricAttribute newFaults_major) { + IncreasingULongMetricAttribute oldFaults_major = faults_major; + faults_major = newFaults_major; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CollectdPackage.COLLECTD_VMEM__FAULTS_MAJOR, oldFaults_major, faults_major)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CollectdPackage.COLLECTD_VMEM__ACTIVE_ANON: + return getActive_anon(); + case CollectdPackage.COLLECTD_VMEM__ACTIVE_FILE: + return getActive_file(); + case CollectdPackage.COLLECTD_VMEM__ANON_PAGES: + return getAnon_pages(); + case CollectdPackage.COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES: + return getAnon_transparent_hugepages(); + case CollectdPackage.COLLECTD_VMEM__BOUNCE: + return getBounce(); + case CollectdPackage.COLLECTD_VMEM__DIRTIED: + return getDirtied(); + case CollectdPackage.COLLECTD_VMEM__DIRTY: + return getDirty(); + case CollectdPackage.COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD: + return getDirty_background_threshold(); + case CollectdPackage.COLLECTD_VMEM__DIRTY_THRESHOLD: + return getDirty_threshold(); + case CollectdPackage.COLLECTD_VMEM__FILE_PAGES: + return getFile_pages(); + case CollectdPackage.COLLECTD_VMEM__FREE_PAGES: + return getFree_pages(); + case CollectdPackage.COLLECTD_VMEM__INACTIVE_ANON: + return getInactive_anon(); + case CollectdPackage.COLLECTD_VMEM__INACTIVE_FILE: + return getInactive_file(); + case CollectdPackage.COLLECTD_VMEM__ISOLATED_ANON: + return getIsolated_anon(); + case CollectdPackage.COLLECTD_VMEM__ISOLATED_FILE: + return getIsolated_file(); + case CollectdPackage.COLLECTD_VMEM__KERNEL_STACK: + return getKernel_stack(); + case CollectdPackage.COLLECTD_VMEM__MAPPED: + return getMapped(); + case CollectdPackage.COLLECTD_VMEM__MLOCK: + return getMlock(); + case CollectdPackage.COLLECTD_VMEM__PAGE_TABLE_PAGES: + return getPage_table_pages(); + case CollectdPackage.COLLECTD_VMEM__SHMEM: + return getShmem(); + case CollectdPackage.COLLECTD_VMEM__SLAB_RECLAIMABLE: + return getSlab_reclaimable(); + case CollectdPackage.COLLECTD_VMEM__SLAB_UNRECLAIMABLE: + return getSlab_unreclaimable(); + case CollectdPackage.COLLECTD_VMEM__UNEVICTABLE: + return getUnevictable(); + case CollectdPackage.COLLECTD_VMEM__UNSTABLE: + return getUnstable(); + case CollectdPackage.COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM: + return getVmscan_immediate_reclaim(); + case CollectdPackage.COLLECTD_VMEM__VMSCAN_WRITE: + return getVmscan_write(); + case CollectdPackage.COLLECTD_VMEM__WRITEBACK: + return getWriteback(); + case CollectdPackage.COLLECTD_VMEM__WRITEBACK_TEMP: + return getWriteback_temp(); + case CollectdPackage.COLLECTD_VMEM__WRITTEN: + return getWritten(); + case CollectdPackage.COLLECTD_VMEM__MEMORY_IN: + return getMemory_in(); + case CollectdPackage.COLLECTD_VMEM__MEMORY_OUT: + return getMemory_out(); + case CollectdPackage.COLLECTD_VMEM__SWAP_IN: + return getSwap_in(); + case CollectdPackage.COLLECTD_VMEM__SWAP_OUT: + return getSwap_out(); + case CollectdPackage.COLLECTD_VMEM__FAULTS_MINOR: + return getFaults_minor(); + case CollectdPackage.COLLECTD_VMEM__FAULTS_MAJOR: + return getFaults_major(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CollectdPackage.COLLECTD_VMEM__ACTIVE_ANON: + setActive_anon((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__ACTIVE_FILE: + setActive_file((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__ANON_PAGES: + setAnon_pages((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES: + setAnon_transparent_hugepages((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__BOUNCE: + setBounce((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTIED: + setDirtied((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY: + setDirty((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD: + setDirty_background_threshold((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY_THRESHOLD: + setDirty_threshold((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__FILE_PAGES: + setFile_pages((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__FREE_PAGES: + setFree_pages((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__INACTIVE_ANON: + setInactive_anon((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__INACTIVE_FILE: + setInactive_file((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__ISOLATED_ANON: + setIsolated_anon((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__ISOLATED_FILE: + setIsolated_file((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__KERNEL_STACK: + setKernel_stack((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__MAPPED: + setMapped((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__MLOCK: + setMlock((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__PAGE_TABLE_PAGES: + setPage_table_pages((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__SHMEM: + setShmem((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__SLAB_RECLAIMABLE: + setSlab_reclaimable((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__SLAB_UNRECLAIMABLE: + setSlab_unreclaimable((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__UNEVICTABLE: + setUnevictable((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__UNSTABLE: + setUnstable((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM: + setVmscan_immediate_reclaim((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__VMSCAN_WRITE: + setVmscan_write((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__WRITEBACK: + setWriteback((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__WRITEBACK_TEMP: + setWriteback_temp((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__WRITTEN: + setWritten((DoubleMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__MEMORY_IN: + setMemory_in((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__MEMORY_OUT: + setMemory_out((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__SWAP_IN: + setSwap_in((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__SWAP_OUT: + setSwap_out((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__FAULTS_MINOR: + setFaults_minor((IncreasingULongMetricAttribute)newValue); + return; + case CollectdPackage.COLLECTD_VMEM__FAULTS_MAJOR: + setFaults_major((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_VMEM__ACTIVE_ANON: + setActive_anon(ACTIVE_ANON_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__ACTIVE_FILE: + setActive_file(ACTIVE_FILE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__ANON_PAGES: + setAnon_pages(ANON_PAGES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES: + setAnon_transparent_hugepages(ANON_TRANSPARENT_HUGEPAGES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__BOUNCE: + setBounce(BOUNCE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTIED: + setDirtied(DIRTIED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY: + setDirty(DIRTY_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD: + setDirty_background_threshold(DIRTY_BACKGROUND_THRESHOLD_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__DIRTY_THRESHOLD: + setDirty_threshold(DIRTY_THRESHOLD_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__FILE_PAGES: + setFile_pages(FILE_PAGES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__FREE_PAGES: + setFree_pages(FREE_PAGES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__INACTIVE_ANON: + setInactive_anon(INACTIVE_ANON_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__INACTIVE_FILE: + setInactive_file(INACTIVE_FILE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__ISOLATED_ANON: + setIsolated_anon(ISOLATED_ANON_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__ISOLATED_FILE: + setIsolated_file(ISOLATED_FILE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__KERNEL_STACK: + setKernel_stack(KERNEL_STACK_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__MAPPED: + setMapped(MAPPED_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__MLOCK: + setMlock(MLOCK_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__PAGE_TABLE_PAGES: + setPage_table_pages(PAGE_TABLE_PAGES_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__SHMEM: + setShmem(SHMEM_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__SLAB_RECLAIMABLE: + setSlab_reclaimable(SLAB_RECLAIMABLE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__SLAB_UNRECLAIMABLE: + setSlab_unreclaimable(SLAB_UNRECLAIMABLE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__UNEVICTABLE: + setUnevictable(UNEVICTABLE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__UNSTABLE: + setUnstable(UNSTABLE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM: + setVmscan_immediate_reclaim(VMSCAN_IMMEDIATE_RECLAIM_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__VMSCAN_WRITE: + setVmscan_write(VMSCAN_WRITE_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__WRITEBACK: + setWriteback(WRITEBACK_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__WRITEBACK_TEMP: + setWriteback_temp(WRITEBACK_TEMP_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__WRITTEN: + setWritten(WRITTEN_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__MEMORY_IN: + setMemory_in(MEMORY_IN_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__MEMORY_OUT: + setMemory_out(MEMORY_OUT_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__SWAP_IN: + setSwap_in(SWAP_IN_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__SWAP_OUT: + setSwap_out(SWAP_OUT_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__FAULTS_MINOR: + setFaults_minor(FAULTS_MINOR_EDEFAULT); + return; + case CollectdPackage.COLLECTD_VMEM__FAULTS_MAJOR: + setFaults_major(FAULTS_MAJOR_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CollectdPackage.COLLECTD_VMEM__ACTIVE_ANON: + return ACTIVE_ANON_EDEFAULT == null ? active_anon != null : !ACTIVE_ANON_EDEFAULT.equals(active_anon); + case CollectdPackage.COLLECTD_VMEM__ACTIVE_FILE: + return ACTIVE_FILE_EDEFAULT == null ? active_file != null : !ACTIVE_FILE_EDEFAULT.equals(active_file); + case CollectdPackage.COLLECTD_VMEM__ANON_PAGES: + return ANON_PAGES_EDEFAULT == null ? anon_pages != null : !ANON_PAGES_EDEFAULT.equals(anon_pages); + case CollectdPackage.COLLECTD_VMEM__ANON_TRANSPARENT_HUGEPAGES: + return ANON_TRANSPARENT_HUGEPAGES_EDEFAULT == null ? anon_transparent_hugepages != null : !ANON_TRANSPARENT_HUGEPAGES_EDEFAULT.equals(anon_transparent_hugepages); + case CollectdPackage.COLLECTD_VMEM__BOUNCE: + return BOUNCE_EDEFAULT == null ? bounce != null : !BOUNCE_EDEFAULT.equals(bounce); + case CollectdPackage.COLLECTD_VMEM__DIRTIED: + return DIRTIED_EDEFAULT == null ? dirtied != null : !DIRTIED_EDEFAULT.equals(dirtied); + case CollectdPackage.COLLECTD_VMEM__DIRTY: + return DIRTY_EDEFAULT == null ? dirty != null : !DIRTY_EDEFAULT.equals(dirty); + case CollectdPackage.COLLECTD_VMEM__DIRTY_BACKGROUND_THRESHOLD: + return DIRTY_BACKGROUND_THRESHOLD_EDEFAULT == null ? dirty_background_threshold != null : !DIRTY_BACKGROUND_THRESHOLD_EDEFAULT.equals(dirty_background_threshold); + case CollectdPackage.COLLECTD_VMEM__DIRTY_THRESHOLD: + return DIRTY_THRESHOLD_EDEFAULT == null ? dirty_threshold != null : !DIRTY_THRESHOLD_EDEFAULT.equals(dirty_threshold); + case CollectdPackage.COLLECTD_VMEM__FILE_PAGES: + return FILE_PAGES_EDEFAULT == null ? file_pages != null : !FILE_PAGES_EDEFAULT.equals(file_pages); + case CollectdPackage.COLLECTD_VMEM__FREE_PAGES: + return FREE_PAGES_EDEFAULT == null ? free_pages != null : !FREE_PAGES_EDEFAULT.equals(free_pages); + case CollectdPackage.COLLECTD_VMEM__INACTIVE_ANON: + return INACTIVE_ANON_EDEFAULT == null ? inactive_anon != null : !INACTIVE_ANON_EDEFAULT.equals(inactive_anon); + case CollectdPackage.COLLECTD_VMEM__INACTIVE_FILE: + return INACTIVE_FILE_EDEFAULT == null ? inactive_file != null : !INACTIVE_FILE_EDEFAULT.equals(inactive_file); + case CollectdPackage.COLLECTD_VMEM__ISOLATED_ANON: + return ISOLATED_ANON_EDEFAULT == null ? isolated_anon != null : !ISOLATED_ANON_EDEFAULT.equals(isolated_anon); + case CollectdPackage.COLLECTD_VMEM__ISOLATED_FILE: + return ISOLATED_FILE_EDEFAULT == null ? isolated_file != null : !ISOLATED_FILE_EDEFAULT.equals(isolated_file); + case CollectdPackage.COLLECTD_VMEM__KERNEL_STACK: + return KERNEL_STACK_EDEFAULT == null ? kernel_stack != null : !KERNEL_STACK_EDEFAULT.equals(kernel_stack); + case CollectdPackage.COLLECTD_VMEM__MAPPED: + return MAPPED_EDEFAULT == null ? mapped != null : !MAPPED_EDEFAULT.equals(mapped); + case CollectdPackage.COLLECTD_VMEM__MLOCK: + return MLOCK_EDEFAULT == null ? mlock != null : !MLOCK_EDEFAULT.equals(mlock); + case CollectdPackage.COLLECTD_VMEM__PAGE_TABLE_PAGES: + return PAGE_TABLE_PAGES_EDEFAULT == null ? page_table_pages != null : !PAGE_TABLE_PAGES_EDEFAULT.equals(page_table_pages); + case CollectdPackage.COLLECTD_VMEM__SHMEM: + return SHMEM_EDEFAULT == null ? shmem != null : !SHMEM_EDEFAULT.equals(shmem); + case CollectdPackage.COLLECTD_VMEM__SLAB_RECLAIMABLE: + return SLAB_RECLAIMABLE_EDEFAULT == null ? slab_reclaimable != null : !SLAB_RECLAIMABLE_EDEFAULT.equals(slab_reclaimable); + case CollectdPackage.COLLECTD_VMEM__SLAB_UNRECLAIMABLE: + return SLAB_UNRECLAIMABLE_EDEFAULT == null ? slab_unreclaimable != null : !SLAB_UNRECLAIMABLE_EDEFAULT.equals(slab_unreclaimable); + case CollectdPackage.COLLECTD_VMEM__UNEVICTABLE: + return UNEVICTABLE_EDEFAULT == null ? unevictable != null : !UNEVICTABLE_EDEFAULT.equals(unevictable); + case CollectdPackage.COLLECTD_VMEM__UNSTABLE: + return UNSTABLE_EDEFAULT == null ? unstable != null : !UNSTABLE_EDEFAULT.equals(unstable); + case CollectdPackage.COLLECTD_VMEM__VMSCAN_IMMEDIATE_RECLAIM: + return VMSCAN_IMMEDIATE_RECLAIM_EDEFAULT == null ? vmscan_immediate_reclaim != null : !VMSCAN_IMMEDIATE_RECLAIM_EDEFAULT.equals(vmscan_immediate_reclaim); + case CollectdPackage.COLLECTD_VMEM__VMSCAN_WRITE: + return VMSCAN_WRITE_EDEFAULT == null ? vmscan_write != null : !VMSCAN_WRITE_EDEFAULT.equals(vmscan_write); + case CollectdPackage.COLLECTD_VMEM__WRITEBACK: + return WRITEBACK_EDEFAULT == null ? writeback != null : !WRITEBACK_EDEFAULT.equals(writeback); + case CollectdPackage.COLLECTD_VMEM__WRITEBACK_TEMP: + return WRITEBACK_TEMP_EDEFAULT == null ? writeback_temp != null : !WRITEBACK_TEMP_EDEFAULT.equals(writeback_temp); + case CollectdPackage.COLLECTD_VMEM__WRITTEN: + return WRITTEN_EDEFAULT == null ? written != null : !WRITTEN_EDEFAULT.equals(written); + case CollectdPackage.COLLECTD_VMEM__MEMORY_IN: + return MEMORY_IN_EDEFAULT == null ? memory_in != null : !MEMORY_IN_EDEFAULT.equals(memory_in); + case CollectdPackage.COLLECTD_VMEM__MEMORY_OUT: + return MEMORY_OUT_EDEFAULT == null ? memory_out != null : !MEMORY_OUT_EDEFAULT.equals(memory_out); + case CollectdPackage.COLLECTD_VMEM__SWAP_IN: + return SWAP_IN_EDEFAULT == null ? swap_in != null : !SWAP_IN_EDEFAULT.equals(swap_in); + case CollectdPackage.COLLECTD_VMEM__SWAP_OUT: + return SWAP_OUT_EDEFAULT == null ? swap_out != null : !SWAP_OUT_EDEFAULT.equals(swap_out); + case CollectdPackage.COLLECTD_VMEM__FAULTS_MINOR: + return FAULTS_MINOR_EDEFAULT == null ? faults_minor != null : !FAULTS_MINOR_EDEFAULT.equals(faults_minor); + case CollectdPackage.COLLECTD_VMEM__FAULTS_MAJOR: + return FAULTS_MAJOR_EDEFAULT == null ? faults_major != null : !FAULTS_MAJOR_EDEFAULT.equals(faults_major); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (active_anon: "); + result.append(active_anon); + result.append(", active_file: "); + result.append(active_file); + result.append(", anon_pages: "); + result.append(anon_pages); + result.append(", anon_transparent_hugepages: "); + result.append(anon_transparent_hugepages); + result.append(", bounce: "); + result.append(bounce); + result.append(", dirtied: "); + result.append(dirtied); + result.append(", dirty: "); + result.append(dirty); + result.append(", dirty_background_threshold: "); + result.append(dirty_background_threshold); + result.append(", dirty_threshold: "); + result.append(dirty_threshold); + result.append(", file_pages: "); + result.append(file_pages); + result.append(", free_pages: "); + result.append(free_pages); + result.append(", inactive_anon: "); + result.append(inactive_anon); + result.append(", inactive_file: "); + result.append(inactive_file); + result.append(", isolated_anon: "); + result.append(isolated_anon); + result.append(", isolated_file: "); + result.append(isolated_file); + result.append(", kernel_stack: "); + result.append(kernel_stack); + result.append(", mapped: "); + result.append(mapped); + result.append(", mlock: "); + result.append(mlock); + result.append(", page_table_pages: "); + result.append(page_table_pages); + result.append(", shmem: "); + result.append(shmem); + result.append(", slab_reclaimable: "); + result.append(slab_reclaimable); + result.append(", slab_unreclaimable: "); + result.append(slab_unreclaimable); + result.append(", unevictable: "); + result.append(unevictable); + result.append(", unstable: "); + result.append(unstable); + result.append(", vmscan_immediate_reclaim: "); + result.append(vmscan_immediate_reclaim); + result.append(", vmscan_write: "); + result.append(vmscan_write); + result.append(", writeback: "); + result.append(writeback); + result.append(", writeback_temp: "); + result.append(writeback_temp); + result.append(", written: "); + result.append(written); + result.append(", memory_in: "); + result.append(memory_in); + result.append(", memory_out: "); + result.append(memory_out); + result.append(", swap_in: "); + result.append(swap_in); + result.append(", swap_out: "); + result.append(swap_out); + result.append(", faults_minor: "); + result.append(faults_minor); + result.append(", faults_major: "); + result.append(faults_major); + result.append(')'); + return result.toString(); + } + +} //CollectdVmemImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdAdapterFactory.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdAdapterFactory.java new file mode 100644 index 0000000..6c453b8 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdAdapterFactory.java @@ -0,0 +1,379 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.AlertContainer; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage + * @generated + */ +public class CollectdAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CollectdPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CollectdAdapterFactory() { + if (modelPackage == null) { + modelPackage = CollectdPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CollectdSwitch modelSwitch = + new CollectdSwitch() { + @Override + public Adapter caseCollectdServer(CollectdServer object) { + return createCollectdServerAdapter(); + } + @Override + public Adapter caseCollectdMemory(CollectdMemory object) { + return createCollectdMemoryAdapter(); + } + @Override + public Adapter caseCollectdSwap(CollectdSwap object) { + return createCollectdSwapAdapter(); + } + @Override + public Adapter caseCollectdProcesses(CollectdProcesses object) { + return createCollectdProcessesAdapter(); + } + @Override + public Adapter caseCollectdVmem(CollectdVmem object) { + return createCollectdVmemAdapter(); + } + @Override + public Adapter caseCollectdCpu(CollectdCpu object) { + return createCollectdCpuAdapter(); + } + @Override + public Adapter caseCollectdDisk(CollectdDisk object) { + return createCollectdDiskAdapter(); + } + @Override + public Adapter caseCollectdFileSystem(CollectdFileSystem object) { + return createCollectdFileSystemAdapter(); + } + @Override + public Adapter caseCollectdInterface(CollectdInterface object) { + return createCollectdInterfaceAdapter(); + } + @Override + public Adapter caseCollectdKvmInstance(CollectdKvmInstance object) { + return createCollectdKvmInstanceAdapter(); + } + @Override + public Adapter caseCollectdKvmDisk(CollectdKvmDisk object) { + return createCollectdKvmDiskAdapter(); + } + @Override + public Adapter caseCollectdKvmInterface(CollectdKvmInterface object) { + return createCollectdKvmInterfaceAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseAlertContainer(AlertContainer object) { + return createAlertContainerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdServer + * @generated + */ + public Adapter createCollectdServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory Memory}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdMemory + * @generated + */ + public Adapter createCollectdMemoryAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap Swap}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdSwap + * @generated + */ + public Adapter createCollectdSwapAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses Processes}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdProcesses + * @generated + */ + public Adapter createCollectdProcessesAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem Vmem}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdVmem + * @generated + */ + public Adapter createCollectdVmemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu Cpu}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdCpu + * @generated + */ + public Adapter createCollectdCpuAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk Disk}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdDisk + * @generated + */ + public Adapter createCollectdDiskAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem File System}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFileSystem + * @generated + */ + public Adapter createCollectdFileSystemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface Interface}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdInterface + * @generated + */ + public Adapter createCollectdInterfaceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance Kvm Instance}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInstance + * @generated + */ + public Adapter createCollectdKvmInstanceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk Kvm Disk}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmDisk + * @generated + */ + public Adapter createCollectdKvmDiskAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface Kvm Interface}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdKvmInterface + * @generated + */ + public Adapter createCollectdKvmInterfaceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.AlertContainer Alert Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.AlertContainer + * @generated + */ + public Adapter createAlertContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CollectdAdapterFactory diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdSwitch.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdSwitch.java new file mode 100644 index 0000000..d9aaac2 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/collectd/util/CollectdSwitch.java @@ -0,0 +1,412 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.collectd.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.AlertContainer; + +import org.openecomp.ncomp.sirius.manager.agent.collectd.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage + * @generated + */ +public class CollectdSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CollectdPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CollectdSwitch() { + if (modelPackage == null) { + modelPackage = CollectdPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CollectdPackage.COLLECTD_SERVER: { + CollectdServer collectdServer = (CollectdServer)theEObject; + T result = caseCollectdServer(collectdServer); + if (result == null) result = caseNamedEntity(collectdServer); + if (result == null) result = caseAlertContainer(collectdServer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_MEMORY: { + CollectdMemory collectdMemory = (CollectdMemory)theEObject; + T result = caseCollectdMemory(collectdMemory); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_SWAP: { + CollectdSwap collectdSwap = (CollectdSwap)theEObject; + T result = caseCollectdSwap(collectdSwap); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_PROCESSES: { + CollectdProcesses collectdProcesses = (CollectdProcesses)theEObject; + T result = caseCollectdProcesses(collectdProcesses); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_VMEM: { + CollectdVmem collectdVmem = (CollectdVmem)theEObject; + T result = caseCollectdVmem(collectdVmem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_CPU: { + CollectdCpu collectdCpu = (CollectdCpu)theEObject; + T result = caseCollectdCpu(collectdCpu); + if (result == null) result = caseNamedEntity(collectdCpu); + if (result == null) result = caseAlertContainer(collectdCpu); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_DISK: { + CollectdDisk collectdDisk = (CollectdDisk)theEObject; + T result = caseCollectdDisk(collectdDisk); + if (result == null) result = caseNamedEntity(collectdDisk); + if (result == null) result = caseAlertContainer(collectdDisk); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_FILE_SYSTEM: { + CollectdFileSystem collectdFileSystem = (CollectdFileSystem)theEObject; + T result = caseCollectdFileSystem(collectdFileSystem); + if (result == null) result = caseNamedEntity(collectdFileSystem); + if (result == null) result = caseAlertContainer(collectdFileSystem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_INTERFACE: { + CollectdInterface collectdInterface = (CollectdInterface)theEObject; + T result = caseCollectdInterface(collectdInterface); + if (result == null) result = caseNamedEntity(collectdInterface); + if (result == null) result = caseAlertContainer(collectdInterface); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_KVM_INSTANCE: { + CollectdKvmInstance collectdKvmInstance = (CollectdKvmInstance)theEObject; + T result = caseCollectdKvmInstance(collectdKvmInstance); + if (result == null) result = caseNamedEntity(collectdKvmInstance); + if (result == null) result = caseAlertContainer(collectdKvmInstance); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_KVM_DISK: { + CollectdKvmDisk collectdKvmDisk = (CollectdKvmDisk)theEObject; + T result = caseCollectdKvmDisk(collectdKvmDisk); + if (result == null) result = caseNamedEntity(collectdKvmDisk); + if (result == null) result = caseAlertContainer(collectdKvmDisk); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CollectdPackage.COLLECTD_KVM_INTERFACE: { + CollectdKvmInterface collectdKvmInterface = (CollectdKvmInterface)theEObject; + T result = caseCollectdKvmInterface(collectdKvmInterface); + if (result == null) result = caseNamedEntity(collectdKvmInterface); + if (result == null) result = caseAlertContainer(collectdKvmInterface); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdServer(CollectdServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Memory'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Memory'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdMemory(CollectdMemory object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Swap'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Swap'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdSwap(CollectdSwap object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Processes'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Processes'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdProcesses(CollectdProcesses object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Vmem'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Vmem'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdVmem(CollectdVmem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Cpu'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Cpu'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdCpu(CollectdCpu object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Disk'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Disk'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdDisk(CollectdDisk object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'File System'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File System'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdFileSystem(CollectdFileSystem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Interface'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Interface'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdInterface(CollectdInterface object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Kvm Instance'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Kvm Instance'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdKvmInstance(CollectdKvmInstance object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Kvm Disk'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Kvm Disk'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdKvmDisk(CollectdKvmDisk object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Kvm Interface'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Kvm Interface'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCollectdKvmInterface(CollectdKvmInterface object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Alert Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Alert Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAlertContainer(AlertContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CollectdSwitch diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringFactory.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringFactory.java new file mode 100644 index 0000000..6f79b2c --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringFactory.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.sirius.manager.agent.monitoring; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage + * @generated + */ +public interface MonitoringFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + MonitoringFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.MonitoringFactoryImpl.init(); + + /** + * Returns a new object of class 'Sirius Manager Agent Server'. + * + * + * @return a new object of class 'Sirius Manager Agent Server'. + * @generated + */ + SiriusManagerAgentServer createSiriusManagerAgentServer(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + MonitoringPackage getMonitoringPackage(); + +} //MonitoringFactory diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringPackage.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringPackage.java new file mode 100644 index 0000000..6d8c813 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/MonitoringPackage.java @@ -0,0 +1,263 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.monitoring; + +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-agent-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager.agent'" + * @generated + */ +public interface MonitoringPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "monitoring"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.agent.monitoring"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "monitoring"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + MonitoringPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.MonitoringPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl Sirius Manager Agent Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.MonitoringPackageImpl#getSiriusManagerAgentServer() + * @generated + */ + int SIRIUS_MANAGER_AGENT_SERVER = 0; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER__COMPONENT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Sirius Manager Agent Server' class. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER_FEATURE_COUNT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___LOGS__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___METRICS__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___PROPERTIES__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___UPLOAD_INFO__JSONOBJECT_ELIST = ServerPackage.SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___EVALUATE__STRING_FUNCTION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER___UPDATE__STRING_FUNCTION = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 5; + + /** + * The number of operations of the 'Sirius Manager Agent Server' class. + * + * + * @generated + * @ordered + */ + int SIRIUS_MANAGER_AGENT_SERVER_OPERATION_COUNT = ServerPackage.SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 6; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer Sirius Manager Agent Server}'. + * + * + * @return the meta object for class 'Sirius Manager Agent Server'. + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer + * @generated + */ + EClass getSiriusManagerAgentServer(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + MonitoringFactory getMonitoringFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl Sirius Manager Agent Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.MonitoringPackageImpl#getSiriusManagerAgentServer() + * @generated + */ + EClass SIRIUS_MANAGER_AGENT_SERVER = eINSTANCE.getSiriusManagerAgentServer(); + + } + +} //MonitoringPackage diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/SiriusManagerAgentServer.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/SiriusManagerAgentServer.java new file mode 100644 index 0000000..a7c9dfa --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/SiriusManagerAgentServer.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.monitoring; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +/** + * + * A representation of the model object 'Sirius Manager Agent Server'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage#getSiriusManagerAgentServer() + * @model + * @generated + */ +public interface SiriusManagerAgentServer extends SouthBoundApiWithProxy, AbstractManagementServer { +} // SiriusManagerAgentServer diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringFactoryImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringFactoryImpl.java new file mode 100644 index 0000000..089490b --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.monitoring.impl; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class MonitoringFactoryImpl extends EFactoryImpl implements MonitoringFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static MonitoringFactory init() { + try { + MonitoringFactory theMonitoringFactory = (MonitoringFactory)EPackage.Registry.INSTANCE.getEFactory(MonitoringPackage.eNS_URI); + if (theMonitoringFactory != null) { + return theMonitoringFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new MonitoringFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public MonitoringFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER: return createSiriusManagerAgentServer(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SiriusManagerAgentServer createSiriusManagerAgentServer() { + SiriusManagerAgentServerImpl siriusManagerAgentServer = new SiriusManagerAgentServerImpl(); + return siriusManagerAgentServer; + } + + /** + * + * + * @generated + */ + public MonitoringPackage getMonitoringPackage() { + return (MonitoringPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static MonitoringPackage getPackage() { + return MonitoringPackage.eINSTANCE; + } + +} //MonitoringFactoryImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringPackageImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringPackageImpl.java new file mode 100644 index 0000000..6e42e53 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/MonitoringPackageImpl.java @@ -0,0 +1,196 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.monitoring.impl; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringFactory; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; + +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class MonitoringPackageImpl extends EPackageImpl implements MonitoringPackage { + /** + * + * + * @generated + */ + private EClass siriusManagerAgentServerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link MonitoringPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static MonitoringPackage init() { + if (isInited) return (MonitoringPackage)EPackage.Registry.INSTANCE.getEPackage(MonitoringPackage.eNS_URI); + + // Obtain or create and register package + MonitoringPackageImpl theMonitoringPackage = (MonitoringPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MonitoringPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MonitoringPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + ServerPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theMonitoringPackage.createPackageContents(); + + // Initialize created meta-data + theMonitoringPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theMonitoringPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(MonitoringPackage.eNS_URI, theMonitoringPackage); + return theMonitoringPackage; + } + + /** + * + * + * @generated + */ + public EClass getSiriusManagerAgentServer() { + return siriusManagerAgentServerEClass; + } + + /** + * + * + * @generated + */ + public MonitoringFactory getMonitoringFactory() { + return (MonitoringFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + siriusManagerAgentServerEClass = createEClass(SIRIUS_MANAGER_AGENT_SERVER); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + ServerPackage theServerPackage = (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + siriusManagerAgentServerEClass.getESuperTypes().add(theServerPackage.getSouthBoundApiWithProxy()); + siriusManagerAgentServerEClass.getESuperTypes().add(theServerPackage.getAbstractManagementServer()); + + // Initialize classes, features, and operations; add parameters + initEClass(siriusManagerAgentServerEClass, SiriusManagerAgentServer.class, "SiriusManagerAgentServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //MonitoringPackageImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/SiriusManagerAgentServerImpl.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/SiriusManagerAgentServerImpl.java new file mode 100644 index 0000000..3ab36c1 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/impl/SiriusManagerAgentServerImpl.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.sirius.manager.agent.monitoring.impl; + +import org.openecomp.ncomp.component.Component; + +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; + +import org.openecomp.ncomp.core.logs.LogMessage; + +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl; + +import java.lang.reflect.InvocationTargetException; + +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.json.JSONObject; + +/** + * + * An implementation of the model object 'Sirius Manager Agent Server'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl#getComponent Component}
  • + *
+ *

+ * + * @generated + */ +public class SiriusManagerAgentServerImpl extends SouthBoundApiWithProxyImpl implements SiriusManagerAgentServer { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected AbstractManagementServerConfiguration configuration; + + /** + * The cached value of the '{@link #getComponent() Component}' containment reference. + * + * + * @see #getComponent() + * @generated + * @ordered + */ + protected Component component; + + /** + * + * + * @generated + */ + protected SiriusManagerAgentServerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MonitoringPackage.Literals.SIRIUS_MANAGER_AGENT_SERVER; + } + + /** + * + * + * @generated + */ + public AbstractManagementServerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(AbstractManagementServerConfiguration newConfiguration, NotificationChain msgs) { + AbstractManagementServerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(AbstractManagementServerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public Component getComponent() { + return component; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) { + Component oldComponent = component; + component = newComponent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT, oldComponent, newComponent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setComponent(Component newComponent) { + if (newComponent != component) { + NotificationChain msgs = null; + if (component != null) + msgs = ((InternalEObject)component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT, null, msgs); + if (newComponent != null) + msgs = ((InternalEObject)newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT, null, msgs); + msgs = basicSetComponent(newComponent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT, newComponent, newComponent)); + } + + /** + * + * + * @generated + */ + public EList getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getValuesAll(JSONObject cx, String path, EList metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getMessages(JSONObject cx, String path, Long start, Long end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList evaluate(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void update(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: + return basicSetComponent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: + return getConfiguration(); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: + return getComponent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)newValue); + return; + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: + setComponent((Component)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)null); + return; + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: + setComponent((Component)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: + return configuration != null; + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: + return component != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (derivedFeatureID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION; + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT: return ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (baseFeatureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__CONFIGURATION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER__COMPONENT; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedOperationID(int baseOperationID, Class baseClass) { + if (baseClass == AbstractManagementServer.class) { + switch (baseOperationID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___EVALUATE__STRING_FUNCTION; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION: return MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___UPDATE__STRING_FUNCTION; + default: return -1; + } + } + return super.eDerivedOperationID(baseOperationID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValues((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3), (MetricValueOption)arguments.get(4), (Boolean)arguments.get(5)); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValuesAll((JSONObject)arguments.get(0), (String)arguments.get(1), (EList)arguments.get(2), (Long)arguments.get(3), (Long)arguments.get(4), (MetricValueOption)arguments.get(5), (Boolean)arguments.get(6)); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: + return getMessages((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3)); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: + return getRequestLogger((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (JSONObject)arguments.get(3)); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___EVALUATE__STRING_FUNCTION: + return evaluate((String)arguments.get(0), (Function)arguments.get(1)); + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER___UPDATE__STRING_FUNCTION: + update((String)arguments.get(0), (Function)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //SiriusManagerAgentServerImpl diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringAdapterFactory.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringAdapterFactory.java new file mode 100644 index 0000000..8a05f8f --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringAdapterFactory.java @@ -0,0 +1,199 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.agent.monitoring.util; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.*; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage + * @generated + */ +public class MonitoringAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static MonitoringPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public MonitoringAdapterFactory() { + if (modelPackage == null) { + modelPackage = MonitoringPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected MonitoringSwitch modelSwitch = + new MonitoringSwitch() { + @Override + public Adapter caseSiriusManagerAgentServer(SiriusManagerAgentServer object) { + return createSiriusManagerAgentServerAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer Sirius Manager Agent Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer + * @generated + */ + public Adapter createSiriusManagerAgentServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //MonitoringAdapterFactory diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringSwitch.java b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringSwitch.java new file mode 100644 index 0000000..f6f2dc2 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/agent/monitoring/util/MonitoringSwitch.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.sirius.manager.agent.monitoring.util; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.*; + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage + * @generated + */ +public class MonitoringSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static MonitoringPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public MonitoringSwitch() { + if (modelPackage == null) { + modelPackage = MonitoringPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case MonitoringPackage.SIRIUS_MANAGER_AGENT_SERVER: { + SiriusManagerAgentServer siriusManagerAgentServer = (SiriusManagerAgentServer)theEObject; + T result = caseSiriusManagerAgentServer(siriusManagerAgentServer); + if (result == null) result = caseAbstractManagementServer(siriusManagerAgentServer); + if (result == null) result = caseSouthBoundApiWithProxy(siriusManagerAgentServer); + if (result == null) result = caseSouthBoundApi(siriusManagerAgentServer); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Sirius Manager Agent Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Sirius Manager Agent Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSiriusManagerAgentServer(SiriusManagerAgentServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //MonitoringSwitch diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore/collectd.xcore b/ncomp-sirius-manager-agent-model/src/main/xcore/collectd.xcore new file mode 100644 index 0000000..ae45679 --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore/collectd.xcore @@ -0,0 +1,169 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-agent-model/src/main/xcore-gen") +package org.openecomp.ncomp.sirius.manager.agent.collectd + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.alerts.AlertContainer +import org.openecomp.ncomp.core.DoubleMetricAttribute +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute + +annotation 'http://openecomp.org/sirius/doc' as doc + +class CollectdServer extends NamedEntity, AlertContainer { + transient DoubleMetricAttribute load_shortterm + transient DoubleMetricAttribute load_midterm + transient DoubleMetricAttribute load_longterm + transient DoubleMetricAttribute entropy + transient IncreasingULongMetricAttribute contextswitches + contains CollectdCpu[] cpus + contains CollectdMemory memory + contains CollectdSwap swap + contains CollectdProcesses processes + contains CollectdVmem vmem + contains CollectdFileSystem[] filesystems + contains CollectdDisk[] disks + contains CollectdInterface[] interfaces + contains CollectdKvmInstance[] instances +} + +class CollectdMemory { + transient DoubleMetricAttribute buffered + transient DoubleMetricAttribute cached + transient DoubleMetricAttribute free + transient DoubleMetricAttribute used +} + +class CollectdSwap { + transient DoubleMetricAttribute cached + transient DoubleMetricAttribute free + transient DoubleMetricAttribute used +} + + +class CollectdProcesses { + transient IncreasingULongMetricAttribute fork_rate + transient DoubleMetricAttribute blocked + transient DoubleMetricAttribute paging + transient DoubleMetricAttribute running + transient DoubleMetricAttribute sleeping + transient DoubleMetricAttribute stopped + transient DoubleMetricAttribute zombies +} + +class CollectdVmem { + transient DoubleMetricAttribute active_anon + transient DoubleMetricAttribute active_file + transient DoubleMetricAttribute anon_pages + transient DoubleMetricAttribute anon_transparent_hugepages + transient DoubleMetricAttribute bounce + transient DoubleMetricAttribute dirtied + transient DoubleMetricAttribute dirty + transient DoubleMetricAttribute dirty_background_threshold + transient DoubleMetricAttribute dirty_threshold + transient DoubleMetricAttribute file_pages + transient DoubleMetricAttribute free_pages + transient DoubleMetricAttribute inactive_anon + transient DoubleMetricAttribute inactive_file + transient DoubleMetricAttribute isolated_anon + transient DoubleMetricAttribute isolated_file + transient DoubleMetricAttribute kernel_stack + transient DoubleMetricAttribute mapped + transient DoubleMetricAttribute mlock + transient DoubleMetricAttribute page_table_pages + transient DoubleMetricAttribute shmem + transient DoubleMetricAttribute slab_reclaimable + transient DoubleMetricAttribute slab_unreclaimable + transient DoubleMetricAttribute unevictable + transient DoubleMetricAttribute unstable + transient DoubleMetricAttribute vmscan_immediate_reclaim + transient DoubleMetricAttribute vmscan_write + transient DoubleMetricAttribute writeback + transient DoubleMetricAttribute writeback_temp + transient DoubleMetricAttribute written + transient IncreasingULongMetricAttribute memory_in + transient IncreasingULongMetricAttribute memory_out + transient IncreasingULongMetricAttribute swap_in + transient IncreasingULongMetricAttribute swap_out + transient IncreasingULongMetricAttribute faults_minor + transient IncreasingULongMetricAttribute faults_major + +} + +class CollectdCpu extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute idle + transient IncreasingULongMetricAttribute wait + transient IncreasingULongMetricAttribute user + transient IncreasingULongMetricAttribute system +} + +class CollectdDisk extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute disk_merged_read + transient IncreasingULongMetricAttribute disk_merged_write + @doc(unit="byte") + transient IncreasingULongMetricAttribute disk_octets_read + transient IncreasingULongMetricAttribute disk_octets_write + transient IncreasingULongMetricAttribute disk_ops_read + transient IncreasingULongMetricAttribute disk_ops_write + transient IncreasingULongMetricAttribute disk_time_read + transient IncreasingULongMetricAttribute disk_time_write +} + +class CollectdFileSystem extends NamedEntity, AlertContainer { + transient DoubleMetricAttribute used + transient DoubleMetricAttribute free +} + +class CollectdInterface extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute if_errors_rx + transient IncreasingULongMetricAttribute if_errors_tx + transient IncreasingULongMetricAttribute if_octets_rx + transient IncreasingULongMetricAttribute if_octets_tx + transient IncreasingULongMetricAttribute if_packets_rx + transient IncreasingULongMetricAttribute if_packets_tx +} + +class CollectdKvmInstance extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute virt_cpu_total + contains CollectdKvmDisk[] disks + contains CollectdKvmInterface[] interfaces + +} + +class CollectdKvmDisk extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute disk_octets_read + transient IncreasingULongMetricAttribute disk_octets_write + transient IncreasingULongMetricAttribute disk_ops_read + transient IncreasingULongMetricAttribute disk_ops_write +} + +class CollectdKvmInterface extends NamedEntity, AlertContainer { + transient IncreasingULongMetricAttribute if_errors_rx + transient IncreasingULongMetricAttribute if_errors_tx + transient IncreasingULongMetricAttribute if_dropped_rx + transient IncreasingULongMetricAttribute if_dropped_tx + transient IncreasingULongMetricAttribute if_octets_rx + transient IncreasingULongMetricAttribute if_octets_tx + transient IncreasingULongMetricAttribute if_packets_rx + transient IncreasingULongMetricAttribute if_packets_tx +} + diff --git a/ncomp-sirius-manager-agent-model/src/main/xcore/server.xcore b/ncomp-sirius-manager-agent-model/src/main/xcore/server.xcore new file mode 100644 index 0000000..01714ea --- /dev/null +++ b/ncomp-sirius-manager-agent-model/src/main/xcore/server.xcore @@ -0,0 +1,32 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-agent-model/src/main/xcore-gen") + + +package org.openecomp.ncomp.sirius.manager.agent.monitoring + +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + +class SiriusManagerAgentServer extends SouthBoundApiWithProxy, AbstractManagementServer { +} + diff --git a/ncomp-sirius-manager-agent-server/.classpath b/ncomp-sirius-manager-agent-server/.classpath new file mode 100644 index 0000000..d2d34b3 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-agent-server/.gitignore b/ncomp-sirius-manager-agent-server/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-agent-server/.project b/ncomp-sirius-manager-agent-server/.project new file mode 100644 index 0000000..e8e8aee --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.project @@ -0,0 +1,35 @@ + + + ncomp-sirius-manager-agent-server + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-agent-server/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..4ede96d --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning diff --git a/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/ncomp-sirius-manager-agent-server/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-agent-server/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-agent-server/LICENSE.txt b/ncomp-sirius-manager-agent-server/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/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-sirius-manager-agent-server/META-INF/MANIFEST.MF b/ncomp-sirius-manager-agent-server/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1f28bfc --- /dev/null +++ b/ncomp-sirius-manager-agent-server/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ncomp-sirius-manager-agent-server +Bundle-SymbolicName: ncomp-sirius-manager-agent-server +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.sirius.manager.agent.server.tools, + org.openecomp.ncomp.sirius.manager.agent.servers.monitoring +Require-Bundle: ncomp-core-types, + ncomp-sirius-manager-model, + ncomp-sirius-manager-server, + ncomp-sirius-manager-console, + ncomp-sirius-manager-generator, + ncomp-utils-java;bundle-version="0.1.0", + ncomp-sirius-manager-agent-model;bundle-version="0.1.0", + ncomp-utils-java-extra;bundle-version="0.1.0" diff --git a/ncomp-sirius-manager-agent-server/build.properties b/ncomp-sirius-manager-agent-server/build.properties new file mode 100644 index 0000000..80bc250 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/build.properties @@ -0,0 +1,6 @@ +source.. = src/main/java/,\ + src/main/resources/,\ + src/test/java/,\ + src/test/resources/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-sirius-manager-agent-server/pom.xml b/ncomp-sirius-manager-agent-server/pom.xml new file mode 100644 index 0000000..cd4de2a --- /dev/null +++ b/ncomp-sirius-manager-agent-server/pom.xml @@ -0,0 +1,169 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-server + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + 0.1.0-SNAPSHOT + ../ncomp-sirius-manager-base + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + 2.6 + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + + copy-dependencies + + prepare-package + + false + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + org.opendaylight,com.brocade.odl,ch.qos.logback + provided + + + + + + maven-resources-plugin + 2.6 + + + copy-version + + copy-resources + + validate + + ${basedir}/target/versions + + + src/main/resources/versions + + version.properties + + true + + + + + + copy-resources + + copy-resources + + validate + + ${basedir}/target/etc/bvc-extensions + + + src/main/resources/etc/bvc-extensions + + feature_config_template.cfg + feature_custom.install + + true + + + + + + + + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-agent-model + ${project.version} + + + org.openecomp.ncomp.utils + ncomp-utils-java-extra + ${project.version} + + + diff --git a/ncomp-sirius-manager-agent-server/src/assembly/assemble_zip.xml b/ncomp-sirius-manager-agent-server/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..4229587 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/assembly/assemble_zip.xml @@ -0,0 +1,61 @@ + + + + runtime + + zip + + + + false + + + + target + lib + + ncomp-sirius-manager-agent-server-${project.artifactId}.jar + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server-gen/scripts + scripts + + + src/main/server/scripts + scripts + + + + diff --git a/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/Generator.java b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/Generator.java new file mode 100644 index 0000000..f09b110 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/Generator.java @@ -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============================================ + */ + +package org.openecomp.ncomp.sirius.manager.agent.server.tools; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.generator.ControllerGenerator; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringFactory; + + +public class Generator { + + /** + * @param args + */ + public static void main(String[] args) { + @SuppressWarnings("unused") + MonitoringFactory f = MonitoringFactory.eINSTANCE; + EObject o = MonitoringFactory.eINSTANCE.createSiriusManagerAgentServer(); + EPackage p = o.eClass().getEPackage(); + String dir = p.getNsURI().replace(p.getNsPrefix(),"") + "servers." + p.getNsPrefix(); + dir= "src/main/sirius-gen/" + dir.replace('.', '/'); + ControllerModel m = ControllermodelFactory.eINSTANCE.createControllerModel(); + m.setTemplateDirectory("../../dcae-org.openecomp.ncomp.sirius.manager/ncomp-sirius-manager-generator/src/main/templates"); + m.setPrefix("Agent"); + m.setPluginName(p.getNsURI()); + m.setName("SiriusManagerAgentServer"); + m.setTitle("SiriusManagerAgentServer"); + ControllerGenerator g = new ControllerGenerator(o,m); + g.setEnableIRequestHandler(false); + g.setEnableISiriusPlugin(true); + EObject gui = ModelFactory.eINSTANCE.createGuiClientApi(); + g.addObject("gui",gui,m); + EObject e = org.openecomp.ncomp.sirius.manager.server.ServerFactory.eINSTANCE.createSouthBoundApi(); + g.addObject("south",e,m); + //g.addFactory("org.openecomp.ncomp.sirius.servers.openstack.OsOpenstackFactory"); + //g.enableDrools(); + g.generate(dir); + g.generateScripts("src/main/server-gen/bin","sirius-manager-agent-server"); + } + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/MonitoringUtil.groovy b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/MonitoringUtil.groovy new file mode 100644 index 0000000..657d3dd --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/server/tools/MonitoringUtil.groovy @@ -0,0 +1,438 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.agent.server.tools + +import java.io.File; +import java.util.TimeZone; + +import groovy.io.FileType + +import java.util.regex.Pattern; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList +import org.eclipse.emf.common.util.EList +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EAttribute + +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogsFactory; +import org.openecomp.ncomp.core.logs.LogMessage +import org.openecomp.ncomp.core.logs.LogSeverity; +import org.openecomp.ncomp.core.metrics.Metric +import org.openecomp.ncomp.core.metrics.MetricsFactory +import org.openecomp.ncomp.core.metrics.StringMetric +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient +import org.openecomp.ncomp.sirius.manager.ManagementServer +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdFactory; +import org.openecomp.ncomp.sirius.manager.agent.collectd.CollectdPackage; +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south.AgentSouthBoundApiClient +import org.openecomp.ncomp.sirius.manager.ModuleReporter; +import org.openecomp.ncomp.sirius.manager.model.* +import org.openecomp.ncomp.sirius.manager.properties.PropertiesFactory; +import org.openecomp.ncomp.sirius.manager.properties.Property +import org.openecomp.ncomp.utils.extra.FileTail +import org.openecomp.ncomp.utils.extra.FileTail.NewLineHandler +import org.openecomp.ncomp.webservice.utils.DateUtils; +import org.openecomp.ncomp.sirius.manager.logs.LogMessageSuppressor +import org.openecomp.ncomp.sirius.manager.logs.LogMessageSuppressor.ILogMessageHandler + +class MonitoringUtil implements NewLineHandler, ILogMessageHandler { + public static final Logger logger = Logger.getLogger(MonitoringUtil.class); + Properties props + def format = "/var/lib/collectd/csv/*/*/.*-%Y-%m-%d" + def directory = "data" + def scanFreq = null + def scanNewFreq = null + def scanDuration = null + long reportFreq = DateUtils.stringToDuration("1min") + long sendFreq = DateUtils.stringToDuration("30sec"); + LogMessageSuppressor logSup = new LogMessageSuppressor(this,300*1000) + AgentSouthBoundApiClient api + def MonitoringUtil(ManagementServer s) { + logger.warn("monitor restarting") + api = new AgentSouthBoundApiClient("monitoring.properties", "lc1","lc2") + props = s.props + def donemodule = [:] + props.keySet().each { k -> +// System.err.println "key = $k -> ${props.get(k)}" + switch (k) { + case ~/commands\..*\.command/: + def a = k.split("\\.") + def x = [name:a[1]] + x["command"] = props.get(k) + x["timeout"] = Long.parseLong(props.getProperty("commands.${x.name}.timeout","60000")) + x["freq"] = Long.parseLong(props.getProperty("commands.${x.name}.freq","3600000")) + commands += [x] + break; + case ~/logs\..*\.file/: + def a = k.split("\\.") + def x = [name:a[1]] + x["file"] = props.get(k) + x["regexp"] = Pattern.compile(props.getProperty("logs.${x.name}.regexp",".*")) + x["path"] = props.getProperty("logs.${x.name}.path","") + x["sev"] = LogSeverity.get(props.getProperty("logs.${x.name}.severity","UNKNOWN")) + if (x["sev"] == null) x["sev"] = LogSeverity.UNKNOWN + x["level"] = LogLevel.get(props.getProperty("logs.${x.name}.level","INFO")) + if (x["level"] == null) x["level"] = LogLevel.UNKNOWN + try {x["levelField"] = Integer.parseInt(props.getProperty("logs.${x.name}.levelField")) } catch (e) {} + logs += [x] + break; + case ~/module\.[^.]*\.(file|jar|command)/: + def a = k.split("\\.") + def x = [name:a[1], submodules:[]] + x["file"] = props.getProperty("module.${x.name}.file",null) + x["jarName"] = props.getProperty("module.${x.name}.jar",null) + x["command"] = props.getProperty("module.${x.name}.command",null) + x["version"] = props.getProperty("module.${x.name}.version",'${version} ${build.time}') + modules += [x] + name2module[x.name] = x + break; + } + } + props.keySet().each { k -> +// System.err.println "key = $k -> ${props.get(k)}" + switch (k) { + case ~/module\..*\.submodule\..*\.(file|jar|command|version)/: + def a = k.split("\\.") + def x = [name:a[3]] + def m = name2module[a[1]] + if (m == null) { logger.warn "No module for submodule: $k"; return } + def prefix = "module.${m.name}.submodule.${x.name}" + if (donemodule[prefix] != null) return + donemodule[prefix] = 1 + x["file"] = props.getProperty("${prefix}.file",null) + x["jarName"] = props.getProperty("${prefix}.jar",null) + x["command"] = props.getProperty("${prefix}.command",null) + x["version"] = props.getProperty("${prefix}.version",'${version} ${build.time}') + m.submodules += x + System.err.println "Adding submodule $prefix $x" + break; + } + } + logger.info("logs = $logs") + logger.info("commands = $commands") + logger.info("modules = $modules") + } + def commands = [] + def logs = [] + def modules = [] + def name2module = [:] + def void run() { + modules.each { m -> + ModuleReporter r = new ModuleReporter(api,m.name,m.jarName,m.file,m.command,m.version); + m.submodules.each { m1 -> + r.addSubmodule(m1.name,m1.jarName,m1.file,m1.command,m1.version); + } + r.start(); + } + Thread.start("run commands") { + try { + while (true) { + runCommands() + sleep 60000 // sleep a minute + } + } + catch (e) { + logger.fatal("run commands thread DIED: $e") + } + } + new FileTail(format, directory, scanFreq, scanNewFreq, scanDuration, this, null); + logs.each{ x -> + new FileTail(x.file, "$directory/logs/$x.name", "10sec", this, x); + } + } + def lastRun = [:] + def void runCommands() { + def dirName = "commandOutputs" + def dir = new File(dirName) + dir.deleteDir() + dir.mkdirs() + long now = new Date().time + commands.each { c -> + if (lastRun[c.name] && lastRun[c.name] + c.freq > now) return + lastRun[c.name] = now + def sout = new StringBuffer() + def serr = new StringBuffer() + def cmd = "$c.command ${dir.getAbsolutePath()}" + logger.info("running $cmd") + def proc = cmd.execute() + proc.consumeProcessOutput(sout, serr) + proc.waitForOrKill(c.timeout) + if (sout.toString() != "") logger.info("output: $sout") + if (serr.toString() != "") logger.warn("error : $serr") + } + EList propertyList = new BasicEList() + dir.eachFileRecurse (FileType.FILES) { File file -> + Property x = PropertiesFactory.eINSTANCE.createProperty() + x.name = file.absolutePath.substring(dir.absolutePath.length()) + x.value = file.text + propertyList += x + } + if (propertyList.size() > 0) + api.properties(null,propertyList) + // Note this information is getting handled in the BSA Controller updateProperties + } + static main(args) { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + // scan collectd data and forwards it to location controller. + logger.warn "Starting server" + def agent = new MonitoringUtil() +// agent.test() + agent.run() + } + + void test() { + def f = [ + "/var/lib/collectd/csv/bsa-blade3/memory/memory-buffered-2013-08-29", + "/var/lib/collectd/csv/bsa-blade3/df/df-ndata2-2013-08-29", + "/var/lib/collectd/csv/bsa-blade3/disk-nbd15/disk_merged-2013-08-29", + "/var/lib/collectd/csv/bsa-blade3/interface/if_packets-vnet0-2013-08-29", + "/var/lib/collectd/csv/instance-0000052a/libvirt/disk_octets-vdb-2013-08-29", + '/var/lib/collectd/csv/instance-0000052a/libvirt/virt_cpu_total-2013-08-29', + "/var/lib/collectd/csv/instance-0000052a/libvirt/if_packets-vnet3-2013-08-29", + "/var/lib/collectd/csv/HORIZON/libvirt/disk_ops-vda-2013-10-10", + ] + f.each { + println "#"*10 + it + new BsaMonitoringAgentFileInfo(it) + } + } + def m = [:] + EList metrics = new BasicEList() + EList logmessages = new BasicEList() + Date lastReport = new Date() + def void uploadInfo() { + Date now = new Date() + if (lastReport.getTime() + sendFreq > now.getTime()) return + synchronized (this) { + try { + if (metrics.size()>0) { + logger.info "Sending ${metrics.size()} metrics" + api.metrics(null,metrics); + } + // Note this information is getting handled in the BSA Controller updateMetrics + } + catch (e) { + logger.error "Sending metrics failed: $e" + } + metrics.clear() + try { + if (logmessages.size()>0) { + logger.info "Sending ${logmessages.size()} logmessages" + api.logs(null,logmessages); + } + // Note this information is getting handled in the BSA Controller updateLogs + } + catch (e) { + logger.error "Sending logmessages failed: $e" + } + logmessages.clear() + lastReport = now; + } + } + @Override + public void newLine(String file, String line, Object context) { + Date now = new Date() + uploadInfo() +// logger.info "new line: $file $line $context" + if (context != null) { + newLogLine(file,line,context) + return + } + BsaMonitoringAgentFileInfo i = m[file] + if (i == null) { + i = new BsaMonitoringAgentFileInfo(file) + m[file] = i + } + if (i.ignore) return + String[] a = line.split(",") + if (a[0] == "epoch") return + long t = Long.parseLong(a[0].split("\\.")[0]) + if (t*1000 - reportFreq < i.lastUpdate.getTime()) return + i.metrics.each { m -> + StringMetric x = MetricsFactory.eINSTANCE.createStringMetric() + if (a.length <= m.col) { + logger.error("bad line: $file: $line $m") + } + x.value = a[m.col] + x.metricName = m.name + x.resourceName = i.resource + x.time = t*1000 + synchronized (this) { metrics += x } + } + i.lastUpdate = now + } + + @Override + public void fixFilePermissions(File file) { + def path = file.getAbsolutePath() + //println "Trying to make $path readable: ${file.canRead()}" + def cmd = "bin/root_wrapper.sh fixFilePermissions $path" + def sout = new StringBuffer() + def serr = new StringBuffer() + logger.info("running $cmd") + def proc = cmd.execute() + proc.consumeProcessOutput(sout, serr) + proc.waitForOrKill(10000) + if (sout.toString() != "") logger.info("output: $sout") + if (serr.toString() != "") logger.warn("error : $serr") + //println "After try $path readable: ${file.canRead()}" + } + + class BsaMonitoringAgentFileInfo { + String resource = "/collectd" + def metrics = [] + boolean ignore = false + Date lastUpdate = new Date(0) + static CollectdPackage p = CollectdPackage.eINSTANCE + public BsaMonitoringAgentFileInfo(String s) { + String[] a = s.split("/") + def host = a[a.length-3] + def plugin = a[a.length-2] + def index = a[a.length-1] + index = index.substring(0,index.length()-11) + switch (plugin) { + case "libvirt": + String[] aa = host.split("-") + resource = "/collectd/instances/$host" + setup(p.collectdKvmInstance,plugin,index) + break + case "memory": + resource = "/collectd/memory" + setup(p.collectdMemory,plugin,index.replace("memory-", "")) + break + case "swap": + resource = "/collectd/swap" + setup(p.collectdMemory,plugin,index.replace("swap-", "")) + break + case "processes": + resource = "/collectd/processes" + setup(p.collectdProcesses,plugin,index.replace("ps_state-", "")) + break + case "load": + case "contextswitch": + case "entropy": + case "interface": + case "df": + setup(p.collectdServer,plugin,index) + break + case "vmem": + resource = "/collectd/vmem" + def index1 = index.replaceFirst("vmpage_.*-", "") + index1 = index1.replace("vmpage_faults","faults") + setup(p.collectdVmem,plugin,index1, index1=="dirty" || index1=="writeback") +// System.err.println "resource=$resource metrics=$metrics index=$index index1=$index1" + break + case ~/irq/: + case ~/cpu-.*/: ignore = true; break + case ~/disk-.*/: + String[] aa = plugin.split("-") + resource = "/collectd/disks/${aa[1]}" + setup(p.collectdDisk,plugin,index) + break + default: logger.warn "Unknown plugin $plugin" + } + // println "$s" + // println "host=$host plugin=$plugin index=$index" + // println "$resource $metrics" + } + void setup(EClass eClass,String p, String i, boolean exactMatch = false) { + def j = 1 + eClass.getEAllAttributes().each { attr -> + if (attr.name == "name") return + if (attr.name == "lastPolled") return + if (attr.name == "lastChanged") return + if (attr.name == "created") return + if ((!exactMatch && attr.name.startsWith(i)) + || (attr.name == i)) + metrics += [ name : attr.name, col : j++] + } + String[] a = i.split("-") + switch (i) { + case ~/df.*/: + if (a.length==1) break + def e = eClass.getEStructuralFeature("filesystems") + resource = "${resource}/$e.name/${a[1]}" + setup(e.eType,p,"") + break + case ~/if_.*/: + if (a.length==1) break + def e = eClass.getEStructuralFeature("interfaces") + resource = "${resource}/interfaces/${a[1]}" + setup(e.eType,p,a[0]) + break + case ~/disk_.*/: + if (a.length==1) break + def e = eClass.getEStructuralFeature("disks") + resource = "${resource}/disks/${a[1]}" + setup(e.eType,p,a[0]) + break + } + } + } + def newLogLine(String file, String line,x) { + Pattern p = x.regexp + if (!p.matcher(line).find()) return + if (line.contains("Logfile reset")) return + if (line.contains("New line from file")) return + //println "$file $line $x" + LogMessage log = LogsFactory.eINSTANCE.createLogMessage() + log.time = new Date().getTime(); + log.resourceName = "$x.path/$x.name" + log.severity = x.sev + log.level = x.level + if (x["levelField"] != null) { + try { + def i = x["levelField"] + def a = line.split(" +",i+2) + log.level = LogLevel.get(a[i].toUpperCase()) + line = a[i+1] + } catch (e) {print e} + } + log.message = line + fixLog(log,"path","resourceName") + fixLog(log,"sev","severity") + logSup.add(log) + } + def fixLog (LogMessage log,s,a) { + def p = Pattern.compile(" $s=\\{(.*?)\\}") + def m = p.matcher(log.message) + if (m.find()) { + switch (a) { + case "severity": log[a] = LogSeverity.get(m.group(1)); break + default: log[a] = m.group(1) + } + log.message = m.replaceAll("") + } + } + @Override + public void handleLog(LogMessage m) { + synchronized (this) { + logmessages += m + } + } + + +} + diff --git a/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProvider.java b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProvider.java new file mode 100644 index 0000000..a855d5a --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProvider.java @@ -0,0 +1,56 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.apache.log4j.Logger; +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; +import org.openecomp.ncomp.sirius.manager.agent.server.tools.MonitoringUtil; + +public class AgentSiriusManagerAgentServerProvider extends + BasicManagementServerProvider { + @SuppressWarnings("unused") + private static final Logger logger = Logger + .getLogger(AgentSiriusManagerAgentServerProvider.class); + SiriusManagerAgentServer o; + @SuppressWarnings("unused") + private MonitoringUtil util; + + public AgentSiriusManagerAgentServerProvider(ISiriusServer controller, + SiriusManagerAgentServer o) { + super(controller, o); + this.o = o; + } + + public void start() { + + util = new MonitoringUtil(controller.getServer()); + util.run(); + } + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProvider.java b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProvider.java new file mode 100644 index 0000000..aa0ae57 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProvider.java @@ -0,0 +1,83 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class AgentGuiClientApiProvider extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(AgentGuiClientApiProvider.class); + GuiClientApi o; + + public AgentGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProvider.java b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProvider.java new file mode 100644 index 0000000..b1eb15b --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/java/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProvider.java @@ -0,0 +1,89 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; + + +public class AgentSouthBoundApiProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(AgentSouthBoundApiProvider.class); + SouthBoundApi o; + + public AgentSouthBoundApiProvider(ISiriusServer controller, SouthBoundApi o) { + super(controller, o); + this.o = o; + } + + public void logs(org.json.JSONObject cx, EList logs) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); +// + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); +// + } + + public void properties(org.json.JSONObject cx, EList l) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); +// + } + + + + + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/server-gen/bin/sirius-manager-agent-server-controller b/ncomp-sirius-manager-agent-server/src/main/server-gen/bin/sirius-manager-agent-server-controller new file mode 100644 index 0000000..86a0713 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server-gen/bin/sirius-manager-agent-server-controller @@ -0,0 +1,137 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="Agent Controller" +PNAME=sirius-manager-agent-server-controller +CLASS=org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServerServer + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "${_PIDFILE}" ]; then + _PID=`cat "${_PIDFILE}"` + check_status_of_pid $_PID + else + _STATUS="$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "$1" ] && kill -0 $1 2>/dev/null ; then + _STATUS="$SNAME (pid $1) is running" + _RUNNING=1 + else + _STATUS="$SNAME (pid $1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "${_PIDFILE}" ]; then + rm "${_PIDFILE}" + fi +} + + +_DIR=`dirname "$0"` +_DIR=`dirname "$_DIR"` + +_PIDFILE=$_DIR/PID + +CMD=$1 +shift + +check_status +case $CMD in + status) + echo $_STATUS + exit 0 + ;; + console) + CP=$(find $_DIR/lib -name \*.jar | xargs -I X printf ":%s" X) + $GROOVY_HOME/bin/groovysh -cp $_DIR/config:$_DIR/lib:$CP + ;; + run) + CP=$(find $_DIR/lib -name \*.jar | xargs -I X printf ":%s" X) + $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$CP "$@" + ;; + groovy) + CP=$(find $_DIR/lib -name \*.jar | xargs -I X printf ":%s" X) + $GROOVY_HOME/bin/groovy -cp $_DIR/config:$_DIR/lib:$CP "$@" + ;; + start) + if [ "$_RUNNING" = "1" ]; then + echo $_STATUS + exit 0 + fi + mkdir -p $_DIR/logs + if [ -e $_DIR/logs/$PNAME.out.1 ]; then mv $_DIR/logs/$PNAME.out.1 $_DIR/logs/$PNAME.out.2; fi + if [ -e $_DIR/logs/$PNAME.err.1 ]; then mv $_DIR/logs/$PNAME.err.1 $_DIR/logs/$PNAME.err.2; fi + if [ -e $_DIR/logs/$PNAME.out ]; then mv $_DIR/logs/$PNAME.out $_DIR/logs/$PNAME.out.1; fi + if [ -e $_DIR/logs/$PNAME.err ]; then mv $_DIR/logs/$PNAME.err $_DIR/logs/$PNAME.err.1; fi + CP=$(find $_DIR/lib -name \*.jar | xargs -I X printf ":%s" X) + + nohup $JAVA_HOME/bin/java -cp $_DIR/config:$_DIR/lib:$CP "$@" $CLASS > $_DIR/logs/$PNAME.out 2> $_DIR/logs/$PNAME.err & + + _PID=$! + echo $_PID > $_PIDFILE + sleep 5 + check_status + echo $_STATUS + if [ "$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the $SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "$_RUNNING" = "0" ]; then + echo $_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping $SNAME..." + _PID_TO_KILL=$_PID; + echo "$SNAME (pid=${_PID_TO_KILL}) is stopping..." + kill -TERM $_PID_TO_KILL + sleep 5 + check_status_of_pid $_PID_TO_KILL + if [ "$_RUNNING" = "1" ]; then + kill -TERM $_PID_TO_KILL + fi + while [ "$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid $_PID_TO_KILL + done + remove_pid_file + echo "$SNAME has stopped." + exit 0 + ;; + *) + echo "$0 start|stop" + ;; +esac + + diff --git a/ncomp-sirius-manager-agent-server/src/main/server/bin/agent.sh b/ncomp-sirius-manager-agent-server/src/main/server/bin/agent.sh new file mode 100644 index 0000000..f674aef --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/bin/agent.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +export JAVA_HOME=/opt/app/java/jdk/jdk170 +export GROOVY_HOME=/opt/app/groovy/246 + +PATH=$JAVA_HOME/bin:$GROOVY_HOME/bin:$PATH + +cd $(dirname $(dirname $(readlink -e $0))) + +ROOT=$(pwd) +CMD=$ROOT/bin/sirius-manager-agent-server-controller + + +mkdir -p logs/ +echo $(date) bin/agent.sh "$@" >> logs/agent.sh.log + +CMD1=$1 +VMTYPE=monitoring-agent + +case $CMD1 in + start) + JVMARGS=$(cat config/monitoring.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD $CMD1 $JVMARGS + ;; + stop|console) + $CMD $CMD1 + ;; + config) + CONFIGDIR=/var/config/DCAE/chef + if [ ! -e $CONFIGDIR/$VMTYPE-monitoring.properties ]; then CONFIGDIR=/tmp; fi + mkdir -p config + for FILE in $CONFIGDIR/$VMTYPE-*; do + FILE2=$(echo $FILE | sed s/.*$VMTYPE-//) + cp $FILE config/$FILE2 + done + /opt/app/dcae-controller-core-utils/bin/setup_https.sh config/monitoring.properties + ;; + restore|clean) + ;; + restart) + $0 stop + $0 start + ;; + restart2) + $CMD stop + JVMARGS=$(cat config/monitoring.properties | grep JVMARGS | sed 's/[^=]*=//') + $CMD start $JVMARGS + ;; + *) + echo unknown command: $CMD1 + ;; +esac + +exit 0 + diff --git a/ncomp-sirius-manager-agent-server/src/main/server/config/console.properties b/ncomp-sirius-manager-agent-server/src/main/server/config/console.properties new file mode 100644 index 0000000..4b63607 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/config/console.properties @@ -0,0 +1,3 @@ +localhost.endpoint=http://localhost:PORT +localhost.user=console +localhost.password=CONSOLE_PW diff --git a/ncomp-sirius-manager-agent-server/src/main/server/config/gui.properties b/ncomp-sirius-manager-agent-server/src/main/server/config/gui.properties new file mode 100644 index 0000000..e69de29 diff --git a/ncomp-sirius-manager-agent-server/src/main/server/config/makefile b/ncomp-sirius-manager-agent-server/src/main/server/config/makefile new file mode 100644 index 0000000..717823e --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/config/makefile @@ -0,0 +1,9 @@ + +restart: stop start + +start: + M2_HOME=/home/ncomp/.m2 bin/BBBB-controller start +stop: + bin/BBBB-controller stop +console: + bin/BBBB-controller console diff --git a/ncomp-sirius-manager-agent-server/src/main/server/config/pw.sh.sh b/ncomp-sirius-manager-agent-server/src/main/server/config/pw.sh.sh new file mode 100644 index 0000000..cd022ae --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/config/pw.sh.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +### used to generate random passwords + + +echo '#!/bin/bash' +echo "" + +echo 'cat \' + +for i in CONSOLE GUI CLIENT +do + echo ' |' sed s/${i}_PW/$(echo $i:$(date +%s) | sha256sum | base64 | head -c 20 ; echo)/ \\ +done + \ No newline at end of file diff --git a/ncomp-sirius-manager-agent-server/src/main/server/config/server.properties b/ncomp-sirius-manager-agent-server/src/main/server/config/server.properties new file mode 100644 index 0000000..4605389 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/config/server.properties @@ -0,0 +1,7 @@ +server.dir = data/resources +metrics.dir = data/metrics +properties.dir = data/properties +server.port = PORT +server.user.console = CONSOLE_PW +server.user.gui = GUI_PW +server.user.client = CLIENT_PW diff --git a/ncomp-sirius-manager-agent-server/src/main/server/scripts/console.groovy b/ncomp-sirius-manager-agent-server/src/main/server/scripts/console.groovy new file mode 100644 index 0000000..5c94104 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/server/scripts/console.groovy @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServerConsole +import org.openecomp.ncomp.sirius.manager.console.Utils + +server = new AgentSiriusManagerAgentServerConsole("console.properties","localhost") + +def p(x) { Utils.object2json(x).toString(2) } diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentMonitoringFactory.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentMonitoringFactory.java new file mode 100644 index 0000000..39ef288 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentMonitoringFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.MonitoringFactoryImpl; + + + + + +public class AgentMonitoringFactory extends MonitoringFactoryImpl { + public static final Logger logger = Logger.getLogger(AgentMonitoringFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return MonitoringPackage.eINSTANCE; } + public AgentMonitoringFactory(ISiriusServer server) { + this.server = server; + } + @Override + public SiriusManagerAgentServer createSiriusManagerAgentServer() { + return new AgentSiriusManagerAgentServer(server); + } + + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServer.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServer.java new file mode 100644 index 0000000..f4147a4 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServer.java @@ -0,0 +1,301 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import java.io.InputStream; +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; +import java.util.Date; + + + + +import java.util.Date; + + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl; + + + +public class AgentSiriusManagerAgentServer extends SiriusManagerAgentServerImpl implements ISiriusPlugin { + public static final Logger logger = Logger.getLogger(AgentSiriusManagerAgentServer.class); + AgentSiriusManagerAgentServerProvider controller; + ISiriusServer server; + + public AgentSiriusManagerAgentServer(ISiriusServer server) { + this.server = server; + this.controller = new AgentSiriusManagerAgentServerProvider(server,this); + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + public void uploadInfo(org.json.JSONObject cx, EList info) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.START, duration_,cx,info); + Date now_ = new Date(); + try { + controller.uploadInfo(cx,info); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.ERROR, duration_,cx,info); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "uploadInfo", ApiRequestStatus.OKAY, duration_,cx,info); + + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.START, duration_,cx,path,start,end,option,relativeInterval); + Date now_ = new Date(); + try { + res = controller.getValues(cx,path,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.ERROR, duration_,cx,path,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValues", ApiRequestStatus.OKAY, duration_,cx,path,start,end,option,relativeInterval); + return res; + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.START, duration_,cx,path,metrics,start,end,option,relativeInterval); + Date now_ = new Date(); + try { + res = controller.getValuesAll(cx,path,metrics,start,end,option,relativeInterval); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.ERROR, duration_,cx,path,metrics,start,end,option,relativeInterval); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getValuesAll", ApiRequestStatus.OKAY, duration_,cx,path,metrics,start,end,option,relativeInterval); + return res; + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.START, duration_,cx,path,start,end); + Date now_ = new Date(); + try { + res = controller.getMessages(cx,path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.ERROR, duration_,cx,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getMessages", ApiRequestStatus.OKAY, duration_,cx,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.START, duration_,userName,action,resourcePath,context); + Date now_ = new Date(); + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.ERROR, duration_,userName,action,resourcePath,context); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getRequestLogger", ApiRequestStatus.OKAY, duration_,userName,action,resourcePath,context); + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + try { + res = controller.evaluate(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "evaluate", ApiRequestStatus.OKAY, duration_,path,function); + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.START, duration_,path,function); + Date now_ = new Date(); + try { + controller.update(path,function); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.ERROR, duration_,path,function); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "update", ApiRequestStatus.OKAY, duration_,path,function); + + } + + + + + + + @Override + public void start() { + controller.start(); + } + + + public static void ecoreSetup() { + AgentSiriusManagerAgentServerProvider.ecoreSetup(); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerClient.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerClient.java new file mode 100644 index 0000000..db52905 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerClient.java @@ -0,0 +1,119 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.MonitoringPackage; + + + + + + +@SuppressWarnings("unchecked") +public class AgentSiriusManagerAgentServerClient extends SiriusManagerAgentServerImpl { + public static final Logger logger = Logger.getLogger(AgentSiriusManagerAgentServerClient.class); + public AbstractClient client; + + public AgentSiriusManagerAgentServerClient(String file, String name) { + AgentSiriusManagerAgentServer.ecoreSetup(); + client = new Jetty8Client(file,name); + client.add("/resources", this); + } + + public AgentSiriusManagerAgentServerClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/resources", this); + } + + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + client.operationPath("/resources", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + client.operationPath("/resources", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + client.operationPath("/resources", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + + @Override + public void uploadInfo(org.json.JSONObject cx, EList info) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + client.operationPath("/resources", c, "uploadInfo", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,info); + } + + @Override + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + return (EList) client.operationPath("/resources", c, "getValues", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end,option,relativeInterval); + } + + @Override + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + return (EList) client.operationPath("/resources", c, "getValuesAll", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,metrics,start,end,option,relativeInterval); + } + + @Override + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + return (EList) client.operationPath("/resources", c, "getMessages", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,path,start,end); + } + + @Override + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + return (org.openecomp.ncomp.sirius.manager.server.LoggerInfo) client.operationPath("/resources", c, "getRequestLogger", null, userName,action,resourcePath,context); + } + + @Override + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + return (EList) client.operationPath("/resources", c, "evaluate", null, path,function); + } + + @Override + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EClass c = MonitoringPackage.eINSTANCE.getSiriusManagerAgentServer(); + client.operationPath("/resources", c, "update", null, path,function); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerConsole.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerConsole.java new file mode 100644 index 0000000..4efd29f --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerConsole.java @@ -0,0 +1,164 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui.AgentGuiClientApiConsole; +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south.AgentSouthBoundApiConsole; + + +public class AgentSiriusManagerAgentServerConsole extends Console { + public static final Logger logger = Logger.getLogger(AgentSiriusManagerAgentServerConsole.class); + protected AgentSiriusManagerAgentServerClient controller; + + + AgentGuiClientApiConsole gui; + AgentSouthBoundApiConsole south; + + + public AgentSiriusManagerAgentServerConsole(String filename, String name) { + super(filename, name); + controller = new AgentSiriusManagerAgentServerClient(filename,name); + client = controller.client; + + gui = new AgentGuiClientApiConsole(filename,name); + south = new AgentSouthBoundApiConsole(filename,name); + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void uploadInfo(EList info) { + + try { + controller.uploadInfo(null,info); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public EList getValues(java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValues(null,path,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getValuesAll(java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + EList res = null; + try { + res = controller.getValuesAll(null,path,metrics,start,end,option,relativeInterval); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList getMessages(java.lang.String path, java.lang.Long start, java.lang.Long end) { + EList res = null; + try { + res = controller.getMessages(null,path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + org.openecomp.ncomp.sirius.manager.server.LoggerInfo res = null; + try { + res = controller.getRequestLogger(userName,action,resourcePath,context); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + EList res = null; + try { + res = controller.evaluate(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + + try { + controller.update(path,function); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProviderTemplate.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProviderTemplate.java new file mode 100644 index 0000000..82f9dc6 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerProviderTemplate.java @@ -0,0 +1,82 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import java.util.Date; + + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; + + +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + + +import org.openecomp.ncomp.sirius.manager.BasicManagementServerProvider; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.impl.SiriusManagerAgentServerImpl; +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; + + +public class AgentSiriusManagerAgentServerProviderTemplate extends BasicManagementServerProvider { + private static final Logger logger = Logger.getLogger(AgentSiriusManagerAgentServerProviderTemplate.class); + SiriusManagerAgentServer o; + + public AgentSiriusManagerAgentServerProviderTemplate(ISiriusServer controller, SiriusManagerAgentServer o) { + super(controller, o); + this.o = o; + } + + + + + + public void start() { + + // TODO Auto-generated method stub + } + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerServer.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerServer.java new file mode 100644 index 0000000..a98eabe --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/AgentSiriusManagerAgentServerServer.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.sirius.manager.agent.monitoring.SiriusManagerAgentServer; + + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui.AgentModelFactory; + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south.AgentServerFactory; + + + + + +public class AgentSiriusManagerAgentServerServer implements ISiriusServer { + public static final Logger logger = Logger.getLogger(AgentSiriusManagerAgentServerServer.class); + String serverPath; + ManagementServer server; + AgentSiriusManagerAgentServer controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + AgentMonitoringFactory f = new AgentMonitoringFactory(this); + + String guiPath; + ManagementServer guiServer; + + String southPath; + ManagementServer southServer; + + + public AgentSiriusManagerAgentServerServer(String filename) throws IOException { + logger.warn("controller restarting"); + AgentSiriusManagerAgentServer.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "SiriusManagerAgentServer", serverPath, filename); + server.addFactory(f); + + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (AgentSiriusManagerAgentServer) server.find("/").o; + webServer = new Jetty8Server("monitoring.properties"); + webServer.add("/resources",server); + + + + EFactory guiFactory = new AgentModelFactory(this); + guiPath = serverPath + "/gui"; + guiServer = new ManagementServer(guiFactory, "GuiClientApi", guiPath, "gui.properties"); + guiServer.start(); + webServer.add("/gui",guiServer); + + EFactory southFactory = new AgentServerFactory(this); + southPath = serverPath + "/south"; + southServer = new ManagementServer(southFactory, "SouthBoundApi", southPath, "south.properties"); + southServer.start(); + webServer.add("/south",southServer); + + + + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + AgentSiriusManagerAgentServerServer s = new AgentSiriusManagerAgentServerServer("monitoring.properties"); + s.runWebserver(); + } + public SiriusManagerAgentServer getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApi.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApi.java new file mode 100644 index 0000000..37332ad --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApi.java @@ -0,0 +1,215 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + +import java.io.InputStream; +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; +import java.util.Date; + + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + + +import org.openecomp.ncomp.sirius.manager.Subject; + + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; + + + +public class AgentGuiClientApi extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(AgentGuiClientApi.class); + AgentGuiClientApiProvider controller; + ISiriusServer server; + + public AgentGuiClientApi(ISiriusServer server) { + this.server = server; + this.controller = new AgentGuiClientApiProvider(server,this); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.START, duration_); + Date now_ = new Date(); + try { + res = controller.getTree(); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.ERROR, duration_); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTree", ApiRequestStatus.OKAY, duration_); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.START, duration_,path); + Date now_ = new Date(); + try { + res = controller.getObject(path); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.ERROR, duration_,path); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getObject", ApiRequestStatus.OKAY, duration_,path); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.START, duration_,path,start,end,duration); + Date now_ = new Date(); + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.ERROR, duration_,path,start,end,duration); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTimeSerie", ApiRequestStatus.OKAY, duration_,path,start,end,duration); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + try { + res = controller.getTable(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getTable", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + try { + res = controller.getHtml(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getHtml", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.START, duration_,path,start,end); + Date now_ = new Date(); + try { + res = controller.getGraph(path,start,end); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.ERROR, duration_,path,start,end); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "getGraph", ApiRequestStatus.OKAY, duration_,path,start,end); + return res; + } + + + + + + + public static void ecoreSetup() { + AgentGuiClientApiProvider.ecoreSetup(); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiClient.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiClient.java new file mode 100644 index 0000000..f480a06 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiClient.java @@ -0,0 +1,96 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServer; + + + + +@SuppressWarnings("unchecked") +public class AgentGuiClientApiClient extends GuiClientApiImpl { + public static final Logger logger = Logger.getLogger(AgentGuiClientApiClient.class); + public AbstractClient client; + + public AgentGuiClientApiClient(String file, String name) { + AgentSiriusManagerAgentServer.ecoreSetup(); + client = new Jetty8Client(file,name); + client.add("/gui", this); + } + + public AgentGuiClientApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/gui", this); + } + + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.gwt.siriusportal.model.GuiTree) client.operationPath("/gui", c, "getTree", null); + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.gwt.siriusportal.model.GuiObject) client.operationPath("/gui", c, "getObject", null, path); + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie) client.operationPath("/gui", c, "getTimeSerie", null, path,start,end,duration); + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.gwt.siriusportal.model.GuiTable) client.operationPath("/gui", c, "getTable", null, path,start,end); + } + + @Override + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml) client.operationPath("/gui", c, "getHtml", null, path,start,end); + } + + @Override + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + EClass c = ModelPackage.eINSTANCE.getGuiClientApi(); + return (org.openecomp.ncomp.sirius.manager.graph.GuiGraph) client.operationPath("/gui", c, "getGraph", null, path,start,end); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiConsole.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiConsole.java new file mode 100644 index 0000000..2a18f02 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiConsole.java @@ -0,0 +1,114 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class AgentGuiClientApiConsole extends Console { + public static final Logger logger = Logger.getLogger(AgentGuiClientApiConsole.class); + protected AgentGuiClientApiClient controller; + + + + + public AgentGuiClientApiConsole(String filename, String name) { + super(filename, name); + controller = new AgentGuiClientApiClient(filename,name); + client = controller.client; + + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTree res = null; + try { + res = controller.getTree(); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiObject res = null; + try { + res = controller.getObject(path); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie res = null; + try { + res = controller.getTimeSerie(path,start,end,duration); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiTable res = null; + try { + res = controller.getTable(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml res = null; + try { + res = controller.getHtml(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + org.openecomp.ncomp.sirius.manager.graph.GuiGraph res = null; + try { + res = controller.getGraph(path,start,end); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + return res; + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProviderTemplate.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProviderTemplate.java new file mode 100644 index 0000000..43754f4 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentGuiClientApiProviderTemplate.java @@ -0,0 +1,83 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.gui.tools.*; + + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + + +import org.openecomp.ncomp.sirius.manager.Subject; + + +import org.openecomp.ncomp.sirius.manager.ManagementServer; + + +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + + +import org.openecomp.ncomp.sirius.manager.BasicGuiClientApiProvider; + +import org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; + + +public class AgentGuiClientApiProviderTemplate extends BasicGuiClientApiProvider { + private static final Logger logger = Logger.getLogger(AgentGuiClientApiProviderTemplate.class); + GuiClientApi o; + + public AgentGuiClientApiProviderTemplate(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + + + + + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentModelFactory.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentModelFactory.java new file mode 100644 index 0000000..cbc41f6 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/gui/AgentModelFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.gui; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; +import org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl; + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServerServer; + + + +public class AgentModelFactory extends ModelFactoryImpl { + public static final Logger logger = Logger.getLogger(AgentModelFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ModelPackage.eINSTANCE; } + public AgentModelFactory(ISiriusServer server) { + this.server = server; + } + @Override + public GuiClientApi createGuiClientApi() { + return new AgentGuiClientApi(server); + } + + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentServerFactory.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentServerFactory.java new file mode 100644 index 0000000..f80a2ae --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentServerFactory.java @@ -0,0 +1,54 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.impl.ServerFactoryImpl; + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServerServer; + + + +public class AgentServerFactory extends ServerFactoryImpl { + public static final Logger logger = Logger.getLogger(AgentServerFactory.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ServerPackage.eINSTANCE; } + public AgentServerFactory(ISiriusServer server) { + this.server = server; + } + @Override + public SouthBoundApi createSouthBoundApi() { + return new AgentSouthBoundApi(server); + } + + + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApi.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApi.java new file mode 100644 index 0000000..9f3fe78 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApi.java @@ -0,0 +1,129 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + +import java.io.InputStream; +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; +import java.util.Date; + + + +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl; + + + +public class AgentSouthBoundApi extends SouthBoundApiImpl { + public static final Logger logger = Logger.getLogger(AgentSouthBoundApi.class); + AgentSouthBoundApiProvider controller; + ISiriusServer server; + + public AgentSouthBoundApi(ISiriusServer server) { + this.server = server; + this.controller = new AgentSouthBoundApiProvider(server,this); + } + + public void logs(org.json.JSONObject cx, EList logs) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.START, duration_,cx,logs); + Date now_ = new Date(); + try { + controller.logs(cx,logs); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.ERROR, duration_,cx,logs); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "logs", ApiRequestStatus.OKAY, duration_,cx,logs); + + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.START, duration_,cx,metrics); + Date now_ = new Date(); + try { + controller.metrics(cx,metrics); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.ERROR, duration_,cx,metrics); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "metrics", ApiRequestStatus.OKAY, duration_,cx,metrics); + + } + + public void properties(org.json.JSONObject cx, EList l) { + + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.START, duration_,cx,l); + Date now_ = new Date(); + try { + controller.properties(cx,l); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.ERROR, duration_,cx,l); + System.err.println("ERROR: " + e); + throw e; + } + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "properties", ApiRequestStatus.OKAY, duration_,cx,l); + + } + + + + + + + public static void ecoreSetup() { + AgentSouthBoundApiProvider.ecoreSetup(); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiClient.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiClient.java new file mode 100644 index 0000000..223f47d --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiClient.java @@ -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============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.Jetty8Client; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + + +import org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.AgentSiriusManagerAgentServer; + + + + +@SuppressWarnings("unchecked") +public class AgentSouthBoundApiClient extends SouthBoundApiImpl { + public static final Logger logger = Logger.getLogger(AgentSouthBoundApiClient.class); + public AbstractClient client; + + public AgentSouthBoundApiClient(String file, String name) { + AgentSiriusManagerAgentServer.ecoreSetup(); + client = new Jetty8Client(file,name); + client.add("/south", this); + } + + public AgentSouthBoundApiClient(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/south", this); + } + + + @Override + public void logs(org.json.JSONObject cx, EList logs) { + EClass c = ServerPackage.eINSTANCE.getSouthBoundApi(); + client.operationPath("/south", c, "logs", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,logs); + } + + @Override + public void metrics(org.json.JSONObject cx, EList metrics) { + EClass c = ServerPackage.eINSTANCE.getSouthBoundApi(); + client.operationPath("/south", c, "metrics", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,metrics); + } + + @Override + public void properties(org.json.JSONObject cx, EList l) { + EClass c = ServerPackage.eINSTANCE.getSouthBoundApi(); + client.operationPath("/south", c, "properties", cx != null && cx.has("timeout") ? cx.getLong("timeout") : null, cx,l); + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiConsole.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiConsole.java new file mode 100644 index 0000000..e65be04 --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiConsole.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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + + + + +public class AgentSouthBoundApiConsole extends Console { + public static final Logger logger = Logger.getLogger(AgentSouthBoundApiConsole.class); + protected AgentSouthBoundApiClient controller; + + + + + public AgentSouthBoundApiConsole(String filename, String name) { + super(filename, name); + controller = new AgentSouthBoundApiClient(filename,name); + client = controller.client; + + } + + public void logs(EList logs) { + + try { + controller.logs(null,logs); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void metrics(EList metrics) { + + try { + controller.metrics(null,metrics); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + + public void properties(EList l) { + + try { + controller.properties(null,l); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + + } + +} diff --git a/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProviderTemplate.java b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProviderTemplate.java new file mode 100644 index 0000000..fb7d5df --- /dev/null +++ b/ncomp-sirius-manager-agent-server/src/main/sirius-gen/org/openecomp/ncomp/sirius/manager/agent/servers/monitoring/south/AgentSouthBoundApiProviderTemplate.java @@ -0,0 +1,86 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package org.openecomp.ncomp.sirius.manager.agent.servers.monitoring.south; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + + + +import org.openecomp.ncomp.sirius.manager.BasicAdaptorProvider; + +import org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; + + +public class AgentSouthBoundApiProviderTemplate extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(AgentSouthBoundApiProviderTemplate.class); + SouthBoundApi o; + + public AgentSouthBoundApiProviderTemplate(ISiriusServer controller, SouthBoundApi o) { + super(controller, o); + this.o = o; + } + + public void logs(org.json.JSONObject cx, EList logs) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void metrics(org.json.JSONObject cx, EList metrics) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public void properties(org.json.JSONObject cx, EList l) { + + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + + + + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-base/.project b/ncomp-sirius-manager-base/.project new file mode 100644 index 0000000..e91fdae --- /dev/null +++ b/ncomp-sirius-manager-base/.project @@ -0,0 +1,17 @@ + + + ncomp-sirius-manager-base + + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.m2e.core.maven2Nature + + diff --git a/ncomp-sirius-manager-base/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-base/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-sirius-manager-base/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-base/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-base/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-base/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-base/LICENSE.txt b/ncomp-sirius-manager-base/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-base/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-sirius-manager-base/pom.xml b/ncomp-sirius-manager-base/pom.xml new file mode 100644 index 0000000..4088742 --- /dev/null +++ b/ncomp-sirius-manager-base/pom.xml @@ -0,0 +1,239 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-base + pom + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + src/main/java + + **/*.java + **/*.groovy + + + + src/main/sirius-gen + + **/*.java + **/*.groovy + + + + src/main/resources + + **/*.java + **/*.groovy + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + generate-sources + + add-source + + + + src/main/sirius-gen + src/main/java + src/main/resources + + + + + + + + + maven-compiler-plugin + + 3.1 + + groovy-eclipse-compiler + 1.7 + 1.7 + + + + org.codehaus.groovy + groovy-eclipse-compiler + 2.9.1-01 + + + + org.codehaus.groovy + groovy-eclipse-batch + 2.3.7-01 + + + + + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + [3.1,) + + compile + testCompile + + + + + + + + + + org.codehaus.mojo + + + build-helper-maven-plugin + + + [1.9.1,) + + + add-source + + + + + + + + + + + + + + + + + + + org.eclipse.jetty + jetty-server + 8.1.17.v20150415 + + + org.eclipse.jetty + jetty-client + 8.1.17.v20150415 + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-server + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-generator + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-console + ${project.version} + + + org.slf4j + slf4j-log4j12 + 1.7.12 + runtime + + + org.slf4j + jcl-over-slf4j + 1.7.12 + runtime + + + + diff --git a/ncomp-sirius-manager-console/.classpath b/ncomp-sirius-manager-console/.classpath new file mode 100644 index 0000000..3c48086 --- /dev/null +++ b/ncomp-sirius-manager-console/.classpath @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-console/.gitignore b/ncomp-sirius-manager-console/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-console/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-console/.project b/ncomp-sirius-manager-console/.project new file mode 100644 index 0000000..03b5fc1 --- /dev/null +++ b/ncomp-sirius-manager-console/.project @@ -0,0 +1,35 @@ + + + ncomp-sirius-manager-console + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-console/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-console/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-sirius-manager-console/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-console/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-console/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-sirius-manager-console/.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-sirius-manager-console/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-sirius-manager-console/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/ncomp-sirius-manager-console/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/ncomp-sirius-manager-console/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-console/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-console/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-console/LICENSE.txt b/ncomp-sirius-manager-console/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-console/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-sirius-manager-console/META-INF/MANIFEST.MF b/ncomp-sirius-manager-console/META-INF/MANIFEST.MF new file mode 100644 index 0000000..03938de --- /dev/null +++ b/ncomp-sirius-manager-console/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ncomp-sirius-manager-console +Bundle-SymbolicName: ncomp-sirius-manager-console +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.sirius.manager.console, + org.openecomp.ncomp.sirius.manager.groovy +Require-Bundle: org.apache.log4j;bundle-version="1.2.15", + org.eclipse.emf.ecore;bundle-version="2.10.2", + ncomp-core-model;bundle-version="0.1.0", + ncomp-sirius-manager-server;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" diff --git a/ncomp-sirius-manager-console/build.properties b/ncomp-sirius-manager-console/build.properties new file mode 100644 index 0000000..4c7cc27 --- /dev/null +++ b/ncomp-sirius-manager-console/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/groovy/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-sirius-manager-console/pom.xml b/ncomp-sirius-manager-console/pom.xml new file mode 100644 index 0000000..b7ea795 --- /dev/null +++ b/ncomp-sirius-manager-console/pom.xml @@ -0,0 +1,187 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-console + 0.1.0-SNAPSHOT + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + src/main/groovy + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + + 3.1 + + groovy-eclipse-compiler + + + + org.codehaus.groovy + groovy-eclipse-compiler + 2.9.1-01 + + + + org.codehaus.groovy + groovy-eclipse-batch + 2.3.7-01 + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-compiler-plugin + + + [3.1,) + + + compile + testCompile + + + + + + + + + + + + + + + + + + org.codehaus.groovy + groovy-all + 2.4.3 + + + org.openecomp.ncomp.utils + ncomp-utils-java + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-server + ${project.version} + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + + diff --git a/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Console.groovy b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Console.groovy new file mode 100644 index 0000000..4f7f038 --- /dev/null +++ b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Console.groovy @@ -0,0 +1,217 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.console + +import java.util.Properties; +import java.util.TimeZone; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.sirius.manager.AbstractClient; + +import org.json.JSONObject +import org.json.JSONArray + +import org.openecomp.ncomp.utils.PropertyUtil + +import org.eclipse.emf.ecore.EObject; + +import static org.openecomp.ncomp.sirius.manager.console.Utils.* +import static org.openecomp.ncomp.webservice.utils.DateUtils.dateFromString + +class Console { + protected AbstractClient client + private String language + private String namespace + public Console(String filename, String name) { + // ALWAYS USE GMT. + Properties props = PropertyUtil.getPropertiesFromClasspath(filename); + language = props.getProperty("${name}.language", "somf"); + namespace = props.getProperty("${name}.namespace", null); + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + } + public Console() { + language = "somf" + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + } + public create(String path, o) { + def json = null + switch (o) { + case String: json = new JSONObject(o); break + case JSONObject: json = o; break + case EObject: + case Map: json = object2json(o); break + default: throw new RuntimeException("Unable to determine JSON: $o") + } + // println json.toString(2) + return json2object(client.create(fixPath(path),json)); + } + public update(String path, o) { + def json = null + // println "o=$o" + switch (o) { + case String: json = new JSONObject(o); break + case JSONObject: json = o; break + case EObject: + case Map: json = object2json(o); break + default: throw new RuntimeException("Unable to determine JSON: $o") + } + // println json.toString(2) + return json2object(client.update(fixPath(path),json)); + } + public delete(String path) { + return json2object(client.delete(fixPath(path))) + } + public def list(String path, int levels = 1) { + def x = client.list(fixPath(path),levels) + return json2object(x) + } + public def listAll(String path) { + JSONObject x = client.listAll(fixPath(path)) + return json2object(x.get("list")) + } + public def listReferences(String path, boolean recursive = true) { + JSONObject x = client.listReferences(fixPath(path),recursive) + return json2object(x.get("list")) + } + public def operation(String path, String name, o = "{}", Long timeout = null) { + def json = null + switch (o) { + case String: json = new JSONObject(o); break + case JSONObject: json = o; break + case EObject: + case Map: json = object2json(o); break + } + switch (language) { + case "restconf": + return json2object(client.operationOdl("/restconf/operations/$namespace:$name",timeout,json)) + } + return json2object(client.operation(fixPath(path),name,timeout,json)) + } + def String fixPath(String path) { + if (path.startsWith("/gui")) return path + if (path.startsWith("/south")) return path + if (!path.startsWith("/")) path = "/$path" + if (!path.startsWith("/resources")) path = "/resources$path" + return path + } + public void printMetrics(String path, start, end) { + switch (start) { case String: start = dateFromString(start); break } + switch (end) { case String: end = dateFromString(end); break } + def values = client.operationPath("/resources",ModelPackage.eINSTANCE.abstractManagementServer,"getValues", + null, null, path, start.time, end.time, null, false) + def table = [ header : ["Time", "Metric", "Value"], rows : []] + values.each { + def row = [] + row += new Date(it.time) + row += it.metricName + row += it.value + table.rows += [row] + } + pTable(table) + } + public void printMetricsAll(String path, List metrics, start, end, options = null) { + switch (start) { case String: start = dateFromString(start); break } + switch (end) { case String: end = dateFromString(end); break } + def values = client.operationPath("/resources",ModelPackage.eINSTANCE.abstractManagementServer,"getValuesAll", + null, path, metrics, start.time, end.time, fixOptions(options)) + def table = [ header : [ + "Path", + "Time", + "Metric", + "Value" + ], rows : []] + values.each { + def row = [] + row += it.resourceName + row += new Date(it.time) + row += it.metricName + row += it.value + table.rows += [row] + } + pTable(table) + } + public void printMessages(String path, start, end) { + if (start == null) start = '-1day' + if (end == null) end = 'now' + switch (start) { case String: start = dateFromString(start); break } + switch (end) { case String: end = dateFromString(end); break } + def values = client.operationPath("/resources",ModelPackage.eINSTANCE.abstractManagementServer,"getMessages", + null, path, start.time, end.time) + def table = [ header : [ + "Time", + "Level", + "Path", + "Message" + ], rows : []] + values.each { LogMessage msg -> + def row = [] + row += new Date(msg.time) + row += msg.level + row += msg.resourceName + row += msg.message + table.rows += [row] + } + pTable(table) + } + + public void saveTableCsv(t,filename) { + def f = new File(filename) + new File(filename).withWriter { out -> + def row = [] + t.columns.each { row += it.colName } + out.writeLine row.join(",") + t.rows.each { r -> + row = [] + r.cells.each { row += it.value } + out.writeLine row.join(",") + } + } + } + String rootDirectory = null + public create(String path) { + if (rootDirectory == null) + throw new RuntimeException("rootDirectory is NULL") + File file = new File("$rootDirectory/${fixPath(path)}.json") + if (! file.exists()) + throw new RuntimeException("file does not exist: $file") + def json = null + try { json = new JSONObject(file.text) } catch (e) { + throw new RuntimeException("JSON error: $file : $e") + } + create(path,json) + } + public update(String path) { + if (rootDirectory == null) + throw new RuntimeException("rootDirectory is NULL") + File file = new File("$rootDirectory/${fixPath(path)}.json") + if (! file.exists()) + throw new RuntimeException("file does not exist: $file") + def json = null + try { json = new JSONObject(file.text) } catch (e) { + throw new RuntimeException("JSON error: $file : $e") + } + update(path,json) + } + +} + + diff --git a/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Utils.groovy b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Utils.groovy new file mode 100644 index 0000000..b00aa38 --- /dev/null +++ b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/console/Utils.groovy @@ -0,0 +1,176 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.console + +import org.eclipse.emf.common.util.BasicEList +import org.eclipse.emf.common.util.EList; + +import java.util.Properties; + +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EObject; + +import org.json.JSONObject +import org.json.JSONArray + +import static org.openecomp.ncomp.sirius.manager.ManagementServer.ecore2json + + +class Utils { + + static def object2json(o) { + switch (o) { + case List: + def j = [] as JSONArray + o.each { j.put(object2json(it)) } + return j + case Map: + def j = [:] as JSONObject + o.each { k,v -> j.put(k,object2json(v)) } + return j + case EObject: + return ecore2json(o, 100, null, true) + case boolean: + case long: + case int: + case double: + case Boolean: + case Long: + case Integer: + case String: return o; break + case GString: return o.toString(); break + case null: break; + default: println "Unable to convert: $o ${o.getClass().name}" + } + } + static def json2object (o) { + switch (o) { + case JSONObject: + def m = [:] + o.map.each { n,v -> m[n] = json2object(v) } + return m + case JSONArray: + def a = [] + o.myArrayList.each { a += json2object(it) } + return a + case Integer: + case Long: + case Double: + case Boolean: + case boolean: + case int: + case double: + case String: return o; break + case GString: return o.toString(); break + case null: break; + default: + if (o.getClass().name != 'org.json.JSONObject$Null') + println "Unable to json2object convert: $o ${o.getClass().name}" + } + } + + static cloneMap(m) { + return json2object(object2json(m)) + } + + static def void pTable (m, format = "txt", PrintStream out) { + def s = [:] + def style = 'style="border: 1px solid black; border-collapse: collapse;"' + m.header.eachWithIndex {n,i-> + def l = "$n".size() + if (!s[i] || l > s[i]) s[i] = l + } + m.rows.each { row -> + // out.println "row = $row" + (0..m.header.size()-1).each { i -> + def n = row[i] + def l = "$n".size() + if (!s[i] || l > s[i]) s[i] = l + } + } + // println "$s" + def row = [] + def j = 1 + m.header.eachWithIndex {n,i-> + row += String.format("%${s[i]}s",n) + j += 3 + s[i] + } + switch (format) { + case "mediawiki": + out.println '{| class="wikitable"' + out.println "! ${row.join('\n! ')}" + break + case "html": + out.println "" + out.println "" + break + default: + out.println "_"*j + out.println "| ${row.join(' | ')} |" + out.println "_"*j + break; + } + m.rows.each { r -> + row = [] + (0..m.header.size()-1).each { k -> + row += String.format("%${s[k]}s",r[k]) + } + switch (format) { + case "mediawiki": out.println "|-\n| ${row.join('\n| ')}"; break + case "html": out.println ""; break + default: out.println "| ${row.join(' | ')} |"; break + } + } + switch (format) { + case "mediawiki": out.println "|}"; break + case "html": out.println '
${row.join('')}
${row.join('')}
'; break + default: out.println "_"*j; break + } + } + + static def p(x) { Utils.object2json(x).toString(2) } + + static def runCmd(String cmd, long timeout) { + def sout = new StringBuffer() + def serr = new StringBuffer() + Process proc = cmd.execute() + Thread t1 = proc.consumeProcessOutputStream(sout) + Thread t2 = proc.consumeProcessErrorStream(serr) + Date d1 = new Date() + proc.waitForOrKill(timeout) + if (proc.exitValue() != 0) { + System.err.println "Non Zero exit value: $cmd ${proc.exitValue()}" + } + Date d2 = new Date() + long duration = d2.time - d1.time + if (duration > 0.5 * timeout) { + System.err.println "Command took long time: $cmd took ${duration}ms with timeout=${timeout}ms" + } + t1.join() + t2.join() + if (sout.toString() != "") println "output: $sout" + if (serr.toString() != "") println "error: $serr" + return [out:sout.toString(),err:serr.toString()] + } + +} + diff --git a/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/AlertUtils.groovy b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/AlertUtils.groovy new file mode 100644 index 0000000..62c1138 --- /dev/null +++ b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/AlertUtils.groovy @@ -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.sirius.manager.groovy + +import static org.openecomp.ncomp.sirius.manager.console.Utils.cloneMap + +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.RuleFunction; + +class AlertUtils { + def console + def AlertUtils() {} + def AlertUtils(console) { + this.console = console + } + def void addAlertTemplates (path,aName, boolean save = true) { + console.listAll(path).each { tName -> + def m = [alertingTemplate : ['$ref':"/configuration/alertTemplates/$aName"], '$nosave' : 1 ] +// println "$tName" + update(tName,m) + } + copyAlerts(path) + if (save) console.update("/",[:]) + } + def void addAlertTemplatesFromFile(String fileName) { + File f = new File(fileName) + f.readLines().each { line -> + String[] a = line.split("\\|") + if (a.length != 2) return + addAlertTemplates(a[0], a[1], false) + } + console.update("/",[:]) + } + def void addAlertTemplatesFromFunction(path, function, boolean save = true) { + def ret = console.operation("/","evaluate",[path:path, function:function]) + ret.returns.each { v -> + def m = [alertingTemplate : ['$ref':"/configuration/alertTemplates/$v.value"], '$nosave' : 1 ] + update(v.path,m) + } + copyAlerts(path) + if (save) console.update("/",[:]) + } + def void copyAlerts (path) { + def t = console.list("/configuration",1000).alertTemplates +// println t + console.listAll(path).each { p -> + def m = console.list(p,0) + if (m.alertingTemplate == null || m.alertingTemplate['$ref'] == "NULL") return + def t2 = m.alertingTemplate['$ref'].split("/")[3] + def t3 = t[t2] + t3['$nosave'] = 1 +// println "$p $m.alertingTemplate $t2 $t3" + console.update(p,t3) + } + } + def alert(metricName,lowerBound,upperBound,severity = "SEV2", duration = null, maxDelay = null) { + return [ + '$class':"org.openecomp.ncomp.sirius.manager.model.ThresholdAlert", + metricName:metricName, + lowerBound:lowerBound, + upperBound:upperBound, + duration:duration, + maxDelay:maxDelay, + severity:severity, + ] + } + def update (path,v) { +// println "Updating $path" + try { + console.update(path,v) + } + catch (e) { + console.create(path,v) + } + } + +} + diff --git a/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/Ecore2Xcore.groovy b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/Ecore2Xcore.groovy new file mode 100644 index 0000000..30bbbb7 --- /dev/null +++ b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/Ecore2Xcore.groovy @@ -0,0 +1,68 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.groovy + +import groovy.text.SimpleTemplateEngine + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +class Ecore2Xcore { + EPackage p + String subName + def env + public Ecore2Xcore(EPackage p) { + this.p = p + env = [ + p: p, + ] + } + public add(k,v) { + env[k] = v + } + public void generate(String file, String templateDirectory) { + SimpleTemplateEngine engine = new SimpleTemplateEngine() + println "Creating $file" + println env + println "$env.pName" + def x = engine.createTemplate(new File("$templateDirectory/xcore").text).make(env) + def f = new File(file) + f.delete() + f.parentFile.mkdirs() + f << x +// println "x=$x" + } + def void test() { + EClass c + c.getEReferences().each { EReference ref -> + ref.isContainment() ? "contains" : "refers" + ref.eType.name + } + c.getEAttributes().each { EAttribute attr -> + attr.eType.name + } + } +} diff --git a/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/TableUtils.groovy b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/TableUtils.groovy new file mode 100644 index 0000000..5f2c818 --- /dev/null +++ b/ncomp-sirius-manager-console/src/main/groovy/org/openecomp/ncomp/sirius/manager/groovy/TableUtils.groovy @@ -0,0 +1,220 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.groovy + +import static org.openecomp.ncomp.sirius.manager.console.Utils.cloneMap + +class TableUtils { + def console + def TableUtils() {} + def TableUtils(console) { + this.console = console + } + def newOption(options) { + def res = ['$class':"org.openecomp.ncomp.core.metrics.SequenceMetricValueOption",options:[:],'$nosave':1] + options.each { o -> + if (o.TYPE == null) + throw new RuntimeException("option should have TYPE") + def oo = ['$class':"org.openecomp.ncomp.core.metrics.${o.TYPE}MetricValueOption"] + o.each { n, v -> + if (n == "TYPE") return + oo[n] = v + } + res.options[o.name] = oo + } + return res + } + + def newLogTable(treePath,tablePath,minLevel,minSeverity,prefixResourcePath,duration,aggregationDuration) { + [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate", + treePath:treePath, + tablePath:tablePath, + minLevel:minLevel, + minSeverity:minSeverity, + prefixResourcePath:prefixResourcePath, + duration:duration, + aggregationDuration:aggregationDuration, + '$nosave':1 + ] + } + + def newTable(treePath,tablePath,rowPath) { + [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate", + treePath:treePath, + tablePath:tablePath, + rowPath:rowPath, + columns:[:], + '$nosave':1 + ] + } + + def newIteratorTableTemplate(treePath,tablePath,rowPaths,filter,recursive="true") { + [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate", + treePath:treePath, + tablePath:tablePath, + iterator: [ + '$class': "org.openecomp.ncomp.core.function.IteratorUsingFunction", + paths:rowPaths, + recursive:recursive, + filter:filter, + ], + columns:[:], + '$nosave':1 + ] + } + + + def newTimeTable(treePath,tablePath,rowPath,duration) { + [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate", + treePath:treePath, + tablePath:tablePath, + rowPath:rowPath, + duration:duration, + columns:[:], + '$nosave':1 + ] + } + + + def newColumnA(t,name,path) { + t.columns[name] = [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn", + path:path, + '$nosave':1 + ] + } + def newColumnM(t,name, path,option) { + t.columns[name] = [ + '$class':"org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn", + path:path, + option:['$ref':"/configuration/metricOptions/$option"], + '$nosave':1 + + ] + } + + def update (path,v) { + println "Updating $path" + try { + console.update(path,v) + } + catch (Exception e) { + console.create(path,v) + } + } + + def update2(String p,t) { + update(p,t) + // create last24HourTable + // treePath,tablePath,rowPath + def t2 = newTable(t.treePath,t.tablePath.replace("daily","last24Hour"),t.rowPath) + def t3 = newTable(t.treePath,t.tablePath.replace("daily","lastHour"),t.rowPath) + t.columns.each { n, col -> + println "$n $col" + t2.columns[n] = col + def col1 = cloneMap(col) + if (col1.option != null) col1.option['$ref'] = col1.option['$ref'].replace("daily","hourly") + t3.columns[n] = col1 + } + update(p.replace("daily","last24Hour"),t2) + update(p.replace("daily","lastHour"),t3) + + } + + + def setupLogging () { + update("/configuration/tableTemplates/log-ALL-2hour",newLogTable("/",'/reports/logging/2hour/ALL',null,null,'',"-2hour",null)) + update("/configuration/tableTemplates/log-WARN-2hour",newLogTable("/",'/reports/logging/2hour/WARN','WARN',null,'',"-2hour",null)) + update("/configuration/tableTemplates/log-SEV1-2hour",newLogTable("/",'/reports/logging/2hour/SEV1',null,"SEV1",'',"-2hour",null)) + update("/configuration/tableTemplates/log-SEV2-2hour",newLogTable("/",'/reports/logging/2hour/SEV2',null,"SEV2",'',"-2hour",null)) + update("/configuration/tableTemplates/log-ALL-1day",newLogTable("/",'/reports/logging/1day/ALL',null,null,'',"-1day","1hour")) + update("/configuration/tableTemplates/log-WARN-1day",newLogTable("/",'/reports/logging/1day/WARN','WARN',null,'',"-1day","1hour")) + update("/configuration/tableTemplates/log-SEV1-1day",newLogTable("/",'/reports/logging/1day/SEV1',null,"SEV1",'',"-1day","1hour")) + update("/configuration/tableTemplates/log-SEV2-1day",newLogTable("/",'/reports/logging/1day/SEV2',null,"SEV2",'',"-1day","1hour")) + update("/configuration/tableTemplates/log-ALL-1week",newLogTable("/",'/reports/logging/1week/ALL',null,null,'',"-7day","1day")) + update("/configuration/tableTemplates/log-WARN-1week",newLogTable("/",'/reports/logging/1week/WARN','WARN',null,'',"-7day","1day")) + update("/configuration/tableTemplates/log-SEV1-1week",newLogTable("/",'/reports/logging/1week/SEV1',null,"SEV1",'',"-7day","1day")) + update("/configuration/tableTemplates/log-SEV2-1week",newLogTable("/",'/reports/logging/1week/SEV2',null,"SEV2",'',"-7day","1day")) + update("/configuration/tableTemplates/log-mail",newLogTable("/",'/reports/logging/mail',null,"SEV1",'',"-1hour","99999day")) + } + + def setupLogCount() { + def ccc= "org.openecomp.ncomp.core.function.FunctionMatchAttribute" + def ccc2="org.openecomp.ncomp.core.function.FunctionMatchInstanceOf" + def f = [ + '$class': "org.openecomp.ncomp.core.function.RuleFunction", + rules:[ + [ action : [ value:"true"], matches: [[ + '$class':ccc2, + ePackage:"org.openecomp.ncomp.core.logs.LogsPackage", + eName:"LogMessageContainer" + ]] ], + [ action : [ value:"false"] ], + ] + ] + def t = newIteratorTableTemplate("/","/reports/logging/count",["/"],f) + newColumnA(t,"path", '$path') + newColumnA(t,"class", '$class') + newColumnM(t,"Logmessage (last hour)", "/logMessageStats/ALL/count","hourlyCount") + newColumnM(t,"SEV1 Logmessage (last hour)", "/logMessageStats/SEV1/count","hourlyCount") + newColumnM(t,"SEV2 Logmessage (last hour)", "/logMessageStats/SEV2/count","hourlyCount") + newColumnM(t,"Logmessage (last day)", "/logMessageStats/ALL/count","dailyCount") + newColumnM(t,"SEV1 Logmessage (last day)", "/logMessageStats/SEV1/count","dailyCount") + newColumnM(t,"SEV2 Logmessage (last day)", "/logMessageStats/SEV2/count","dailyCount") + update("/configuration/tableTemplates/logging-count",t) + } + + + def setupSuspended() { + def ccc= "org.openecomp.ncomp.core.function.FunctionMatchAttribute" + def f = [ + '$class': "org.openecomp.ncomp.core.function.RuleFunction", + rules:[ + [ action : [ value:"true"], matches: [['$class':ccc,path:"/operationalState",match:"SUSPENDED"]] ], + [ action : [ value:"false"] ], + ] + ] + def t = newIteratorTableTemplate("/","/reports/suspended",["/"],f) + newColumnA(t,"path", '$path') + newColumnA(t,"class", '$class') + newColumnA(t,"Operational State", "/operationalState") + update("/configuration/tableTemplates/suspended",t) + } + + def setupOptions() { + ["Average","Count","Max","Min","Sum"].each { aggr -> + println "here$aggr" + def x = [[name:"basic",TYPE:"Basic"],[name:"aggregation",TYPE:"Aggregation",duration:"1day",aggregationType:aggr.toUpperCase()]] + update("/configuration/metricOptions/daily$aggr",newOption(x)) + println "here2$aggr" + x[1].duration = "1hour" + update("/configuration/metricOptions/hourly$aggr",newOption(x)) + } + println "here3" + update("/configuration/metricOptions/default",newOption([[name:"basic",TYPE:"Basic"]])) + } +} + diff --git a/ncomp-sirius-manager-drools/.classpath b/ncomp-sirius-manager-drools/.classpath new file mode 100644 index 0000000..c220c0b --- /dev/null +++ b/ncomp-sirius-manager-drools/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-drools/.gitignore b/ncomp-sirius-manager-drools/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-drools/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-drools/.project b/ncomp-sirius-manager-drools/.project new file mode 100644 index 0000000..7b6a8cf --- /dev/null +++ b/ncomp-sirius-manager-drools/.project @@ -0,0 +1,34 @@ + + + ncomp-sirius-manager-drools + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-drools/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-drools/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f9fe345 --- /dev/null +++ b/ncomp-sirius-manager-drools/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-drools/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-drools/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-sirius-manager-drools/.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-sirius-manager-drools/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-drools/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-drools/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-drools/LICENSE.txt b/ncomp-sirius-manager-drools/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-drools/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-sirius-manager-drools/META-INF/MANIFEST.MF b/ncomp-sirius-manager-drools/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a80a85a --- /dev/null +++ b/ncomp-sirius-manager-drools/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-sirius-manager-drools +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.sirius.manager.drools +Bundle-Vendor: %providerName +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 diff --git a/ncomp-sirius-manager-drools/build.properties b/ncomp-sirius-manager-drools/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/ncomp-sirius-manager-drools/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-sirius-manager-drools/pom.xml b/ncomp-sirius-manager-drools/pom.xml new file mode 100644 index 0000000..86720c3 --- /dev/null +++ b/ncomp-sirius-manager-drools/pom.xml @@ -0,0 +1,148 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-drools + 0.1.0-SNAPSHOT + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + 3.1 + + + + + + + + + + + log4j + log4j + 1.2.17 + + + org.eclipse.emf + org.eclipse.emf.ecore + 2.11.0-v20150123-0347 + + + org.eclipse.emf + org.eclipse.emf.common + 2.11.0-v20150123-0347 + + + org.eclipse.xtext + org.eclipse.xtext.xbase.lib + 2.8.2 + + + org.kie + kie-api + 6.3.0.Final + + + org.drools + drools-core + 6.3.0.Final + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + + diff --git a/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsEventListener.java b/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsEventListener.java new file mode 100644 index 0000000..d542573 --- /dev/null +++ b/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsEventListener.java @@ -0,0 +1,29 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.drools; + +public interface DroolsEventListener { + public void recordPolicyFire(String ruleName); + public void recordPolicyObjectInserted(Object o); + public void recordPolicyObjectDeleted(Object o); + public void recordPolicyObjectUpdated(Object o); +} diff --git a/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsRuntime.java b/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsRuntime.java new file mode 100644 index 0000000..7b4ce13 --- /dev/null +++ b/ncomp-sirius-manager-drools/src/main/java/org/openecomp/ncomp/sirius/manager/drools/DroolsRuntime.java @@ -0,0 +1,710 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/* + * Copyright 2010 JBoss Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openecomp.ncomp.sirius.manager.drools; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.kie.api.KieServices; +import org.kie.api.runtime.KieSession; +import org.kie.api.runtime.KieContainer; +import org.kie.api.runtime.rule.FactHandle; +import org.kie.api.runtime.rule.Match; +import org.kie.api.time.SessionClock; +import org.kie.api.logger.KieRuntimeLogger; +import org.kie.api.builder.KieScanner; +import org.kie.api.builder.ReleaseId; +//import org.kie.api.event.process.ProcessCompletedEvent; +//import org.kie.api.event.process.ProcessEventListener; +//import org.kie.api.event.process.ProcessNodeLeftEvent; +//import org.kie.api.event.process.ProcessNodeTriggeredEvent; +//import org.kie.api.event.process.ProcessStartedEvent; +//import org.kie.api.event.process.ProcessVariableChangedEvent; +import org.kie.api.event.rule.AfterMatchFiredEvent; +import org.kie.api.event.rule.AgendaEventListener; +//import java.util.Calendar; +//import org.kie.api.event.KieRuntimeEventManager; +//import org.kie.api.event.rule.DebugAgendaEventListener; +//import org.kie.api.event.rule.DebugRuleRuntimeEventListener; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +import org.kie.api.event.rule.AgendaGroupPoppedEvent; +import org.kie.api.event.rule.AgendaGroupPushedEvent; +import org.kie.api.event.rule.BeforeMatchFiredEvent; +import org.kie.api.event.rule.MatchCancelledEvent; +import org.kie.api.event.rule.MatchCreatedEvent; +import org.kie.api.event.rule.ObjectDeletedEvent; +import org.kie.api.event.rule.ObjectInsertedEvent; +import org.kie.api.event.rule.ObjectUpdatedEvent; +import org.kie.api.event.rule.RuleFlowGroupActivatedEvent; +import org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent; +import org.kie.api.event.rule.RuleRuntimeEventListener; + +public class DroolsRuntime { + private static final Logger logger = Logger.getLogger(DroolsRuntime.class); + private static final Logger logevents = Logger.getLogger("org.openecomp.ncomp.sirius.manager.drools.events"); + + private final KieServices ks; + private final ReleaseId releaseId; + private final KieContainer kContainer; + private final KieScanner kieScanner; + private KieRuntimeLogger kLogger; + private KieSession kSession; + private final ArrayList rootList; + private final HashMap factmap; + private final HashMap globalmap; + private long fireInterval = 1000L; + private Thread fireThread = null; + + private final DroolsEventListener listener; + + // copied from org.openecomp.ncomp.sirius.manager.ManagementServer + // except didn't use artificial id counter for final return case + private static String ecoreId(EObject oo) { + EStructuralFeature f = oo.eClass().getEStructuralFeature("name"); + if (f instanceof EAttribute) { + EAttribute attr = (EAttribute) f; + return (String) oo.eGet(attr); + } + if (oo.eContainer() != null) { + if (oo.eContainmentFeature().isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) oo.eContainer().eGet(oo.eContainmentFeature()); + return Integer.toString(l.indexOf(oo)); + } else { + return oo.eContainmentFeature().getName(); + } + } +// WAS return "id" + id++; + return "idXXXXXX"; + } + + // copied from org.openecomp.ncomp.sirius.manager.ManagementServer + private static String object2ref(EObject oo) { + if (oo.eContainer() == null) { + return ""; + } + EReference ref = (EReference) oo.eContainingFeature(); + StringBuffer b = new StringBuffer(); + b.append(object2ref(oo.eContainer())); + b.append("/"); + b.append(ref.getName()); + if (ref.isMany()) { + b.append("/"); + b.append(ecoreId(oo)); + } + return b.toString(); + } + + private static String describeObject (Object o) { + if (o instanceof EObject) { + try { + String s = object2ref((EObject) o); + if (s != "") return s; + } catch (Exception e) { + } + } + return "object:" + o.getClass().getName(); + } + + private static String describeObject (Object parent, Object o) { + StringBuffer b = new StringBuffer(); + b.append(object2ref((EObject)parent)); + b.append("/"); + if (o instanceof EObject) { + EObject oo = (EObject) o; + EReference ref = (EReference) oo.eContainingFeature(); + if (ref == null) { + b.append("NullRef"); + } else { + b.append(ref.getName()); + if (ref.isMany()) { + b.append("/"); + b.append(ecoreId(oo)); + } + } + } else { + b.append("child"); + } + return b.toString(); + } + + private static String describeFact (FactHandle f) { + String s = f.toExternalForm(); + int i = s.indexOf(' '); + if (i >= 0) return s.substring(0,i-1); + else return s; + } + + private class DroolsAgendaListener implements AgendaEventListener { + private void logMatch (Logger log, String label, Match m) { + log.info(label + ": rule " + m.getRule().getName()); + for (int i=0; i l = (List) n.getOldValue(); + int[] positions = (int []) n.getNewValue(); + for (int i=0; i(); + factmap = new HashMap(); + globalmap = new HashMap(); + + this.fireInterval = fireInterval; + } + + public void addObjectTree (EObject o) { + o.eAdapters().add(new UpdateDroolsContentAdapter()); + rootList.add(o); + if (kSession != null) { + insertRecursively (o); + } + } + + public void addEvents(EList l) { + for (EObject o : l) { + addEvent(o); + } + } + + public void addEvent (EObject o) { + logger.debug("inserting event into kSession: " + describeObject(o)); + logger.debug("insert event class: " + o.getClass()); + try { + kSession.insert(o); + } catch (Exception e) { + logger.error("kSession insert failed inserting " + o.toString(), e); + } + } + + public void setGlobal (String s, Object o) { + globalmap.put(s, o); + } + + private void insertRecursively (EObject o) { + logger.debug("inserting (recursively) into kSession: " + describeObject(o)); + FactHandle fh = kSession.insert(o); + factmap.put (o, fh); + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + for (EObject o1 : l) { + insertRecursively(o1); + } + } else { + EObject o1 = (EObject) o.eGet(ref); + if (o1 != null) + insertRecursively(o1); + } + } + } + + public void startSession() { + logger.info("starting kie session"); +// specifying TimedRuleExectionOption here appears to override any values from kmodules.xml +// KieSessionConfiguration ksconf = ks.newKieSessionConfiguration(); +// ksconf.setOption(TimedRuleExectionOption.YES); +// kSession = kContainer.newKieSession("ksession-rules", ksconf); + kSession = kContainer.newKieSession("ksession-rules"); + if (kSession == null) logger.error("Unable to start kie session"); + kSession.addEventListener (new DroolsAgendaListener() ); + kSession.addEventListener (new DroolsRuntimeListener() ); +// kSession.addEventListener (new DroolsProcessListener() ); + //logger = KieServices.Factory.get().getLoggers().newConsoleLogger(kSession); + //kLogger = ks.getLoggers().newFileLogger( kSession, "./logs/audit" ); + + for (Entry e : globalmap.entrySet()) { + try { + kSession.setGlobal(e.getKey(), e.getValue()); + } catch (RuntimeException re) { + logger.warn("Unable to set global " + e.getKey() + ": " + re.getMessage()); + } + } + + for (EObject o : rootList) { + insertRecursively (o); + } + + fireThread = new Thread("rule-firing-thread") { + public void run() { + while (!isInterrupted()) { + logger.debug("firing all rules..."); + try { +// fireAllRules(); + fireUntilHalt(); + } catch (Exception e) { + logger.error("fireAllRules() threw exception", e); + } + + try { + Thread.sleep(fireInterval); + } catch(InterruptedException ex) { + logger.info("rule firing thread interruped"); + Thread.currentThread().interrupt(); + } + } + logger.info("rule firing thread returning"); + } + }; + fireThread.start(); + } + + public void stopSession() { + logger.info("stopping session"); + logger.info("stopping rule firing thread"); + fireThread.interrupt(); + try { + fireThread.join(); + } catch (InterruptedException e) { + logger.warn("Interruped while waiting for fireThread.join()"); + Thread.currentThread().interrupt(); + } + fireThread = null; + if (kSession != null) kSession.dispose(); + if (kLogger != null) kLogger.close(); + kSession = null; + kLogger = null; + factmap.clear(); + } + + public void startScanner (long interval) { + kieScanner.start (interval); + } + public void doScan () { + kieScanner.scanNow (); + } + public void stopScanner () { + kieScanner.stop (); + } + + public void renewSession () { + stopSession(); + startSession(); + } + + public void fireAllRules() { + if (kSession != null) + kSession.fireAllRules(); + } + + public void fireUntilHalt() { + if (kSession != null) { + kSession.fireUntilHalt(); + } else { + logger.warn("fireUntilHalt but null kSession"); + } + } + + public long getCurrentTime() { + return kSession.getSessionClock().getCurrentTime(); + } + + public long advanceTime(long delta, TimeUnit unit) { + SessionClock clock = kSession.getSessionClock(); +// if (kSession.getSessionConfiguration().getOption(ClockTypeOption.class).getClockType() == "pseudo") { +// org.drools.core.time.SessionPseudoClock clock = kSession.getSessionClock(); +// clock.advanceTime(delta, unit); +// } + if (clock instanceof org.drools.core.time.SessionPseudoClock) { + ((org.drools.core.time.SessionPseudoClock) clock).advanceTime(delta, unit); + } else { + logger.error("Attempted to advanceTime, but session clock is not pesudoclock"); + } + return clock.getCurrentTime(); + } + + +// public static void main(String[] args) throws Exception { +// ServiceController s = ServiceFactory.eINSTANCE.createServiceController(); +// +// Enodeb e = ServiceFactory.eINSTANCE.createEnodeb(); +// s.getENodeBs().add(e); +// e.setGain1("foo"); +// Enodeb e2 = ServiceFactory.eINSTANCE.createEnodeb(); +// s.getENodeBs().add(e2); +// e2.setGain1("foo"); +// +// DroolsRuntime drools = new DroolsRuntime (1000L, "org.openecomp.ncomp.test", "pol", "1.1.1-SNAPSHOT"); +// +// drools.addObjectTree(s); +// +// // Start the KieScanner polling the Maven repository every 10 seconds +// drools.startScanner( 10000L ); +// +// drools.startSession(); +// +// EnodebTcpLossAnomalyList anomalylist = ServiceFactory.eINSTANCE.createEnodebTcpLossAnomalyList(); +// drools.addObjectTree(anomalylist); +// EnodebTcpLossAnomaly a = ServiceFactory.eINSTANCE.createEnodebTcpLossAnomaly(); +// a.setNewEvent(true); +// Date d = new Date(); +// a.setStartTime(new Date(d.getTime() - 30000)); +// a.setEndTime(d); +// anomalylist.getAnomalies().add(a); +// +// while (true) { +// drools.fireAllRules(); +// +// try { +// Thread.sleep(10000L); // In milliseconds for looping. +// } catch(InterruptedException ex) { +// Thread.currentThread().interrupt(); +// } +// drools.renewSession(); +// } +// } +} diff --git a/ncomp-sirius-manager-generator/.classpath b/ncomp-sirius-manager-generator/.classpath new file mode 100644 index 0000000..dafd0e4 --- /dev/null +++ b/ncomp-sirius-manager-generator/.classpath @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-generator/.gitignore b/ncomp-sirius-manager-generator/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-generator/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-generator/.project b/ncomp-sirius-manager-generator/.project new file mode 100644 index 0000000..04e53e2 --- /dev/null +++ b/ncomp-sirius-manager-generator/.project @@ -0,0 +1,35 @@ + + + ncomp-sirius-manager-generator + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-generator/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-generator/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/ncomp-sirius-manager-generator/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-sirius-manager-generator/.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-sirius-manager-generator/.settings/org.eclipse.jdt.groovy.core.prefs b/ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000..ae98fea --- /dev/null +++ b/ncomp-sirius-manager-generator/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=24 diff --git a/ncomp-sirius-manager-generator/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-generator/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-generator/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-generator/LICENSE.txt b/ncomp-sirius-manager-generator/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-generator/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-sirius-manager-generator/META-INF/MANIFEST.MF b/ncomp-sirius-manager-generator/META-INF/MANIFEST.MF new file mode 100644 index 0000000..382ee8e --- /dev/null +++ b/ncomp-sirius-manager-generator/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ncomp-sirius-manager-generator +Bundle-SymbolicName: ncomp-sirius-manager-generator +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.sirius.manager.generator +Require-Bundle: ncomp-sirius-manager-model;bundle-version="0.1.0" diff --git a/ncomp-sirius-manager-generator/build.properties b/ncomp-sirius-manager-generator/build.properties new file mode 100644 index 0000000..4c7cc27 --- /dev/null +++ b/ncomp-sirius-manager-generator/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/groovy/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-sirius-manager-generator/pom.xml b/ncomp-sirius-manager-generator/pom.xml new file mode 100644 index 0000000..e649b95 --- /dev/null +++ b/ncomp-sirius-manager-generator/pom.xml @@ -0,0 +1,190 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-generator + 0.1.0-SNAPSHOT + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + src/main/groovy + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + + 3.1 + + groovy-eclipse-compiler + + + + org.codehaus.groovy + groovy-eclipse-compiler + 2.9.1-01 + + + + org.codehaus.groovy + groovy-eclipse-batch + 2.3.7-01 + + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-compiler-plugin + + + [3.1,) + + + compile + testCompile + + + + + + + + + + + + + + + + + org.codehaus.groovy + groovy-all + 2.4.3 + + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-console + ${project.version} + + + org.yaml + snakeyaml + 1.15 + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + diff --git a/ncomp-sirius-manager-generator/src/main/groovy/org/openecomp/ncomp/sirius/manager/generator/ControllerGenerator.groovy b/ncomp-sirius-manager-generator/src/main/groovy/org/openecomp/ncomp/sirius/manager/generator/ControllerGenerator.groovy new file mode 100644 index 0000000..cf2fd59 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/groovy/org/openecomp/ncomp/sirius/manager/generator/ControllerGenerator.groovy @@ -0,0 +1,303 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.generator + + +import org.openecomp.ncomp.sirius.manager.console.Utils; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel + +import groovy.text.SimpleTemplateEngine + +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation +import org.eclipse.emf.ecore.EPackage; +import org.json.JSONObject; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; + + +class ControllerGenerator { + EObject o + EObject providerObject + String providerPackage + String providerPrefix + ControllerModel m + EPackage p + String subName + String clientName + String prefix + String type = "R" + ControllerGenerator root; + boolean enableDrools = false; + boolean enableIRequestHandler = true; + boolean enableISwaggerHandler = false; + boolean enableISiriusPlugin = true; + public ControllerGenerator(EObject o, ControllerModel m) { + this.o = o + this.m = m + root = this + } + public String packageName() { + if (this != root && clientName == null) { + return root.packageName() + (root.o.eClass().EPackage != o.eClass().EPackage? "." + subName : "") + } + EPackage p = o.eClass().getEPackage() + return p.nsURI.replaceAll('.'+p.nsPrefix+'$',"") + ".servers.${p.nsPrefix}" + } + public String factoryName() { + EPackage p = o.eClass().getEPackage() + return "${p.nsPrefix.capitalize()}Factory" + } + public String packageName2() { + EPackage p = o.eClass().getEPackage() + return "${p.nsPrefix.capitalize()}Package" + } + public def operations() { + def l = [] + l += o.eClass().getEOperations(); + o.eClass().getEAllSuperTypes().each { EClass c -> + l += c.getEOperations() + } + return l + } + public def operationsProvider() { + def l = [] + l += o.eClass().getEOperations(); + o.eClass().getEAllSuperTypes().each { EClass c -> + if (providerObject != null && ( + providerObject.eClass().getEAllSuperTypes().contains(c) + || c == providerObject.eClass())) return + l += c.getEOperations() + } + return l + } + public void generateAnt(String fname, boolean xtext, boolean tar) { + def xml = new XmlSlurper().parseText(new File(".classpath").text) + SimpleTemplateEngine engine = new SimpleTemplateEngine() + def env = [g:this,m:m,sourceDirectories:[],projects:[],xtext:xtext,tar:tar] + xml.classpathentry.each { e -> + switch (e.@kind) { + case "src": + def path = e.@path.toString() + if (path.startsWith("/")) { + println "path=$path" + switch (path) { + case "/org.openecomp.ncomp.webservice": env.projects += "org.openecomp.ncomp.utils.jar"; break + default: env.projects += path.replace("/","") + ".jar" + } + } + else { + env.sourceDirectories += path + } + break +// + case "lib": + def path = e.@path.toString() + switch (path) { + case ~/\/sirius-store.*/: + def a = path.split("/") + def jar = a[3] + println "jar=$jar" + env.projects += a[3] + } + } + } + println "Creating $fname" + def x = engine.createTemplate(new File("$m.templateDirectory/ant_xml").text).make(env) + File f = new File(fname) + f.delete() + f.parentFile.mkdirs() + f << x + } + public void generateScripts(String dir,String n) { + SimpleTemplateEngine engine = new SimpleTemplateEngine() + EPackage p = o.eClass().getEPackage() + def env = [g:this,m:m, n:n, nsPrefix: p.getNsPrefix()] + env.sClass = "${root.m.prefix}${root.o.eClass().name}Server" + env.sPackage = root.packageName() + String fname = "$dir/${n}-controller" + println "Creating $fname" + println "Using $m.templateDirectory/controller" + def x = engine.createTemplate(new File("$m.templateDirectory/controller").text).make(env) + File f = new File(fname) + f.delete() + f.parentFile.mkdirs() + f << x + } + public void generate(String dir) { + if (enableDrools && ! enableISiriusPlugin) { + System.err.println "Drools requires ISiriusPlugin, thus enabling ISiriusPlugin" + enableISiriusPlugin = true + } + SimpleTemplateEngine engine = new SimpleTemplateEngine() + + File dir1 = new File(dir) + if (root == this && dir1.exists()) dir1.deleteDir() + dir1.mkdir() + + EPackage p = o.eClass().getEPackage() + + ["Server":[:],"Client":[:],"Console":[:],"Controller":[:],"Factory":[:],"Provider":[:]].each {n, c -> + if (root != this) { + switch (n) { + case "Server": return + case "Factory": if (type == "A" || type == "C" || type == "P") return; + case "Client": case "Console": if (type == "P") return; + } + } + def env = [ + g: this, + o: o, + p: p, + prefix: m.prefix, + name : o.eClass().getName(), + nsPrefix : p.getNsPrefix(), + nsURI : p.getNsURI(), + packageName : packageName(), + cName : "${m.prefix}${o.eClass().name}$n", + fName : factoryName(), + path : root == this ? "resources" : subName, + ] + switch (n) { + case "Provider": env.cName = "${m.prefix}${o.eClass().name}ProviderTemplate"; break + case "Controller": env.cName = "${m.prefix}${o.eClass().name}"; break + case "Factory": env.cName = "${m.prefix}${env.fName}"; break + } + env.sClass = "${root.m.prefix}${root.o.eClass().name}Server" + env.sPackage = root == this ? "" : root.packageName() + def fname = "$dir/${env.cName}.java" + println "Creating $fname" + println "Using $m.templateDirectory/${n}.java" + def x = engine.createTemplate(new File("$m.templateDirectory/${n}.java").text).make(env) + def f = new File(fname) + f.parentFile.mkdirs() + f << x + switch (n) { + case "Provider": + def fname2 = "${dir.replace('src/main/sirius-gen','src/main/java')}/${env.cName}.java".replace("ProviderTemplate", "Provider") + def f2 = new File(fname2) + if (!f2.exists()) { + println "Creating $fname2" + f2.parentFile.mkdirs() + f2 << x.toString().replace("${o.eClass().name}ProviderTemplate", "${o.eClass().name}Provider") + } + break + } + // println "x=$x" + } + generateYaml(dir) + subApis.each { ControllerGenerator g -> + g.generate(dir + (g.o.eClass().EPackage != o.eClass().EPackage ? "/$g.subName" : "")) + } + } + def generateYaml(dir) { + def y = [operations:[:], messages:[dummy:[:]]] + EClass c = o.eClass() + c.getEAllOperations().each { EOperation op -> + y.operations[op.name] = [:] + y.messages[op.name] = [ + errorCode: "$op.name-FAILED-5001W", + messageFormat: "{0}", + description: "Operation Failed with Exception" + ] + } + c.getEAllOperations().each { EOperation op -> + y.operations["REMOTE_$op.name"] = [decription:"Remote call $op.name"] + y.messages["REMOTE_$op.name"] = [ + errorCode: "REMOTE-$op.name-FAILED-5001W", + messageFormat: "{0}", + description: "Remote Operation Failed with Exception" + ] + } + DumperOptions options = new DumperOptions(); + options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + Yaml yaml = new Yaml(options); + JSONObject j = Utils.object2json(y) + File f = new File("src/main/sirius-gen/${c.name}.yaml") + if (f.exists()) f.delete() + f << yaml.dump(yaml.load(j.toString())) + } + def subApis = [] + public void addObject(String subpackage, EObject o, ControllerModel m, boolean enableIRequestHandler = false, boolean enableISiriusPlugin = false) { + def g = new ControllerGenerator(o,m) + g.root = this + g.subName = subpackage + g.type = "O" + g.enableIRequestHandler = enableIRequestHandler + g.enableISiriusPlugin = enableISiriusPlugin + subApis += g + } + public void addApi(String name, EObject o, ControllerModel m, boolean enableIRequestHandler = false, boolean enableISiriusPlugin = false) { + def g = new ControllerGenerator(o,m) + g.root = this + g.subName = name + g.type = "A" + g.enableIRequestHandler = enableIRequestHandler + g.enableISiriusPlugin = enableISiriusPlugin + subApis += g + } + public void addProvider(String name, EObject o, ControllerModel m) { + def g = new ControllerGenerator(o,m) + g.root = this + g.subName = name + g.type = "P" + g.enableIRequestHandler = false + g.enableISiriusPlugin = false + subApis += g + } + def subClients = [] + public void addClient(String name, EObject o, ControllerModel m, boolean enableIRequestHandler = false, boolean enableISiriusPlugin = false) { + def g = new ControllerGenerator(o,m) + g.root = this + g.clientName = name + g.type = "C" + g.enableIRequestHandler = enableIRequestHandler + g.enableISiriusPlugin = enableISiriusPlugin + subClients += g + } + List aliases = new ArrayList(); + public void addAlias(String alias) { + aliases.add(alias); + } + List factories = new ArrayList(); + def useNew = [:] + public void addFactory(String factory, boolean useNew = true) { + factories.add(factory); + this.useNew[factory] = useNew + } + public void enableDrools() { + enableDrools = true; + } + public void addFactory(EFactory f) { + def p = f.ePackage + String f1 = "${p.nsURI}.${p.name.capitalize()}Factory" + addFactory(f1,false) + } + public void setProvider(EObject o2, String prefix) { + providerObject = o2 + EPackage p = o2.eClass().getEPackage() + providerPackage = p.nsURI.replaceAll('.'+p.nsPrefix+'$',"") + ".servers.${p.nsPrefix}" + providerPrefix = prefix + } +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Client.java b/ncomp-sirius-manager-generator/src/main/templates/Client.java new file mode 100644 index 0000000..4b38e94 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Client.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============================================ + */ + +<% +import org.openecomp.ncomp.utils.StringUtil +%>// Autogenerated +// Do not edit. No need to extend this class. +package $packageName; + +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.HighAvailabilityClient; +import org.openecomp.ncomp.sirius.manager.GenericHttpClient; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +import ${p.nsURI}.impl.${name}Impl; +import ${p.nsURI}.${g.packageName2()}; +import ${packageName}.logging.${name}OperationEnum; +import ${packageName}.logging.${name}MessageEnum; + +<% if (sPackage != "") { %> +import ${sPackage}.${prefix}${g.root.o.eClass().name}; <% } %> + + + + +@SuppressWarnings("unchecked") +public class ${cName} extends ${name}Impl { + public static final Logger logger = Logger.getLogger(${cName}.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public AbstractClient client; + + public ${cName}(String file, String name) { + ${prefix}${g.root.o.eClass().name}.ecoreSetup(); + client = new GenericHttpClient(file,name); + client.add("/$path", this); + } + + public ${cName}(String file, String name1, String name2) { + HighAvailabilityClient client1 = new HighAvailabilityClient(file,name1,name2); + client = client1.all; // requests should be forwarded to all. + client.add("/$path", this); + } + + public ${cName}(AbstractClient c) { + client = c; + client.add("/resources", this); + } + + +<% g.operations().each { op -> + def decl = [] + def vars = [] + def timeout = "null" + if (op.getEParameters().find { it.name == "cx" }) { + decl += "org.json.JSONObject cx" + vars += "cx" + timeout = 'cx != null && cx.has("timeout") ? cx.getLong("timeout") : null' + } + def override = "@Override" + def path1 = g.subName == null ? "\"/$path\"" : "\"/$g.subName\"" + if (g.root != g && g.root.o.eClass().EPackage == o.eClass().EPackage) { + decl += "String path" + override = "" + path1 = "path" + } + op.getEParameters().each { p -> + if (p.name == "cx") return + vars += p.name + if (p.isMany()) + decl += "EList<${p.getEType().getInstanceClassName()}> $p.name" + else { + if (p.getEType()==null) System.err.println "$op.name $p.name $p" + decl += "${p.getEType().getInstanceClassName()} $p.name" + } + } + + + def rType = op.getEType() == null ? "void" : op.getEType().getInstanceClassName() + if (op.isMany()) rType = "EList<$rType>" + def ret = rType == "void" ? "" : "return res;" + def decl1 = rType == "void" ? "" : "${rType} res;" + def decl2 = rType == "void" ? "" : "res = ($rType) " +%> + $override + public ${rType} ${op.name}(${StringUtil.join(decl, ", ")}) { + EClass c = ${g.packageName2()}.eINSTANCE.get${g.o.eClass().name}(); //foo + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(${name}OperationEnum.REMOTE_${op.name}); + $decl1 + try { + ${decl2}client.operationPath($path1, c, "${op.name}", $timeout<% if (vars.size()>0) {%>, <%}%>${StringUtil.join(vars,",")}); + } + catch (Exception e) { + ecomplogger.warn(${name}MessageEnum.REMOTE_${op.name}, e.toString()); + throw new RuntimeException("remote call failed: " + client.getRemote() + "@$op.name: " + e); + } + ecomplogger.recordMetricEventEnd(); + ${ret} + } +<% } %> +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Console.java b/ncomp-sirius-manager-generator/src/main/templates/Console.java new file mode 100644 index 0000000..dfe1648 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Console.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============================================ + */ + +<% +import org.openecomp.ncomp.utils.StringUtil +%>// Autogenerated +// Do not edit but extend this class as needed +package $packageName; + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.console.Console; +import org.openecomp.ncomp.sirius.manager.AbstractClient; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; + +<% g.subApis.each { api -> + if (api.o.eClass().getEPackage() == o.eClass().getEPackage()) return +%> + +import ${api.packageName()}.${prefix}${api.o.eClass().name}Console; <% } %> + + +public class ${cName} extends Console { + public static final Logger logger = Logger.getLogger(${cName}.class); + protected ${prefix}${name}Client controller; + +<% g.subApis.each { api -> if (api.type == "P") return; %> + ${prefix}${api.o.eClass().name}Console ${api.subName}; <% } %> + + + public ${cName}(String filename, String name) { + super(filename, name); + controller = new ${prefix}${name}Client(filename,name); + client = controller.client; +<% g.subApis.each { api -> if (api.type == "P") return; %> + ${api.subName} = new ${prefix}${api.o.eClass().name}Console(filename,name); <% } %> + } + + public ${cName}(AbstractClient c) { + controller = new ${prefix}${name}Client(c); + client = controller.client; + } + +<% g.operations().each { op -> + def decl = [] + def vars = [] + if (g.root != g && g.root.o.eClass().EPackage == o.eClass().EPackage) { + decl += "String path" + vars += "path" + } + op.getEParameters().each { p -> + if (p.name == "cx") return + vars += p.name + if (p.isMany()) + decl += "EList<${p.getEType().getInstanceClassName()}> $p.name" + else + decl += "${p.getEType().getInstanceClassName()} $p.name" + } + def rType = op.getEType() == null ? "void" : op.getEType().getInstanceClassName() + if (op.isMany()) rType = "EList<$rType>" + def ret = rType == "void" ? "" : "return res;" + def decl1 = rType == "void" ? "" : "$rType res = null;" + def assign = rType == "void" ? "" : "res = " + if (op.getEParameters().find { it.name == "cx" }) vars = ["null"] + vars +%> + public $rType ${op.name}(${StringUtil.join(decl, ", ")}) { + $decl1 + try { + $assign controller.${op.name}(${StringUtil.join(vars,",")}); + } + catch (ManagementServerError e) { + System.err.println("ERROR: " + e.getJson().toString(2)); + } + $ret + } +<% } %> +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Controller.java b/ncomp-sirius-manager-generator/src/main/templates/Controller.java new file mode 100644 index 0000000..903dde0 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Controller.java @@ -0,0 +1,191 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +<% + + +import org.openecomp.ncomp.component.ApiRequestStatus; +import org.openecomp.ncomp.sirius.manager.ManagementServerError; +import org.openecomp.ncomp.utils.StringUtil +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi + +%>// Autogenerated +// Do not edit. No need to extend this class. +package $packageName; + + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISwaggerHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.SwaggerUtils; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.component.ApiRequestStatus; + +import org.apache.log4j.Logger; + +import org.openecomp.logger.EcompLogger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +import java.util.Date; + +import ${packageName}.logging.${name}OperationEnum; +import ${packageName}.logging.${name}MessageEnum; + + +<% + def others = [] + switch (o) { + case AbstractManagementServer: + others += "java.util.Date"; + others += "org.openecomp.ncomp.sirius.manager.server.LoggerInfo" + others += "org.openecomp.ncomp.sirius.manager.server.ServerFactory" + break + case GuiClientApi: + others += "org.openecomp.ncomp.sirius.gui.tools.*"; + others += "org.openecomp.ncomp.gwt.siriusportal.model.*"; + others += "org.openecomp.ncomp.sirius.manager.Subject"; + others += "org.openecomp.ncomp.sirius.manager.ManagementServer" + others += "org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer" + break + } + if (g.enableDrools) { + others += "org.openecomp.ncomp.core.logs.*" + others += "org.openecomp.ncomp.sirius.manager.drools.DroolsRuntime" + } + others.each { n -> +%> + + + + +import $n; +<% } %> + +import ${p.nsURI}.impl.${name}Impl; + +<% + def l = [] + if (g.enableIRequestHandler) l += "IRequestHandler" + if (g.enableISwaggerHandler) l += "ISwaggerHandler" + if (g.enableISiriusPlugin) l += "ISiriusPlugin" + def implements1 = l.size() > 0 ? " implements ${StringUtil.join(l,', ')}" : "" +%> + +public class ${cName} extends ${name}Impl${implements1} { + public static final Logger logger = Logger.getLogger(${cName}.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + public ${prefix}${name}Provider controller; + ISiriusServer server; + + public ${cName}(ISiriusServer server) { + this.server = server; + this.controller = new ${prefix}${name}Provider(server,this); + } +<% g.operations().each { op -> + def decl = [] + def vars = [] + op.getEParameters().each { p -> + vars += p.name + if (p.isMany()) + decl += "EList<${p.getEType().getInstanceClassName()}> $p.name" + else + decl += "${p.getEType().getInstanceClassName()} $p.name" + } + def rType = op.getEType() == null ? "void" : op.getEType().getInstanceClassName() + if (op.isMany()) rType = "EList<$rType>" + def ret = rType == "void" ? "" : "return res;" + def decl1 = rType == "void" ? "" : "$rType res = null;" + def assign = rType == "void" ? "" : "res = " + def vars1 = ["duration_"] + vars +%> + public $rType ${op.name}(${StringUtil.join(decl, ", ")}) { + $decl1 + long duration_ = 0; + if (server != null) + server.getServer().recordApi(null, this, "${op.name}", ApiRequestStatus.START, ${StringUtil.join(vars1,",")}); + Date now_ = new Date(); + ecomplogger.recordMetricEventStart(); + ecomplogger.setOperation(${name}OperationEnum.${op.name}); + ecomplogger.setInstanceId(ManagementServer.object2ref(this)); + try { + $assign controller.${op.name}(${StringUtil.join(vars,",")}); + } + catch (Exception e) { + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "${op.name}", ApiRequestStatus.ERROR, ${StringUtil.join(vars1,",")}); + System.err.println("ERROR: " + e); + ecomplogger.warn(${name}MessageEnum.${op.name}, e.toString()); + throw e; + } + ecomplogger.recordMetricEventEnd(); + duration_ = new Date().getTime()-now_.getTime(); + if (server != null) + server.getServer().recordApi(null, this, "${op.name}", ApiRequestStatus.OKAY, ${StringUtil.join(vars1,",")}); + $ret + } +<% } %> + +<% if (g.enableIRequestHandler) { %> + @Override + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + return controller.handleJson(userName,action,resourcePath,json,context); + } + + @Override + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + return controller.handleBinary(userName,action,resourcePath,in); + } +<% } %> + +<% if (g.enableISwaggerHandler) { %> +@Override +public void updateSwagger(String path, SwaggerUtils swagger) { + controller.updateSwagger(path,swagger); +} +<% } %> + + +<% if (g.enableISiriusPlugin) { %> + @Override + public void start() { + controller.start(); + } +<% } %> + public static void ecoreSetup() { + ${prefix}${name}Provider.ecoreSetup(); + } + public ${prefix}${name}Provider getSomfProvider() { + return controller; + } +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Factory.java b/ncomp-sirius-manager-generator/src/main/templates/Factory.java new file mode 100644 index 0000000..63344ef --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Factory.java @@ -0,0 +1,64 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +// Autogenerated +// Do not edit. No need to extend this class. +package $packageName; + +import org.eclipse.emf.ecore.EPackage; +import org.apache.log4j.Logger; + +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import ${p.nsURI}.${name}; +import ${p.nsURI}.${nsPrefix.capitalize()}Package; +import ${p.nsURI}.impl.${fName}Impl; + +<% if (sPackage != "") { %>import ${sPackage}.$sClass; <% } %> + +<% g.subApis.each { api -> +if (api.o.eClass().EPackage != o.eClass().EPackage) return +%> +import ${api.o.eClass().EPackage.nsURI}.${api.o.eClass().name};<% } %> + +public class ${cName} extends ${fName}Impl { + public static final Logger logger = Logger.getLogger(${cName}.class); + ISiriusServer server = null; + @Override + public EPackage getEPackage() { return ${nsPrefix.capitalize()}Package.eINSTANCE; } + public ${cName}(ISiriusServer server) { + this.server = server; + } + @Override + public ${name} create${name}() { + return new ${prefix}${name}(server); + } + +<% g.subApis.each { api -> + if (api.o.eClass().EPackage != o.eClass().EPackage) return +%> + @Override + public ${api.o.eClass().name} create${api.o.eClass().name}() { + return new ${prefix}${api.o.eClass().name}(server); + } +<% } %> + +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Provider.java b/ncomp-sirius-manager-generator/src/main/templates/Provider.java new file mode 100644 index 0000000..6113401 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Provider.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============================================ + */ + +<% + +import org.openecomp.ncomp.sirius.manager.ManagementServerError; +import org.openecomp.ncomp.utils.StringUtil +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi + +%> +package $packageName; + + + + + +import java.io.InputStream; + +import org.openecomp.ncomp.sirius.manager.IRequestHandler; +import org.openecomp.ncomp.sirius.manager.ISiriusPlugin; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; +import org.openecomp.ncomp.sirius.function.FunctionUtils; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +<% + def others = [] + def provider = "BasicAdaptorProvider" + switch (o) { + case AbstractManagementServer: + others += "java.util.Date"; + others += "org.openecomp.ncomp.sirius.manager.server.LoggerInfo" + others += "org.openecomp.ncomp.sirius.manager.server.ServerFactory" + provider = "BasicManagementServerProvider" + break + case GuiClientApi: + others += "org.openecomp.ncomp.sirius.gui.tools.*"; + others += "org.openecomp.ncomp.gwt.siriusportal.model.*"; + others += "org.openecomp.ncomp.sirius.manager.Subject"; + others += "org.openecomp.ncomp.sirius.manager.ManagementServer" + others += "org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer" + provider = "BasicGuiClientApiProvider" + break + } + if (g.providerObject != null) { + provider = "$g.providerPrefix${g.providerObject.eClass().name}Provider" + others += "${g.providerPackage}.$provider" + } else { + others += "org.openecomp.ncomp.sirius.manager.${provider}" + } + if (g.enableDrools) { + others += "org.openecomp.ncomp.core.logs.LogLevel" + others += "org.openecomp.ncomp.core.logs.LogMessage" + others += "org.openecomp.ncomp.core.logs.LogSeverity" + others += "org.openecomp.ncomp.core.logs.LogsFactory" + others += "org.openecomp.ncomp.sirius.manager.DroolsEventReporter" + others += "org.openecomp.ncomp.sirius.manager.drools.DroolsRuntime" + } + others.each { n -> +%> + +import $n; +<% } %> + +import ${p.nsURI}.impl.${name}Impl; +import ${p.nsURI}.${name}; + + +public class ${cName} extends ${provider} { + private static final Logger logger = Logger.getLogger(${cName}.class); + ${name} o; + + public ${cName}(ISiriusServer controller, ${name} o) { + super(controller, o); + this.o = o; + } +<% g.operationsProvider().each { op -> + def decl = [] + def vars = [] +// if (g.root != g && g.root.o.eClass().EPackage == o.eClass().EPackage) { +// decl += "String path" +// vars += "path" +// } + op.getEParameters().each { p -> + vars += p.name + if (p.isMany()) + decl += "EList<${p.getEType().getInstanceClassName()}> $p.name" + else + decl += "${p.getEType().getInstanceClassName()} $p.name" + } + def rType = op.getEType() == null ? "void" : op.getEType().getInstanceClassName() + if (op.isMany()) rType = "EList<$rType>" + def ret = rType == "void" ? "" : "return res;" + def decl1 = rType == "void" ? "" : "$rType res = null;" + def assign = rType == "void" ? "" : "res = " + def cx = op.getEParameters().find { it.name == "cx" } ? "null," : "" + def action = "$decl1\n // TODO IMPLEMENT\n throw new UnsupportedOperationException();" + switch (o) { + case AbstractManagementServer: + switch (op.name) { + case "logs": + case "properties": + case "metrics": + case "uploadInfo": + case "getMessages": + case "getValues": + case "getValuesAll": + case "evaluate": + case "getRequestLogger": + case "update": + return + } + break; + case GuiClientApi: + switch (op.name) { + case "getTree": + case "getTable": + case "getTimeSerie": + case "getObject": + case "getHtml": + case "getGraph": + return + } + break; + } + %> + public ${rType} ${op.name}(${StringUtil.join(decl, ", ")}) { + $action + } +<% } %> +<% if (g.enableIRequestHandler) { %> +public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + // TODO Auto-generated method stub + return null; + } + + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + // TODO Auto-generated method stub + return null; + } +<% } %> + +<% if (g.enableDrools) {%> +DroolsRuntime drools = null; +<% }%> +<% if (g.enableISiriusPlugin) { %> +<% if (g.enableDrools) {%> + public void start() { + try { + // TODO specify rules group, artifact and version + drools = new DroolsRuntime (1000L, "$packageName", "unspecified-rules-artifact", "0.1.0-SNAPSHOT", + new DroolsEventReporter(controller.getServer(), "unknown")); + drools.addObjectTree (o); + drools.startSession(); + drools.startScanner(60000L); + controller.getServer().setDroolsRuntime(drools); +// log("started Drools Session", LogLevel.INFO, LogSeverity.SEV4); + } catch (Exception e) { + e.printStackTrace(); + } + // TODO Auto-generated method stub + } +<% }%> +<% } %> + +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/Server.java b/ncomp-sirius-manager-generator/src/main/templates/Server.java new file mode 100644 index 0000000..638a9ab --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/Server.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============================================ + */ + +// Autogenerated +// Do not edit but extend this class as needed +package $packageName; + +import static org.openecomp.ncomp.utils.PropertyUtil.getPropertiesFromClasspath; + +import java.io.IOException; +import java.util.Properties; +import java.util.TimeZone; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EFactory; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.sirius.manager.Jetty8Server; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ISiriusServer; + +import ${p.nsURI}.${name}; + +<% g.subApis.each { api -> +if (api.type == "P") return +def n1 = api.subName +if (n1 == null) return +%> +import ${api.packageName()}.${api.m.prefix}${api.factoryName()}; +<% } %> + +<% g.subClients.each { api -> %> +import ${api.o.eClass().EPackage.nsURI}.${api.o.eClass().name}; +import ${api.packageName()}.${prefix}${api.o.eClass().name}Client; +<% } %> + + +public class $cName implements ISiriusServer { + public static final Logger logger = Logger.getLogger(${cName}.class); + String serverPath; + ManagementServer server; + ${prefix}${name} controller; + String directory = "data"; +// LocationControllerApi api ; + Jetty8Server webServer; + ${prefix}${fName} f = new ${prefix}${fName}(this); + +<% g.subApis.each { api -> + if (api.type == "P") return + def n1 = api.subName + if (n1 == null) return +%> + String ${n1}Path; + ManagementServer ${n1}Server; +<% } %> +<% g.subClients.each { api -> %> + ${api.o.eClass().name} $api.clientName; +<% } %> + public ${prefix}${name}Server(String filename) throws IOException { + logger.warn("controller restarting"); + ${prefix}${name}.ecoreSetup(); + props = getPropertiesFromClasspath(filename); + serverPath = (String) props.get("server.dir"); + server = new ManagementServer(f, "${name}", serverPath, filename); + server.addFactory(f); +<% g.factories.each { factory -> + if (g.useNew[factory]) { %> + server.addFactory(new ${factory}(this)); + <% } else { %> + server.addFactory(${factory}.eINSTANCE); + <% } %> +<% } %> + server.addRuntimeFactories(this); + server.start(); + } + public void runWebserver() throws IOException { + controller = (${prefix}${name}) server.find("/").o; + webServer = new Jetty8Server("${nsPrefix}.properties"); + webServer.add("/resources",server); +<% g.aliases.each { %> + webServer.add("$it",controller); +<%}%> + +<% g.subApis.each { api -> + if (api.type == "A" || api.type == "P") return + def n1 = api.subName +%> + EFactory ${n1}Factory = new ${api.m.prefix}${api.factoryName()}(this); + ${n1}Path = serverPath + "/${n1}"; + ${n1}Server = new ManagementServer(${n1}Factory, "${api.o.eClass().name}", ${n1}Path, "${n1}.properties"); + ${n1}Server.start(); + webServer.add("/${n1}",${n1}Server); +<% } %> + +<% g.subClients.each { api -> %> + $api.clientName = new ${prefix}${api.o.eClass().name}Client("${nsPrefix}.properties", "$api.clientName"); +<% } %> + logger.info("Joining webserver"); + webServer.join(); + } + static Properties props = null; + public static void main(String []args) throws IOException { + // ALWAYS USE GMT. + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + + ${prefix}${name}Server s = new ${prefix}${name}Server("${nsPrefix}.properties"); + s.runWebserver(); + } + public ${name} getController() { + return controller; + } + public ManagementServer getServer() { + return server; + } +} diff --git a/ncomp-sirius-manager-generator/src/main/templates/console b/ncomp-sirius-manager-generator/src/main/templates/console new file mode 100644 index 0000000..decc901 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/console @@ -0,0 +1,3 @@ +#!/bin/bash + +LD_LIBRARY_PATH= groovysh -cp config:lib:lib/\* diff --git a/ncomp-sirius-manager-generator/src/main/templates/controller b/ncomp-sirius-manager-generator/src/main/templates/controller new file mode 100644 index 0000000..344ec8f --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/controller @@ -0,0 +1,140 @@ +#!/bin/bash + +# setup env if needed. java 6 required +## JAVA_HOME= + +############################## DO NOT EDIT BELOW ########################## + +SNAME="$m.prefix Controller" +PNAME=$n-controller +CLASS=${sPackage}.${sClass} + +############################## COMMON BELOW ########################## + +check_status () +{ + if [ -f "\${_PIDFILE}" ]; then + _PID=`cat "\${_PIDFILE}"` + check_status_of_pid \$_PID + else + _STATUS="\$SNAME (no pidfile) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "\$1" ] && kill -0 \$1 2>/dev/null ; then + _STATUS="\$SNAME (pid \$1) is running" + _RUNNING=1 + else + _STATUS="\$SNAME (pid \$1) is NOT running" + _RUNNING=0 + fi +} + + +check_status_of_pid () +{ + if [ -n "\$1" ] && kill -0 \$1 2>/dev/null ; then + _STATUS="\$SNAME (pid \$1) is running" + _RUNNING=1 + else + _STATUS="\$SNAME (pid \$1) is NOT running" + _RUNNING=0 + fi +} + +remove_pid_file () +{ + if [ -f "\${_PIDFILE}" ]; then + rm "\${_PIDFILE}" + fi +} + + +_DIR=`dirname "\$0"` +_DIR=`dirname "\$_DIR"` + +_PIDFILE=\$_DIR/PID + +CMD=\$1 +shift + +check_status + +CP=\$(find \$_DIR/lib/*/* -name \\*.jar 2>/dev/null | xargs -I X printf ":%s" X) + +JVMARGS=\$(grep 'server.jvmargs' \$_DIR/config/${nsPrefix}.properties | sed -e 's/.*=//') + +case \$CMD in + status) + echo \$_STATUS + exit 0 + ;; + console) + \$GROOVY_HOME/bin/groovysh -cp \$_DIR/config:\$_DIR/lib:\$_DIR/lib/\\*:\$CP + ;; + run) + \$JAVA_HOME/bin/java -cp \$_DIR/config:\$_DIR/lib:\$_DIR/lib/\\*:\$CP "\$@" + ;; + groovy) + \$GROOVY_HOME/bin/groovy -cp \$_DIR/config:\$_DIR/lib:\$_DIR/lib/\\*:\$CP "\$@" + ;; + start) + if [ "\$_RUNNING" = "1" ]; then + echo \$_STATUS + exit 0 + fi + mkdir -p \$_DIR/logs + if [ -e \$_DIR/logs/\$PNAME.out.1 ]; then mv \$_DIR/logs/\$PNAME.out.1 \$_DIR/logs/\$PNAME.out.2; fi + if [ -e \$_DIR/logs/\$PNAME.err.1 ]; then mv \$_DIR/logs/\$PNAME.err.1 \$_DIR/logs/\$PNAME.err.2; fi + if [ -e \$_DIR/logs/\$PNAME.out ]; then mv \$_DIR/logs/\$PNAME.out \$_DIR/logs/\$PNAME.out.1; fi + if [ -e \$_DIR/logs/\$PNAME.err ]; then mv \$_DIR/logs/\$PNAME.err \$_DIR/logs/\$PNAME.err.1; fi +<% if (g.enableDrools) { %> + nohup \$JAVA_HOME/bin/java \$JVMARGS -Dkie.maven.settings.custom=\$_DIR/config/kie_settings.xml -cp \$_DIR/config:\$_DIR/lib:\$_DIR/lib/\\*:/opt/drools-distribution-6.3.0.Final/binaries/\\*:\$CP "\$@" \$CLASS >> \$_DIR/logs/\$PNAME.out 2>> \$_DIR/logs/\$PNAME.err & +<% } else { %> + nohup \$JAVA_HOME/bin/java \$JVMARGS -cp \$_DIR/config:\$_DIR/lib:\$_DIR/lib/\\*:\$CP "\$@" \$CLASS >> \$_DIR/logs/\$PNAME.out 2>> \$_DIR/logs/\$PNAME.err & +<% } %> + _PID=\$! + echo \$_PID > \$_PIDFILE + sleep 5 + check_status + echo \$_STATUS + if [ "\$_RUNNING" = "1" ]; then + exit 0 + else + echo "Failed to start - make sure the \$SNAME is fully configured properly" + exit 1 + fi + ;; + stop) + if [ "\$_RUNNING" = "0" ]; then + echo \$_STATUS + remove_pid_file + exit 0 + fi + echo "Stopping \$SNAME..." + _PID_TO_KILL=\$_PID; + echo "\$SNAME (pid=\${_PID_TO_KILL}) is stopping..." + kill -TERM \$_PID_TO_KILL + sleep 5 + check_status_of_pid \$_PID_TO_KILL + if [ "\$_RUNNING" = "1" ]; then + kill -TERM \$_PID_TO_KILL + fi + while [ "\$_RUNNING" = "1" ]; do + sleep 2 + check_status_of_pid \$_PID_TO_KILL + done + remove_pid_file + echo "\$SNAME has stopped." + exit 0 + ;; + *) + echo "\$0 start|stop" + ;; +esac + + diff --git a/ncomp-sirius-manager-generator/src/main/templates/xcore b/ncomp-sirius-manager-generator/src/main/templates/xcore new file mode 100644 index 0000000..8d6c1b2 --- /dev/null +++ b/ncomp-sirius-manager-generator/src/main/templates/xcore @@ -0,0 +1,32 @@ +<% +import org.eclipse.emf.ecore.*; +%> +@GenModel(updateClasspath="false") +package $pName + +import org.openecomp.ncomp.sirius.manager.model.NamedEntity + +<% p.EClassifiers.each { EClassifier c -> %> +class $c.name extends NamedEntity { + <% c.getEReferences().each { EReference ref -> %> + ${ref.isContainment() ? "contains" : "refers"} ${ref.eType.name}${ref.isMany() ? "[]" : ""} $ref.name <% } %> + <% c.getEAttributes().each { EAttribute attr -> + switch (attr.name) { + case "name": + case "title": + case "description": return + } + def t = attr.eType.name + switch (t) { + case "EBoolean": t = "Boolean"; break + case "EString": t = "String"; break + case "EDouble": t = "Double"; break + case "EDate": t = "long"; break + } + %> + ${t}${attr.isMany() ? "[]" : ""} $attr.name <% } %> +} +<% } %> + + + diff --git a/ncomp-sirius-manager-model/.classpath b/ncomp-sirius-manager-model/.classpath new file mode 100644 index 0000000..217427e --- /dev/null +++ b/ncomp-sirius-manager-model/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-model/.gitignore b/ncomp-sirius-manager-model/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-model/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-model/.project b/ncomp-sirius-manager-model/.project new file mode 100644 index 0000000..34f1e37 --- /dev/null +++ b/ncomp-sirius-manager-model/.project @@ -0,0 +1,34 @@ + + + ncomp-sirius-manager-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-model/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-sirius-manager-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-sirius-manager-model/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-model/LICENSE.txt b/ncomp-sirius-manager-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-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-sirius-manager-model/META-INF/MANIFEST.MF b/ncomp-sirius-manager-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..50eac37 --- /dev/null +++ b/ncomp-sirius-manager-model/META-INF/MANIFEST.MF @@ -0,0 +1,38 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-sirius-manager-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Export-Package: org.openecomp.ncomp.sirius.manager.controllermodel, + org.openecomp.ncomp.sirius.manager.controllermodel.impl, + org.openecomp.ncomp.sirius.manager.controllermodel.util, + org.openecomp.ncomp.sirius.manager.graph, + org.openecomp.ncomp.sirius.manager.properties, + org.openecomp.ncomp.sirius.manager.properties.impl, + org.openecomp.ncomp.sirius.manager.properties.util, + org.openecomp.ncomp.sirius.manager.server, + org.openecomp.ncomp.sirius.manager.server.impl, + org.openecomp.ncomp.sirius.manager.server.util, + org.openecomp.ncomp.sirius.manager.tableTemplate, + org.openecomp.ncomp.sirius.manager.tableTemplate.impl, + org.openecomp.ncomp.sirius.manager.tableTemplate.util, + org.openecomp.ncomp.gwt.siriusportal.model, + org.openecomp.ncomp.gwt.siriusportal.model.impl, + org.openecomp.ncomp.gwt.siriusportal.model.util, + org.openecomp.ncomp.sirius.manager.swagger, + org.openecomp.ncomp.sirius.manager.swagger.impl, + org.openecomp.ncomp.sirius.manager.swagger.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + org.eclipse.xtext;bundle-version="2.7.3", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-core-types;bundle-version="0.1.0", + ncomp-core-model;bundle-version="0.1.0";visibility:=reexport, + ncomp-sirius-manager-model;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/ncomp-sirius-manager-model/build.properties b/ncomp-sirius-manager-model/build.properties new file mode 100644 index 0000000..d84fe30 --- /dev/null +++ b/ncomp-sirius-manager-model/build.properties @@ -0,0 +1,5 @@ +source.. = src/main/xcore/,\ + src/main/xcore-gen/ +bin.includes = META-INF/,\ + . +output.. = bin/ diff --git a/ncomp-sirius-manager-model/plugin.properties b/ncomp-sirius-manager-model/plugin.properties new file mode 100644 index 0000000..4ecd53d --- /dev/null +++ b/ncomp-sirius-manager-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Graph Model +providerName = www.example.org diff --git a/ncomp-sirius-manager-model/plugin.xml b/ncomp-sirius-manager-model/plugin.xml new file mode 100644 index 0000000..e1864e7 --- /dev/null +++ b/ncomp-sirius-manager-model/plugin.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-model/pom.xml b/ncomp-sirius-manager-model/pom.xml new file mode 100644 index 0000000..66f7df3 --- /dev/null +++ b/ncomp-sirius-manager-model/pom.xml @@ -0,0 +1,18 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + org.openecomp.ncomp.core + ncomp-core-model + ${project.version} + + + diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiClientApi.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiClientApi.java new file mode 100644 index 0000000..80d2650 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiClientApi.java @@ -0,0 +1,89 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model; + +import org.openecomp.ncomp.sirius.manager.graph.GuiGraph; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Client Api'. + * + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiClientApi() + * @model + * @generated + */ +public interface GuiClientApi extends EObject { + /** + * + * + * @model kind="operation" unique="false" + * @generated + */ + GuiTree getTree(); + + /** + * + * + * @model unique="false" pathUnique="false" + * @generated + */ + GuiObject getObject(String path); + + /** + * + * + * @model unique="false" pathUnique="false" startUnique="false" endUnique="false" durationUnique="false" + * @generated + */ + GuiTimeSerie getTimeSerie(String path, String start, String end, String duration); + + /** + * + * + * @model unique="false" pathUnique="false" startUnique="false" endUnique="false" + * @generated + */ + GuiTable getTable(String path, String start, String end); + + /** + * + * + * @model unique="false" pathUnique="false" startUnique="false" endUnique="false" + * @generated + */ + GuiHtml getHtml(String path, String start, String end); + + /** + * + * + * @model unique="false" pathUnique="false" startUnique="false" endUnique="false" + * @generated + */ + GuiGraph getGraph(String path, String start, String end); + +} // GuiClientApi diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagram.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagram.java new file mode 100644 index 0000000..1af84bd --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagram.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Diagram'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram#getItems Items}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagram() + * @model + * @generated + */ +public interface GuiDiagram extends EObject { + /** + * Returns the value of the 'Items' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem}. + * + *

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

+ * + * @return the value of the 'Items' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagram_Items() + * @model containment="true" + * @generated + */ + EList getItems(); + +} // GuiDiagram diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagramItem.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagramItem.java new file mode 100644 index 0000000..ac96d5e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiDiagramItem.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.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Diagram Item'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem#getTooltip Tooltip}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramItem() + * @model + * @generated + */ +public interface GuiDiagramItem extends EObject { + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getX X}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getY Y}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getH H}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getW W}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramRectangle() + * @model + * @generated + */ +public interface GuiDiagramRectangle extends GuiDiagramItem { + /** + * Returns the value of the 'X' attribute. + * + *

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

+ * + * @return the value of the 'X' attribute. + * @see #setX(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramRectangle_X() + * @model unique="false" + * @generated + */ + int getX(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getX X}' attribute. + * + * + * @param value the new value of the 'X' attribute. + * @see #getX() + * @generated + */ + void setX(int value); + + /** + * Returns the value of the 'Y' attribute. + * + *

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

+ * + * @return the value of the 'Y' attribute. + * @see #setY(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramRectangle_Y() + * @model unique="false" + * @generated + */ + int getY(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getY Y}' attribute. + * + * + * @param value the new value of the 'Y' attribute. + * @see #getY() + * @generated + */ + void setY(int value); + + /** + * Returns the value of the 'H' attribute. + * + *

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

+ * + * @return the value of the 'H' attribute. + * @see #setH(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramRectangle_H() + * @model unique="false" + * @generated + */ + int getH(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getH H}' attribute. + * + * + * @param value the new value of the 'H' attribute. + * @see #getH() + * @generated + */ + void setH(int value); + + /** + * Returns the value of the 'W' attribute. + * + *

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

+ * + * @return the value of the 'W' attribute. + * @see #setW(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiDiagramRectangle_W() + * @model unique="false" + * @generated + */ + int getW(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getW W}' attribute. + * + * + * @param value the new value of the 'W' attribute. + * @see #getW() + * @generated + */ + void setW(int value); + +} // GuiDiagramRectangle diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiHtml.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiHtml.java new file mode 100644 index 0000000..8fae87a --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiHtml.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.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Html'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml#getHtml Html}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiHtml() + * @model + * @generated + */ +public interface GuiHtml extends EObject { + /** + * Returns the value of the 'Html' attribute. + * + *

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

+ * + * @return the value of the 'Html' attribute. + * @see #setHtml(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiHtml_Html() + * @model unique="false" + * @generated + */ + String getHtml(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml#getHtml Html}' attribute. + * + * + * @param value the new value of the 'Html' attribute. + * @see #getHtml() + * @generated + */ + void setHtml(String value); + +} // GuiHtml diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiNamedObject.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiNamedObject.java new file mode 100644 index 0000000..c3d6ea4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiNamedObject.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Named Object'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject#getObjectName Object Name}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiNamedObject() + * @model + * @generated + */ +public interface GuiNamedObject extends GuiObject { + /** + * Returns the value of the 'Object Name' attribute. + * + *

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

+ * + * @return the value of the 'Object Name' attribute. + * @see #setObjectName(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiNamedObject_ObjectName() + * @model unique="false" + * @generated + */ + String getObjectName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject#getObjectName Object Name}' attribute. + * + * + * @param value the new value of the 'Object Name' attribute. + * @see #getObjectName() + * @generated + */ + void setObjectName(String value); + +} // GuiNamedObject diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObject.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObject.java new file mode 100644 index 0000000..04d3e3d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObject.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Object'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObject#getValues Values}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObject() + * @model + * @generated + */ +public interface GuiObject extends EObject { + /** + * Returns the value of the 'Values' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue}. + * + *

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

+ * + * @return the value of the 'Values' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObject_Values() + * @model containment="true" + * @generated + */ + EList getValues(); + +} // GuiObject diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectNamedList.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectNamedList.java new file mode 100644 index 0000000..35295c5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectNamedList.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Gui Object Named List'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList#getObjects Objects}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectNamedList() + * @model + * @generated + */ +public interface GuiObjectNamedList extends GuiObjectValue { + /** + * Returns the value of the 'Objects' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject}. + * + *

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

+ * + * @return the value of the 'Objects' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectNamedList_Objects() + * @model containment="true" + * @generated + */ + EList getObjects(); + +} // GuiObjectNamedList diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectUnNamedList.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectUnNamedList.java new file mode 100644 index 0000000..11500a5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectUnNamedList.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Gui Object Un Named List'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList#getObjects Objects}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectUnNamedList() + * @model + * @generated + */ +public interface GuiObjectUnNamedList extends GuiObjectValue { + /** + * Returns the value of the 'Objects' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObject}. + * + *

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

+ * + * @return the value of the 'Objects' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectUnNamedList_Objects() + * @model containment="true" + * @generated + */ + EList getObjects(); + +} // GuiObjectUnNamedList diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValue.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValue.java new file mode 100644 index 0000000..bf85426 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValue.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.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Object Value'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getValueName Value Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getTooltip Tooltip}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValue() + * @model abstract="true" + * @generated + */ +public interface GuiObjectValue extends EObject { + /** + * Returns the value of the 'Value Name' attribute. + * + *

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

+ * + * @return the value of the 'Value Name' attribute. + * @see #setValueName(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValue_ValueName() + * @model unique="false" + * @generated + */ + String getValueName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getValueName Value Name}' attribute. + * + * + * @param value the new value of the 'Value Name' attribute. + * @see #getValueName() + * @generated + */ + void setValueName(String value); + + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

+ * + * @return the value of the 'Tooltip' attribute. + * @see #setTooltip(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValue_Tooltip() + * @model unique="false" + * @generated + */ + String getTooltip(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getTooltip Tooltip}' attribute. + * + * + * @param value the new value of the 'Tooltip' attribute. + * @see #getTooltip() + * @generated + */ + void setTooltip(String value); + +} // GuiObjectValue diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueInteger.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueInteger.java new file mode 100644 index 0000000..78c478e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueInteger.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Object Value Integer'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger#getI I}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueInteger() + * @model + * @generated + */ +public interface GuiObjectValueInteger extends GuiObjectValue { + /** + * Returns the value of the 'I' attribute. + * + *

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

+ * + * @return the value of the 'I' attribute. + * @see #setI(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueInteger_I() + * @model unique="false" + * @generated + */ + int getI(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger#getI I}' attribute. + * + * + * @param value the new value of the 'I' attribute. + * @see #getI() + * @generated + */ + void setI(int value); + +} // GuiObjectValueInteger diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueObject.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueObject.java new file mode 100644 index 0000000..29841d5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueObject.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Object Value Object'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject#getV V}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueObject() + * @model + * @generated + */ +public interface GuiObjectValueObject extends GuiObjectValue { + /** + * Returns the value of the 'V' containment reference. + * + *

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

+ * + * @return the value of the 'V' containment reference. + * @see #setV(GuiObject) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueObject_V() + * @model containment="true" + * @generated + */ + GuiObject getV(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject#getV V}' containment reference. + * + * + * @param value the new value of the 'V' containment reference. + * @see #getV() + * @generated + */ + void setV(GuiObject value); + +} // GuiObjectValueObject diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueReference.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueReference.java new file mode 100644 index 0000000..289bd94 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueReference.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Object Value Reference'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueReference() + * @model + * @generated + */ +public interface GuiObjectValueReference extends GuiObjectValueString { + /** + * Returns the value of the 'Path' attribute. + * + *

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

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueReference_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // GuiObjectValueReference diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueString.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueString.java new file mode 100644 index 0000000..66f8d1d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueString.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Object Value String'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString#getV V}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueString() + * @model + * @generated + */ +public interface GuiObjectValueString extends GuiObjectValue { + /** + * Returns the value of the 'V' attribute. + * + *

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

+ * + * @return the value of the 'V' attribute. + * @see #setV(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueString_V() + * @model unique="false" + * @generated + */ + String getV(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString#getV V}' attribute. + * + * + * @param value the new value of the 'V' attribute. + * @see #getV() + * @generated + */ + void setV(String value); + +} // GuiObjectValueString diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueTimeSeries.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueTimeSeries.java new file mode 100644 index 0000000..7e0beb6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiObjectValueTimeSeries.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Object Value Time Series'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueTimeSeries() + * @model + * @generated + */ +public interface GuiObjectValueTimeSeries extends GuiObjectValueString { + /** + * Returns the value of the 'Path' attribute. + * + *

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

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiObjectValueTimeSeries_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // GuiObjectValueTimeSeries diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTable.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTable.java new file mode 100644 index 0000000..2874f08 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTable.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Table'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getColumns Columns}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getRows Rows}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTable() + * @model + * @generated + */ +public interface GuiTable extends EObject { + /** + * Returns the value of the 'Columns' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn}. + * + *

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

+ * + * @return the value of the 'Columns' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTable_Columns() + * @model containment="true" + * @generated + */ + EList getColumns(); + + /** + * Returns the value of the 'Rows' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow}. + * + *

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

+ * + * @return the value of the 'Rows' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTable_Rows() + * @model containment="true" + * @generated + */ + EList getRows(); + +} // GuiTable diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCell.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCell.java new file mode 100644 index 0000000..1812f3e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCell.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.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Table Cell'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell#getTooltip Tooltip}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCell() + * @model abstract="true" + * @generated + */ +public interface GuiTableCell extends EObject { + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

+ * + * @return the value of the 'Tooltip' attribute. + * @see #setTooltip(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCell_Tooltip() + * @model unique="false" + * @generated + */ + String getTooltip(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell#getTooltip Tooltip}' attribute. + * + * + * @param value the new value of the 'Tooltip' attribute. + * @see #getTooltip() + * @generated + */ + void setTooltip(String value); + +} // GuiTableCell diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDate.java new file mode 100644 index 0000000..b2f44d1 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDate.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.gwt.siriusportal.model; + +import java.util.Date; + +/** + * + * A representation of the model object 'Gui Table Cell Date'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellDate() + * @model + * @generated + */ +public interface GuiTableCellDate extends GuiTableCell { + /** + * Returns the value of the 'Value' attribute. + * + *

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

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(Date) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellDate_Value() + * @model unique="false" dataType="org.openecomp.ncomp.gwt.siriusportal.model.Date" + * @generated + */ + Date getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(Date value); + +} // GuiTableCellDate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDouble.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDouble.java new file mode 100644 index 0000000..78e61c8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellDouble.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Table Cell Double'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getTimeseriesPath Timeseries Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellDouble() + * @model + * @generated + */ +public interface GuiTableCellDouble extends GuiTableCell { + /** + * Returns the value of the 'Value' attribute. + * + *

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

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(double) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellDouble_Value() + * @model unique="false" + * @generated + */ + double getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(double value); + + /** + * Returns the value of the 'Timeseries Path' attribute. + * + *

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

+ * + * @return the value of the 'Timeseries Path' attribute. + * @see #setTimeseriesPath(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellDouble_TimeseriesPath() + * @model unique="false" + * @generated + */ + String getTimeseriesPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getTimeseriesPath Timeseries Path}' attribute. + * + * + * @param value the new value of the 'Timeseries Path' attribute. + * @see #getTimeseriesPath() + * @generated + */ + void setTimeseriesPath(String value); + +} // GuiTableCellDouble diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReference.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReference.java new file mode 100644 index 0000000..5a42dd3 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReference.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.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Table Cell Reference'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getLabel Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellReference() + * @model + * @generated + */ +public interface GuiTableCellReference extends EObject { + /** + * Returns the value of the 'Label' attribute. + * + *

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

+ * + * @return the value of the 'Label' attribute. + * @see #setLabel(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellReference_Label() + * @model unique="false" + * @generated + */ + String getLabel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getLabel Label}' attribute. + * + * + * @param value the new value of the 'Label' attribute. + * @see #getLabel() + * @generated + */ + void setLabel(String value); + + /** + * Returns the value of the 'Path' attribute. + * + *

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

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellReference_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // GuiTableCellReference diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReferences.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReferences.java new file mode 100644 index 0000000..0f01cfb --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellReferences.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Gui Table Cell References'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences#getRefs Refs}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellReferences() + * @model + * @generated + */ +public interface GuiTableCellReferences extends GuiTableCell { + /** + * Returns the value of the 'Refs' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference}. + * + *

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

+ * + * @return the value of the 'Refs' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellReferences_Refs() + * @model containment="true" + * @generated + */ + EList getRefs(); + +} // GuiTableCellReferences diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellString.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellString.java new file mode 100644 index 0000000..0a5dd76 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableCellString.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.gwt.siriusportal.model; + + +/** + * + * A representation of the model object 'Gui Table Cell String'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableCellString() + * @model + * @generated + */ +public interface GuiTableCellString extends GuiTableCell { + /** + * Returns the value of the 'Value' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColName Col Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getFormat Format}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getWidth Width}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#isHidden Hidden}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColumnType Column Type}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn() + * @model + * @generated + */ +public interface GuiTableColumn extends EObject { + /** + * Returns the value of the 'Col Name' attribute. + * + *

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

+ * + * @return the value of the 'Col Name' attribute. + * @see #setColName(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_ColName() + * @model unique="false" + * @generated + */ + String getColName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColName Col Name}' attribute. + * + * + * @param value the new value of the 'Col Name' attribute. + * @see #getColName() + * @generated + */ + void setColName(String value); + + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

+ * + * @return the value of the 'Tooltip' attribute. + * @see #setTooltip(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_Tooltip() + * @model unique="false" + * @generated + */ + String getTooltip(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getTooltip Tooltip}' attribute. + * + * + * @param value the new value of the 'Tooltip' attribute. + * @see #getTooltip() + * @generated + */ + void setTooltip(String value); + + /** + * Returns the value of the 'Format' attribute. + * + *

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

+ * + * @return the value of the 'Format' attribute. + * @see #setFormat(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_Format() + * @model unique="false" + * @generated + */ + String getFormat(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getFormat Format}' attribute. + * + * + * @param value the new value of the 'Format' attribute. + * @see #getFormat() + * @generated + */ + void setFormat(String value); + + /** + * Returns the value of the 'Width' attribute. + * The default value is "0". + * + *

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

+ * + * @return the value of the 'Width' attribute. + * @see #setWidth(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_Width() + * @model default="0" unique="false" + * @generated + */ + int getWidth(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getWidth Width}' attribute. + * + * + * @param value the new value of the 'Width' attribute. + * @see #getWidth() + * @generated + */ + void setWidth(int value); + + /** + * Returns the value of the 'Hidden' attribute. + * The default value is "false". + * + *

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

+ * + * @return the value of the 'Hidden' attribute. + * @see #setHidden(boolean) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_Hidden() + * @model default="false" unique="false" + * @generated + */ + boolean isHidden(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#isHidden Hidden}' attribute. + * + * + * @param value the new value of the 'Hidden' attribute. + * @see #isHidden() + * @generated + */ + void setHidden(boolean value); + + /** + * Returns the value of the 'Column Type' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType}. + * + *

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

+ * + * @return the value of the 'Column Type' attribute. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType + * @see #setColumnType(GuiTableColumnType) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumn_ColumnType() + * @model unique="false" + * @generated + */ + GuiTableColumnType getColumnType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColumnType Column Type}' attribute. + * + * + * @param value the new value of the 'Column Type' attribute. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType + * @see #getColumnType() + * @generated + */ + void setColumnType(GuiTableColumnType value); + +} // GuiTableColumn diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableColumnType.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableColumnType.java new file mode 100644 index 0000000..a19d9bb --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableColumnType.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.gwt.siriusportal.model; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Gui Table Column Type', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableColumnType() + * @model + * @generated + */ +public enum GuiTableColumnType implements Enumerator { + /** + * The 'STRING' literal object. + * + * + * @see #STRING_VALUE + * @generated + * @ordered + */ + STRING(0, "STRING", "STRING"), + + /** + * The 'DOUBLE' literal object. + * + * + * @see #DOUBLE_VALUE + * @generated + * @ordered + */ + DOUBLE(0, "DOUBLE", "DOUBLE"), + + /** + * The 'DATE' literal object. + * + * + * @see #DATE_VALUE + * @generated + * @ordered + */ + DATE(0, "DATE", "DATE"), + + /** + * The 'REF LIST' literal object. + * + * + * @see #REF_LIST_VALUE + * @generated + * @ordered + */ + REF_LIST(0, "REF_LIST", "REF_LIST"); + + /** + * The 'STRING' literal value. + * + *

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

+ * + * @see #STRING + * @model + * @generated + * @ordered + */ + public static final int STRING_VALUE = 0; + + /** + * The 'DOUBLE' literal value. + * + *

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

+ * + * @see #DOUBLE + * @model + * @generated + * @ordered + */ + public static final int DOUBLE_VALUE = 0; + + /** + * The 'DATE' literal value. + * + *

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

+ * + * @see #DATE + * @model + * @generated + * @ordered + */ + public static final int DATE_VALUE = 0; + + /** + * The 'REF LIST' literal value. + * + *

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

+ * + * @see #REF_LIST + * @model + * @generated + * @ordered + */ + public static final int REF_LIST_VALUE = 0; + + /** + * An array of all the 'Gui Table Column Type' enumerators. + * + * + * @generated + */ + private static final GuiTableColumnType[] VALUES_ARRAY = + new GuiTableColumnType[] { + STRING, + DOUBLE, + DATE, + REF_LIST, + }; + + /** + * A public read-only list of all the 'Gui Table Column Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Gui Table Column Type' literal with the specified literal value. + * + * + * @generated + */ + public static GuiTableColumnType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + GuiTableColumnType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Gui Table Column Type' literal with the specified name. + * + * + * @generated + */ + public static GuiTableColumnType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + GuiTableColumnType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Gui Table Column Type' literal with the specified integer value. + * + * + * @generated + */ + public static GuiTableColumnType get(int value) { + switch (value) { + case STRING_VALUE: return STRING; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private GuiTableColumnType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //GuiTableColumnType diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableRow.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableRow.java new file mode 100644 index 0000000..7a00276 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTableRow.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Table Row'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow#getCells Cells}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTableRow() + * @model + * @generated + */ +public interface GuiTableRow extends EObject { + /** + * Returns the value of the 'Cells' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getName Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisLabel XAxis Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisDateFormat XAxis Date Format}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getYAxisLabel YAxis Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getStart Start}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getEnd End}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#isIsRate Is Rate}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getData Data}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie() + * @model + * @generated + */ +public interface GuiTimeSerie extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'XAxis Label' attribute. + * + *

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

+ * + * @return the value of the 'XAxis Label' attribute. + * @see #setXAxisLabel(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_XAxisLabel() + * @model unique="false" + * @generated + */ + String getXAxisLabel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisLabel XAxis Label}' attribute. + * + * + * @param value the new value of the 'XAxis Label' attribute. + * @see #getXAxisLabel() + * @generated + */ + void setXAxisLabel(String value); + + /** + * Returns the value of the 'XAxis Date Format' attribute. + * The default value is "MM-dd HH:mm". + * + *

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

+ * + * @return the value of the 'XAxis Date Format' attribute. + * @see #setXAxisDateFormat(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_XAxisDateFormat() + * @model default="MM-dd HH:mm" unique="false" + * @generated + */ + String getXAxisDateFormat(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisDateFormat XAxis Date Format}' attribute. + * + * + * @param value the new value of the 'XAxis Date Format' attribute. + * @see #getXAxisDateFormat() + * @generated + */ + void setXAxisDateFormat(String value); + + /** + * Returns the value of the 'YAxis Label' attribute. + * + *

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

+ * + * @return the value of the 'YAxis Label' attribute. + * @see #setYAxisLabel(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_YAxisLabel() + * @model unique="false" + * @generated + */ + String getYAxisLabel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getYAxisLabel YAxis Label}' attribute. + * + * + * @param value the new value of the 'YAxis Label' attribute. + * @see #getYAxisLabel() + * @generated + */ + void setYAxisLabel(String value); + + /** + * Returns the value of the 'Start' attribute. + * + *

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

+ * + * @return the value of the 'Start' attribute. + * @see #setStart(Date) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_Start() + * @model unique="false" dataType="org.openecomp.ncomp.gwt.siriusportal.model.Date" + * @generated + */ + Date getStart(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getStart Start}' attribute. + * + * + * @param value the new value of the 'Start' attribute. + * @see #getStart() + * @generated + */ + void setStart(Date value); + + /** + * Returns the value of the 'End' attribute. + * + *

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

+ * + * @return the value of the 'End' attribute. + * @see #setEnd(Date) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_End() + * @model unique="false" dataType="org.openecomp.ncomp.gwt.siriusportal.model.Date" + * @generated + */ + Date getEnd(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getEnd End}' attribute. + * + * + * @param value the new value of the 'End' attribute. + * @see #getEnd() + * @generated + */ + void setEnd(Date value); + + /** + * Returns the value of the 'Is Rate' attribute. + * + *

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

+ * + * @return the value of the 'Is Rate' attribute. + * @see #setIsRate(boolean) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerie_IsRate() + * @model unique="false" + * @generated + */ + boolean isIsRate(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#isIsRate Is Rate}' attribute. + * + * + * @param value the new value of the 'Is Rate' attribute. + * @see #isIsRate() + * @generated + */ + void setIsRate(boolean value); + + /** + * Returns the value of the 'Data' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMax Max}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMin Min}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getNum Num}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData() + * @model + * @generated + */ +public interface GuiTimeSerieData extends EObject { + /** + * Returns the value of the 'Time' attribute. + * + *

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

+ * + * @return the value of the 'Time' attribute. + * @see #setTime(Date) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData_Time() + * @model unique="false" dataType="org.openecomp.ncomp.gwt.siriusportal.model.Date" + * @generated + */ + Date getTime(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getTime Time}' attribute. + * + * + * @param value the new value of the 'Time' attribute. + * @see #getTime() + * @generated + */ + void setTime(Date value); + + /** + * Returns the value of the 'Value' attribute. + * + *

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

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(double) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData_Value() + * @model unique="false" + * @generated + */ + double getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(double value); + + /** + * Returns the value of the 'Max' attribute. + * + *

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

+ * + * @return the value of the 'Max' attribute. + * @see #setMax(Double) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData_Max() + * @model unique="false" + * @generated + */ + Double getMax(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMax Max}' attribute. + * + * + * @param value the new value of the 'Max' attribute. + * @see #getMax() + * @generated + */ + void setMax(Double value); + + /** + * Returns the value of the 'Min' attribute. + * + *

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

+ * + * @return the value of the 'Min' attribute. + * @see #setMin(Double) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData_Min() + * @model unique="false" + * @generated + */ + Double getMin(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMin Min}' attribute. + * + * + * @param value the new value of the 'Min' attribute. + * @see #getMin() + * @generated + */ + void setMin(Double value); + + /** + * Returns the value of the 'Num' attribute. + * + *

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

+ * + * @return the value of the 'Num' attribute. + * @see #setNum(int) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTimeSerieData_Num() + * @model unique="false" + * @generated + */ + int getNum(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getNum Num}' attribute. + * + * + * @param value the new value of the 'Num' attribute. + * @see #getNum() + * @generated + */ + void setNum(int value); + +} // GuiTimeSerieData diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTree.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTree.java new file mode 100644 index 0000000..e9c39aa --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiTree.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.gwt.siriusportal.model; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Tree'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTree#getSections Sections}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTree() + * @model + * @generated + */ +public interface GuiTree extends EObject { + /** + * Returns the value of the 'Sections' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getNodeName Node Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getIcon Icon}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getView View}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getChildren Children}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode() + * @model + * @generated + */ +public interface GuiTreeNode extends EObject { + /** + * Returns the value of the 'Node Name' attribute. + * + *

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

+ * + * @return the value of the 'Node Name' attribute. + * @see #setNodeName(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_NodeName() + * @model unique="false" + * @generated + */ + String getNodeName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getNodeName Node Name}' attribute. + * + * + * @param value the new value of the 'Node Name' attribute. + * @see #getNodeName() + * @generated + */ + void setNodeName(String value); + + /** + * Returns the value of the 'Title' attribute. + * + *

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

+ * + * @return the value of the 'Title' attribute. + * @see #setTitle(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_Title() + * @model unique="false" + * @generated + */ + String getTitle(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTitle Title}' attribute. + * + * + * @param value the new value of the 'Title' attribute. + * @see #getTitle() + * @generated + */ + void setTitle(String value); + + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

+ * + * @return the value of the 'Tooltip' attribute. + * @see #setTooltip(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_Tooltip() + * @model unique="false" + * @generated + */ + String getTooltip(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTooltip Tooltip}' attribute. + * + * + * @param value the new value of the 'Tooltip' attribute. + * @see #getTooltip() + * @generated + */ + void setTooltip(String value); + + /** + * Returns the value of the 'Icon' attribute. + * + *

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

+ * + * @return the value of the 'Icon' attribute. + * @see #setIcon(String) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_Icon() + * @model unique="false" + * @generated + */ + String getIcon(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getIcon Icon}' attribute. + * + * + * @param value the new value of the 'Icon' attribute. + * @see #getIcon() + * @generated + */ + void setIcon(String value); + + /** + * Returns the value of the 'View' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiView}. + * + *

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

+ * + * @return the value of the 'View' attribute. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiView + * @see #setView(GuiView) + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_View() + * @model unique="false" + * @generated + */ + GuiView getView(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getView View}' attribute. + * + * + * @param value the new value of the 'View' attribute. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiView + * @see #getView() + * @generated + */ + void setView(GuiView value); + + /** + * Returns the value of the 'Children' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode}. + * + *

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

+ * + * @return the value of the 'Children' containment reference list. + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiTreeNode_Children() + * @model containment="true" + * @generated + */ + EList getChildren(); + +} // GuiTreeNode diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiView.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiView.java new file mode 100644 index 0000000..2bc0f15 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/GuiView.java @@ -0,0 +1,332 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Gui View', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage#getGuiView() + * @model + * @generated + */ +public enum GuiView implements Enumerator { + /** + * The 'NONE' literal object. + * + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(0, "NONE", "NONE"), + + /** + * The 'OBJECT' literal object. + * + * + * @see #OBJECT_VALUE + * @generated + * @ordered + */ + OBJECT(0, "OBJECT", "OBJECT"), + + /** + * The 'TIMESERIES' literal object. + * + * + * @see #TIMESERIES_VALUE + * @generated + * @ordered + */ + TIMESERIES(0, "TIMESERIES", "TIMESERIES"), + + /** + * The 'BIRTREPORT' literal object. + * + * + * @see #BIRTREPORT_VALUE + * @generated + * @ordered + */ + BIRTREPORT(0, "BIRTREPORT", "BIRTREPORT"), + + /** + * The 'HTML' literal object. + * + * + * @see #HTML_VALUE + * @generated + * @ordered + */ + HTML(0, "HTML", "HTML"), + + /** + * The 'TABLE' literal object. + * + * + * @see #TABLE_VALUE + * @generated + * @ordered + */ + TABLE(0, "TABLE", "TABLE"); + + /** + * The 'NONE' literal value. + * + *

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

+ * + * @see #NONE + * @model + * @generated + * @ordered + */ + public static final int NONE_VALUE = 0; + + /** + * The 'OBJECT' literal value. + * + *

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

+ * + * @see #OBJECT + * @model + * @generated + * @ordered + */ + public static final int OBJECT_VALUE = 0; + + /** + * The 'TIMESERIES' literal value. + * + *

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

+ * + * @see #TIMESERIES + * @model + * @generated + * @ordered + */ + public static final int TIMESERIES_VALUE = 0; + + /** + * The 'BIRTREPORT' literal value. + * + *

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

+ * + * @see #BIRTREPORT + * @model + * @generated + * @ordered + */ + public static final int BIRTREPORT_VALUE = 0; + + /** + * The 'HTML' literal value. + * + *

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

+ * + * @see #HTML + * @model + * @generated + * @ordered + */ + public static final int HTML_VALUE = 0; + + /** + * The 'TABLE' literal value. + * + *

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

+ * + * @see #TABLE + * @model + * @generated + * @ordered + */ + public static final int TABLE_VALUE = 0; + + /** + * An array of all the 'Gui View' enumerators. + * + * + * @generated + */ + private static final GuiView[] VALUES_ARRAY = + new GuiView[] { + NONE, + OBJECT, + TIMESERIES, + BIRTREPORT, + HTML, + TABLE, + }; + + /** + * A public read-only list of all the 'Gui View' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Gui View' literal with the specified literal value. + * + * + * @generated + */ + public static GuiView get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + GuiView result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Gui View' literal with the specified name. + * + * + * @generated + */ + public static GuiView getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + GuiView result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Gui View' literal with the specified integer value. + * + * + * @generated + */ + public static GuiView get(int value) { + switch (value) { + case NONE_VALUE: return NONE; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private GuiView(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //GuiView diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelFactory.java new file mode 100644 index 0000000..7dd1b62 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelFactory.java @@ -0,0 +1,288 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage + * @generated + */ +public interface ModelFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ModelFactory eINSTANCE = org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelFactoryImpl.init(); + + /** + * Returns a new object of class 'Gui Client Api'. + * + * + * @return a new object of class 'Gui Client Api'. + * @generated + */ + GuiClientApi createGuiClientApi(); + + /** + * Returns a new object of class 'Gui Tree'. + * + * + * @return a new object of class 'Gui Tree'. + * @generated + */ + GuiTree createGuiTree(); + + /** + * Returns a new object of class 'Gui Tree Node'. + * + * + * @return a new object of class 'Gui Tree Node'. + * @generated + */ + GuiTreeNode createGuiTreeNode(); + + /** + * Returns a new object of class 'Gui Object'. + * + * + * @return a new object of class 'Gui Object'. + * @generated + */ + GuiObject createGuiObject(); + + /** + * Returns a new object of class 'Gui Named Object'. + * + * + * @return a new object of class 'Gui Named Object'. + * @generated + */ + GuiNamedObject createGuiNamedObject(); + + /** + * Returns a new object of class 'Gui Object Value Integer'. + * + * + * @return a new object of class 'Gui Object Value Integer'. + * @generated + */ + GuiObjectValueInteger createGuiObjectValueInteger(); + + /** + * Returns a new object of class 'Gui Object Value String'. + * + * + * @return a new object of class 'Gui Object Value String'. + * @generated + */ + GuiObjectValueString createGuiObjectValueString(); + + /** + * Returns a new object of class 'Gui Object Value Reference'. + * + * + * @return a new object of class 'Gui Object Value Reference'. + * @generated + */ + GuiObjectValueReference createGuiObjectValueReference(); + + /** + * Returns a new object of class 'Gui Object Value Time Series'. + * + * + * @return a new object of class 'Gui Object Value Time Series'. + * @generated + */ + GuiObjectValueTimeSeries createGuiObjectValueTimeSeries(); + + /** + * Returns a new object of class 'Gui Object Value Object'. + * + * + * @return a new object of class 'Gui Object Value Object'. + * @generated + */ + GuiObjectValueObject createGuiObjectValueObject(); + + /** + * Returns a new object of class 'Gui Object Un Named List'. + * + * + * @return a new object of class 'Gui Object Un Named List'. + * @generated + */ + GuiObjectUnNamedList createGuiObjectUnNamedList(); + + /** + * Returns a new object of class 'Gui Object Named List'. + * + * + * @return a new object of class 'Gui Object Named List'. + * @generated + */ + GuiObjectNamedList createGuiObjectNamedList(); + + /** + * Returns a new object of class 'Gui Time Serie'. + * + * + * @return a new object of class 'Gui Time Serie'. + * @generated + */ + GuiTimeSerie createGuiTimeSerie(); + + /** + * Returns a new object of class 'Gui Time Serie Data'. + * + * + * @return a new object of class 'Gui Time Serie Data'. + * @generated + */ + GuiTimeSerieData createGuiTimeSerieData(); + + /** + * Returns a new object of class 'Gui Table'. + * + * + * @return a new object of class 'Gui Table'. + * @generated + */ + GuiTable createGuiTable(); + + /** + * Returns a new object of class 'Gui Table Column'. + * + * + * @return a new object of class 'Gui Table Column'. + * @generated + */ + GuiTableColumn createGuiTableColumn(); + + /** + * Returns a new object of class 'Gui Table Row'. + * + * + * @return a new object of class 'Gui Table Row'. + * @generated + */ + GuiTableRow createGuiTableRow(); + + /** + * Returns a new object of class 'Gui Table Cell String'. + * + * + * @return a new object of class 'Gui Table Cell String'. + * @generated + */ + GuiTableCellString createGuiTableCellString(); + + /** + * Returns a new object of class 'Gui Table Cell Double'. + * + * + * @return a new object of class 'Gui Table Cell Double'. + * @generated + */ + GuiTableCellDouble createGuiTableCellDouble(); + + /** + * Returns a new object of class 'Gui Table Cell Date'. + * + * + * @return a new object of class 'Gui Table Cell Date'. + * @generated + */ + GuiTableCellDate createGuiTableCellDate(); + + /** + * Returns a new object of class 'Gui Table Cell References'. + * + * + * @return a new object of class 'Gui Table Cell References'. + * @generated + */ + GuiTableCellReferences createGuiTableCellReferences(); + + /** + * Returns a new object of class 'Gui Table Cell Reference'. + * + * + * @return a new object of class 'Gui Table Cell Reference'. + * @generated + */ + GuiTableCellReference createGuiTableCellReference(); + + /** + * Returns a new object of class 'Gui Diagram'. + * + * + * @return a new object of class 'Gui Diagram'. + * @generated + */ + GuiDiagram createGuiDiagram(); + + /** + * Returns a new object of class 'Gui Diagram Item'. + * + * + * @return a new object of class 'Gui Diagram Item'. + * @generated + */ + GuiDiagramItem createGuiDiagramItem(); + + /** + * Returns a new object of class 'Gui Diagram Rectangle'. + * + * + * @return a new object of class 'Gui Diagram Rectangle'. + * @generated + */ + GuiDiagramRectangle createGuiDiagramRectangle(); + + /** + * Returns a new object of class 'Gui Html'. + * + * + * @return a new object of class 'Gui Html'. + * @generated + */ + GuiHtml createGuiHtml(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ModelPackage getModelPackage(); + +} //ModelFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelPackage.java new file mode 100644 index 0000000..b03f245 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/ModelPackage.java @@ -0,0 +1,3446 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model; + +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.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.gwt.siriusportal'" + * annotation="http://www.eclipse.org/emf/2011/Xcore GenModel='http://www.eclipse.org/emf/2002/GenModel'" + * @generated + */ +public interface ModelPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "model"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.gwt.siriusportal.model"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "model"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ModelPackage eINSTANCE = org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl Gui Client Api}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiClientApi() + * @generated + */ + int GUI_CLIENT_API = 0; + + /** + * The number of structural features of the 'Gui Client Api' class. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API_FEATURE_COUNT = 0; + + /** + * The operation id for the 'Get Tree' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_TREE = 0; + + /** + * The operation id for the 'Get Object' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_OBJECT__STRING = 1; + + /** + * The operation id for the 'Get Time Serie' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_TIME_SERIE__STRING_STRING_STRING_STRING = 2; + + /** + * The operation id for the 'Get Table' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_TABLE__STRING_STRING_STRING = 3; + + /** + * The operation id for the 'Get Html' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_HTML__STRING_STRING_STRING = 4; + + /** + * The operation id for the 'Get Graph' operation. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API___GET_GRAPH__STRING_STRING_STRING = 5; + + /** + * The number of operations of the 'Gui Client Api' class. + * + * + * @generated + * @ordered + */ + int GUI_CLIENT_API_OPERATION_COUNT = 6; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeImpl Gui Tree}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTree() + * @generated + */ + int GUI_TREE = 1; + + /** + * The feature id for the 'Sections' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TREE__SECTIONS = 0; + + /** + * The number of structural features of the 'Gui Tree' class. + * + * + * @generated + * @ordered + */ + int GUI_TREE_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Tree' class. + * + * + * @generated + * @ordered + */ + int GUI_TREE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl Gui Tree Node}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTreeNode() + * @generated + */ + int GUI_TREE_NODE = 2; + + /** + * The feature id for the 'Node Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__NODE_NAME = 0; + + /** + * The feature id for the 'Title' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__TITLE = 1; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__TOOLTIP = 2; + + /** + * The feature id for the 'Icon' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__ICON = 3; + + /** + * The feature id for the 'View' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__VIEW = 4; + + /** + * The feature id for the 'Children' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE__CHILDREN = 5; + + /** + * The number of structural features of the 'Gui Tree Node' class. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Gui Tree Node' class. + * + * + * @generated + * @ordered + */ + int GUI_TREE_NODE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectImpl Gui Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObject() + * @generated + */ + int GUI_OBJECT = 3; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT__VALUES = 0; + + /** + * The number of structural features of the 'Gui Object' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Object' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiNamedObjectImpl Gui Named Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiNamedObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiNamedObject() + * @generated + */ + int GUI_NAMED_OBJECT = 4; + + /** + * The feature id for the 'Values' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_NAMED_OBJECT__VALUES = GUI_OBJECT__VALUES; + + /** + * The feature id for the 'Object Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_NAMED_OBJECT__OBJECT_NAME = GUI_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Named Object' class. + * + * + * @generated + * @ordered + */ + int GUI_NAMED_OBJECT_FEATURE_COUNT = GUI_OBJECT_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Named Object' class. + * + * + * @generated + * @ordered + */ + int GUI_NAMED_OBJECT_OPERATION_COUNT = GUI_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl Gui Object Value}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValue() + * @generated + */ + int GUI_OBJECT_VALUE = 5; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE__VALUE_NAME = 0; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE__TOOLTIP = 1; + + /** + * The number of structural features of the 'Gui Object Value' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Gui Object Value' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueIntegerImpl Gui Object Value Integer}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueIntegerImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueInteger() + * @generated + */ + int GUI_OBJECT_VALUE_INTEGER = 6; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_INTEGER__VALUE_NAME = GUI_OBJECT_VALUE__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_INTEGER__TOOLTIP = GUI_OBJECT_VALUE__TOOLTIP; + + /** + * The feature id for the 'I' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_INTEGER__I = GUI_OBJECT_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Value Integer' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_INTEGER_FEATURE_COUNT = GUI_OBJECT_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Value Integer' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_INTEGER_OPERATION_COUNT = GUI_OBJECT_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueStringImpl Gui Object Value String}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueStringImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueString() + * @generated + */ + int GUI_OBJECT_VALUE_STRING = 7; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_STRING__VALUE_NAME = GUI_OBJECT_VALUE__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_STRING__TOOLTIP = GUI_OBJECT_VALUE__TOOLTIP; + + /** + * The feature id for the 'V' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_STRING__V = GUI_OBJECT_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Value String' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_STRING_FEATURE_COUNT = GUI_OBJECT_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Value String' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_STRING_OPERATION_COUNT = GUI_OBJECT_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueReferenceImpl Gui Object Value Reference}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueReferenceImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueReference() + * @generated + */ + int GUI_OBJECT_VALUE_REFERENCE = 8; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE__VALUE_NAME = GUI_OBJECT_VALUE_STRING__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE__TOOLTIP = GUI_OBJECT_VALUE_STRING__TOOLTIP; + + /** + * The feature id for the 'V' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE__V = GUI_OBJECT_VALUE_STRING__V; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE__PATH = GUI_OBJECT_VALUE_STRING_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Value Reference' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE_FEATURE_COUNT = GUI_OBJECT_VALUE_STRING_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Value Reference' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_REFERENCE_OPERATION_COUNT = GUI_OBJECT_VALUE_STRING_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueTimeSeriesImpl Gui Object Value Time Series}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueTimeSeriesImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueTimeSeries() + * @generated + */ + int GUI_OBJECT_VALUE_TIME_SERIES = 9; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES__VALUE_NAME = GUI_OBJECT_VALUE_STRING__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES__TOOLTIP = GUI_OBJECT_VALUE_STRING__TOOLTIP; + + /** + * The feature id for the 'V' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES__V = GUI_OBJECT_VALUE_STRING__V; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES__PATH = GUI_OBJECT_VALUE_STRING_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Value Time Series' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES_FEATURE_COUNT = GUI_OBJECT_VALUE_STRING_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Value Time Series' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_TIME_SERIES_OPERATION_COUNT = GUI_OBJECT_VALUE_STRING_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueObjectImpl Gui Object Value Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueObject() + * @generated + */ + int GUI_OBJECT_VALUE_OBJECT = 10; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OBJECT__VALUE_NAME = GUI_OBJECT_VALUE__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OBJECT__TOOLTIP = GUI_OBJECT_VALUE__TOOLTIP; + + /** + * The feature id for the 'V' containment reference. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OBJECT__V = GUI_OBJECT_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Value Object' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OBJECT_FEATURE_COUNT = GUI_OBJECT_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Value Object' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_VALUE_OBJECT_OPERATION_COUNT = GUI_OBJECT_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectUnNamedListImpl Gui Object Un Named List}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectUnNamedListImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectUnNamedList() + * @generated + */ + int GUI_OBJECT_UN_NAMED_LIST = 11; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_UN_NAMED_LIST__VALUE_NAME = GUI_OBJECT_VALUE__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_UN_NAMED_LIST__TOOLTIP = GUI_OBJECT_VALUE__TOOLTIP; + + /** + * The feature id for the 'Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_UN_NAMED_LIST__OBJECTS = GUI_OBJECT_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Un Named List' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_UN_NAMED_LIST_FEATURE_COUNT = GUI_OBJECT_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Un Named List' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_UN_NAMED_LIST_OPERATION_COUNT = GUI_OBJECT_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectNamedListImpl Gui Object Named List}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectNamedListImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectNamedList() + * @generated + */ + int GUI_OBJECT_NAMED_LIST = 12; + + /** + * The feature id for the 'Value Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_NAMED_LIST__VALUE_NAME = GUI_OBJECT_VALUE__VALUE_NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_NAMED_LIST__TOOLTIP = GUI_OBJECT_VALUE__TOOLTIP; + + /** + * The feature id for the 'Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_NAMED_LIST__OBJECTS = GUI_OBJECT_VALUE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Object Named List' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_NAMED_LIST_FEATURE_COUNT = GUI_OBJECT_VALUE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Object Named List' class. + * + * + * @generated + * @ordered + */ + int GUI_OBJECT_NAMED_LIST_OPERATION_COUNT = GUI_OBJECT_VALUE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl Gui Time Serie}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTimeSerie() + * @generated + */ + int GUI_TIME_SERIE = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__NAME = 0; + + /** + * The feature id for the 'XAxis Label' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__XAXIS_LABEL = 1; + + /** + * The feature id for the 'XAxis Date Format' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__XAXIS_DATE_FORMAT = 2; + + /** + * The feature id for the 'YAxis Label' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__YAXIS_LABEL = 3; + + /** + * The feature id for the 'Start' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__START = 4; + + /** + * The feature id for the 'End' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__END = 5; + + /** + * The feature id for the 'Is Rate' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__IS_RATE = 6; + + /** + * The feature id for the 'Data' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE__DATA = 7; + + /** + * The number of structural features of the 'Gui Time Serie' class. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_FEATURE_COUNT = 8; + + /** + * The number of operations of the 'Gui Time Serie' class. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl Gui Time Serie Data}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTimeSerieData() + * @generated + */ + int GUI_TIME_SERIE_DATA = 14; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA__TIME = 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA__VALUE = 1; + + /** + * The feature id for the 'Max' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA__MAX = 2; + + /** + * The feature id for the 'Min' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA__MIN = 3; + + /** + * The feature id for the 'Num' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA__NUM = 4; + + /** + * The number of structural features of the 'Gui Time Serie Data' class. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA_FEATURE_COUNT = 5; + + /** + * The number of operations of the 'Gui Time Serie Data' class. + * + * + * @generated + * @ordered + */ + int GUI_TIME_SERIE_DATA_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl Gui Table}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTable() + * @generated + */ + int GUI_TABLE = 15; + + /** + * The feature id for the 'Columns' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TABLE__COLUMNS = 0; + + /** + * The feature id for the 'Rows' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TABLE__ROWS = 1; + + /** + * The number of structural features of the 'Gui Table' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Gui Table' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl Gui Table Column}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableColumn() + * @generated + */ + int GUI_TABLE_COLUMN = 16; + + /** + * The feature id for the 'Col Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__COL_NAME = 0; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__TOOLTIP = 1; + + /** + * The feature id for the 'Format' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__FORMAT = 2; + + /** + * The feature id for the 'Width' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__WIDTH = 3; + + /** + * The feature id for the 'Hidden' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__HIDDEN = 4; + + /** + * The feature id for the 'Column Type' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN__COLUMN_TYPE = 5; + + /** + * The number of structural features of the 'Gui Table Column' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Gui Table Column' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_COLUMN_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableRowImpl Gui Table Row}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableRowImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableRow() + * @generated + */ + int GUI_TABLE_ROW = 17; + + /** + * The feature id for the 'Cells' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_ROW__CELLS = 0; + + /** + * The number of structural features of the 'Gui Table Row' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_ROW_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Table Row' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_ROW_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellImpl Gui Table Cell}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCell() + * @generated + */ + int GUI_TABLE_CELL = 18; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL__TOOLTIP = 0; + + /** + * The number of structural features of the 'Gui Table Cell' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Table Cell' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellStringImpl Gui Table Cell String}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellStringImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellString() + * @generated + */ + int GUI_TABLE_CELL_STRING = 19; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_STRING__TOOLTIP = GUI_TABLE_CELL__TOOLTIP; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_STRING__VALUE = GUI_TABLE_CELL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Table Cell String' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_STRING_FEATURE_COUNT = GUI_TABLE_CELL_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Table Cell String' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_STRING_OPERATION_COUNT = GUI_TABLE_CELL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl Gui Table Cell Double}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellDouble() + * @generated + */ + int GUI_TABLE_CELL_DOUBLE = 20; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DOUBLE__TOOLTIP = GUI_TABLE_CELL__TOOLTIP; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DOUBLE__VALUE = GUI_TABLE_CELL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Timeseries Path' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH = GUI_TABLE_CELL_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Gui Table Cell Double' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DOUBLE_FEATURE_COUNT = GUI_TABLE_CELL_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Gui Table Cell Double' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DOUBLE_OPERATION_COUNT = GUI_TABLE_CELL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDateImpl Gui Table Cell Date}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDateImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellDate() + * @generated + */ + int GUI_TABLE_CELL_DATE = 21; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DATE__TOOLTIP = GUI_TABLE_CELL__TOOLTIP; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DATE__VALUE = GUI_TABLE_CELL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Table Cell Date' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DATE_FEATURE_COUNT = GUI_TABLE_CELL_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Table Cell Date' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_DATE_OPERATION_COUNT = GUI_TABLE_CELL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferencesImpl Gui Table Cell References}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferencesImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellReferences() + * @generated + */ + int GUI_TABLE_CELL_REFERENCES = 22; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCES__TOOLTIP = GUI_TABLE_CELL__TOOLTIP; + + /** + * The feature id for the 'Refs' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCES__REFS = GUI_TABLE_CELL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Gui Table Cell References' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCES_FEATURE_COUNT = GUI_TABLE_CELL_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Gui Table Cell References' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCES_OPERATION_COUNT = GUI_TABLE_CELL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl Gui Table Cell Reference}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellReference() + * @generated + */ + int GUI_TABLE_CELL_REFERENCE = 23; + + /** + * The feature id for the 'Label' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCE__LABEL = 0; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCE__PATH = 1; + + /** + * The number of structural features of the 'Gui Table Cell Reference' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Gui Table Cell Reference' class. + * + * + * @generated + * @ordered + */ + int GUI_TABLE_CELL_REFERENCE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramImpl Gui Diagram}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagram() + * @generated + */ + int GUI_DIAGRAM = 24; + + /** + * The feature id for the 'Items' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM__ITEMS = 0; + + /** + * The number of structural features of the 'Gui Diagram' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Diagram' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramItemImpl Gui Diagram Item}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramItemImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagramItem() + * @generated + */ + int GUI_DIAGRAM_ITEM = 25; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_ITEM__TOOLTIP = 0; + + /** + * The number of structural features of the 'Gui Diagram Item' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_ITEM_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Diagram Item' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_ITEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl Gui Diagram Rectangle}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagramRectangle() + * @generated + */ + int GUI_DIAGRAM_RECTANGLE = 26; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE__TOOLTIP = GUI_DIAGRAM_ITEM__TOOLTIP; + + /** + * The feature id for the 'X' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE__X = GUI_DIAGRAM_ITEM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Y' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE__Y = GUI_DIAGRAM_ITEM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'H' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE__H = GUI_DIAGRAM_ITEM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'W' attribute. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE__W = GUI_DIAGRAM_ITEM_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Gui Diagram Rectangle' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE_FEATURE_COUNT = GUI_DIAGRAM_ITEM_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Gui Diagram Rectangle' class. + * + * + * @generated + * @ordered + */ + int GUI_DIAGRAM_RECTANGLE_OPERATION_COUNT = GUI_DIAGRAM_ITEM_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiHtmlImpl Gui Html}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiHtmlImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiHtml() + * @generated + */ + int GUI_HTML = 27; + + /** + * The feature id for the 'Html' attribute. + * + * + * @generated + * @ordered + */ + int GUI_HTML__HTML = 0; + + /** + * The number of structural features of the 'Gui Html' class. + * + * + * @generated + * @ordered + */ + int GUI_HTML_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Gui Html' class. + * + * + * @generated + * @ordered + */ + int GUI_HTML_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiView Gui View}' enum. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiView + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiView() + * @generated + */ + int GUI_VIEW = 28; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType Gui Table Column Type}' enum. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableColumnType() + * @generated + */ + int GUI_TABLE_COLUMN_TYPE = 29; + + /** + * The meta object id for the 'Date' data type. + * + * + * @see java.util.Date + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getDate() + * @generated + */ + int DATE = 30; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi Gui Client Api}'. + * + * + * @return the meta object for class 'Gui Client Api'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi + * @generated + */ + EClass getGuiClientApi(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTree() Get Tree}' operation. + * + * + * @return the meta object for the 'Get Tree' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTree() + * @generated + */ + EOperation getGuiClientApi__GetTree(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getObject(java.lang.String) Get Object}' operation. + * + * + * @return the meta object for the 'Get Object' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getObject(java.lang.String) + * @generated + */ + EOperation getGuiClientApi__GetObject__String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTimeSerie(java.lang.String, java.lang.String, java.lang.String, java.lang.String) Get Time Serie}' operation. + * + * + * @return the meta object for the 'Get Time Serie' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTimeSerie(java.lang.String, java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getGuiClientApi__GetTimeSerie__String_String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTable(java.lang.String, java.lang.String, java.lang.String) Get Table}' operation. + * + * + * @return the meta object for the 'Get Table' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getTable(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getGuiClientApi__GetTable__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getHtml(java.lang.String, java.lang.String, java.lang.String) Get Html}' operation. + * + * + * @return the meta object for the 'Get Html' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getHtml(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getGuiClientApi__GetHtml__String_String_String(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getGraph(java.lang.String, java.lang.String, java.lang.String) Get Graph}' operation. + * + * + * @return the meta object for the 'Get Graph' operation. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi#getGraph(java.lang.String, java.lang.String, java.lang.String) + * @generated + */ + EOperation getGuiClientApi__GetGraph__String_String_String(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTree Gui Tree}'. + * + * + * @return the meta object for class 'Gui Tree'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTree + * @generated + */ + EClass getGuiTree(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTree#getSections Sections}'. + * + * + * @return the meta object for the containment reference list 'Sections'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTree#getSections() + * @see #getGuiTree() + * @generated + */ + EReference getGuiTree_Sections(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode Gui Tree Node}'. + * + * + * @return the meta object for class 'Gui Tree Node'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode + * @generated + */ + EClass getGuiTreeNode(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getNodeName Node Name}'. + * + * + * @return the meta object for the attribute 'Node Name'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getNodeName() + * @see #getGuiTreeNode() + * @generated + */ + EAttribute getGuiTreeNode_NodeName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTitle Title}'. + * + * + * @return the meta object for the attribute 'Title'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTitle() + * @see #getGuiTreeNode() + * @generated + */ + EAttribute getGuiTreeNode_Title(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getTooltip() + * @see #getGuiTreeNode() + * @generated + */ + EAttribute getGuiTreeNode_Tooltip(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getIcon Icon}'. + * + * + * @return the meta object for the attribute 'Icon'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getIcon() + * @see #getGuiTreeNode() + * @generated + */ + EAttribute getGuiTreeNode_Icon(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getView View}'. + * + * + * @return the meta object for the attribute 'View'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getView() + * @see #getGuiTreeNode() + * @generated + */ + EAttribute getGuiTreeNode_View(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getChildren Children}'. + * + * + * @return the meta object for the containment reference list 'Children'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode#getChildren() + * @see #getGuiTreeNode() + * @generated + */ + EReference getGuiTreeNode_Children(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObject Gui Object}'. + * + * + * @return the meta object for class 'Gui Object'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObject + * @generated + */ + EClass getGuiObject(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObject#getValues Values}'. + * + * + * @return the meta object for the containment reference list 'Values'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObject#getValues() + * @see #getGuiObject() + * @generated + */ + EReference getGuiObject_Values(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject Gui Named Object}'. + * + * + * @return the meta object for class 'Gui Named Object'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject + * @generated + */ + EClass getGuiNamedObject(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject#getObjectName Object Name}'. + * + * + * @return the meta object for the attribute 'Object Name'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject#getObjectName() + * @see #getGuiNamedObject() + * @generated + */ + EAttribute getGuiNamedObject_ObjectName(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue Gui Object Value}'. + * + * + * @return the meta object for class 'Gui Object Value'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue + * @generated + */ + EClass getGuiObjectValue(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getValueName Value Name}'. + * + * + * @return the meta object for the attribute 'Value Name'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getValueName() + * @see #getGuiObjectValue() + * @generated + */ + EAttribute getGuiObjectValue_ValueName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue#getTooltip() + * @see #getGuiObjectValue() + * @generated + */ + EAttribute getGuiObjectValue_Tooltip(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger Gui Object Value Integer}'. + * + * + * @return the meta object for class 'Gui Object Value Integer'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger + * @generated + */ + EClass getGuiObjectValueInteger(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger#getI I}'. + * + * + * @return the meta object for the attribute 'I'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger#getI() + * @see #getGuiObjectValueInteger() + * @generated + */ + EAttribute getGuiObjectValueInteger_I(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString Gui Object Value String}'. + * + * + * @return the meta object for class 'Gui Object Value String'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString + * @generated + */ + EClass getGuiObjectValueString(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString#getV V}'. + * + * + * @return the meta object for the attribute 'V'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString#getV() + * @see #getGuiObjectValueString() + * @generated + */ + EAttribute getGuiObjectValueString_V(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference Gui Object Value Reference}'. + * + * + * @return the meta object for class 'Gui Object Value Reference'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference + * @generated + */ + EClass getGuiObjectValueReference(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference#getPath() + * @see #getGuiObjectValueReference() + * @generated + */ + EAttribute getGuiObjectValueReference_Path(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries Gui Object Value Time Series}'. + * + * + * @return the meta object for class 'Gui Object Value Time Series'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries + * @generated + */ + EClass getGuiObjectValueTimeSeries(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries#getPath() + * @see #getGuiObjectValueTimeSeries() + * @generated + */ + EAttribute getGuiObjectValueTimeSeries_Path(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject Gui Object Value Object}'. + * + * + * @return the meta object for class 'Gui Object Value Object'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject + * @generated + */ + EClass getGuiObjectValueObject(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject#getV V}'. + * + * + * @return the meta object for the containment reference 'V'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject#getV() + * @see #getGuiObjectValueObject() + * @generated + */ + EReference getGuiObjectValueObject_V(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList Gui Object Un Named List}'. + * + * + * @return the meta object for class 'Gui Object Un Named List'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList + * @generated + */ + EClass getGuiObjectUnNamedList(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList#getObjects Objects}'. + * + * + * @return the meta object for the containment reference list 'Objects'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList#getObjects() + * @see #getGuiObjectUnNamedList() + * @generated + */ + EReference getGuiObjectUnNamedList_Objects(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList Gui Object Named List}'. + * + * + * @return the meta object for class 'Gui Object Named List'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList + * @generated + */ + EClass getGuiObjectNamedList(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList#getObjects Objects}'. + * + * + * @return the meta object for the containment reference list 'Objects'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList#getObjects() + * @see #getGuiObjectNamedList() + * @generated + */ + EReference getGuiObjectNamedList_Objects(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie Gui Time Serie}'. + * + * + * @return the meta object for class 'Gui Time Serie'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie + * @generated + */ + EClass getGuiTimeSerie(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getName() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisLabel XAxis Label}'. + * + * + * @return the meta object for the attribute 'XAxis Label'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisLabel() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_XAxisLabel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisDateFormat XAxis Date Format}'. + * + * + * @return the meta object for the attribute 'XAxis Date Format'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getXAxisDateFormat() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_XAxisDateFormat(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getYAxisLabel YAxis Label}'. + * + * + * @return the meta object for the attribute 'YAxis Label'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getYAxisLabel() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_YAxisLabel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getStart Start}'. + * + * + * @return the meta object for the attribute 'Start'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getStart() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_Start(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getEnd End}'. + * + * + * @return the meta object for the attribute 'End'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getEnd() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_End(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#isIsRate Is Rate}'. + * + * + * @return the meta object for the attribute 'Is Rate'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#isIsRate() + * @see #getGuiTimeSerie() + * @generated + */ + EAttribute getGuiTimeSerie_IsRate(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getData Data}'. + * + * + * @return the meta object for the containment reference list 'Data'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie#getData() + * @see #getGuiTimeSerie() + * @generated + */ + EReference getGuiTimeSerie_Data(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData Gui Time Serie Data}'. + * + * + * @return the meta object for class 'Gui Time Serie Data'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData + * @generated + */ + EClass getGuiTimeSerieData(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getTime Time}'. + * + * + * @return the meta object for the attribute 'Time'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getTime() + * @see #getGuiTimeSerieData() + * @generated + */ + EAttribute getGuiTimeSerieData_Time(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getValue() + * @see #getGuiTimeSerieData() + * @generated + */ + EAttribute getGuiTimeSerieData_Value(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMax Max}'. + * + * + * @return the meta object for the attribute 'Max'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMax() + * @see #getGuiTimeSerieData() + * @generated + */ + EAttribute getGuiTimeSerieData_Max(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMin Min}'. + * + * + * @return the meta object for the attribute 'Min'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getMin() + * @see #getGuiTimeSerieData() + * @generated + */ + EAttribute getGuiTimeSerieData_Min(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getNum Num}'. + * + * + * @return the meta object for the attribute 'Num'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData#getNum() + * @see #getGuiTimeSerieData() + * @generated + */ + EAttribute getGuiTimeSerieData_Num(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable Gui Table}'. + * + * + * @return the meta object for class 'Gui Table'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTable + * @generated + */ + EClass getGuiTable(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getColumns Columns}'. + * + * + * @return the meta object for the containment reference list 'Columns'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getColumns() + * @see #getGuiTable() + * @generated + */ + EReference getGuiTable_Columns(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getRows Rows}'. + * + * + * @return the meta object for the containment reference list 'Rows'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTable#getRows() + * @see #getGuiTable() + * @generated + */ + EReference getGuiTable_Rows(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn Gui Table Column}'. + * + * + * @return the meta object for class 'Gui Table Column'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn + * @generated + */ + EClass getGuiTableColumn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColName Col Name}'. + * + * + * @return the meta object for the attribute 'Col Name'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColName() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_ColName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getTooltip() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_Tooltip(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getFormat Format}'. + * + * + * @return the meta object for the attribute 'Format'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getFormat() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_Format(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getWidth Width}'. + * + * + * @return the meta object for the attribute 'Width'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getWidth() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_Width(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#isHidden Hidden}'. + * + * + * @return the meta object for the attribute 'Hidden'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#isHidden() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_Hidden(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColumnType Column Type}'. + * + * + * @return the meta object for the attribute 'Column Type'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn#getColumnType() + * @see #getGuiTableColumn() + * @generated + */ + EAttribute getGuiTableColumn_ColumnType(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow Gui Table Row}'. + * + * + * @return the meta object for class 'Gui Table Row'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow + * @generated + */ + EClass getGuiTableRow(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow#getCells Cells}'. + * + * + * @return the meta object for the containment reference list 'Cells'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow#getCells() + * @see #getGuiTableRow() + * @generated + */ + EReference getGuiTableRow_Cells(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell Gui Table Cell}'. + * + * + * @return the meta object for class 'Gui Table Cell'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell + * @generated + */ + EClass getGuiTableCell(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell#getTooltip() + * @see #getGuiTableCell() + * @generated + */ + EAttribute getGuiTableCell_Tooltip(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString Gui Table Cell String}'. + * + * + * @return the meta object for class 'Gui Table Cell String'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString + * @generated + */ + EClass getGuiTableCellString(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString#getValue() + * @see #getGuiTableCellString() + * @generated + */ + EAttribute getGuiTableCellString_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble Gui Table Cell Double}'. + * + * + * @return the meta object for class 'Gui Table Cell Double'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble + * @generated + */ + EClass getGuiTableCellDouble(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getValue() + * @see #getGuiTableCellDouble() + * @generated + */ + EAttribute getGuiTableCellDouble_Value(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getTimeseriesPath Timeseries Path}'. + * + * + * @return the meta object for the attribute 'Timeseries Path'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble#getTimeseriesPath() + * @see #getGuiTableCellDouble() + * @generated + */ + EAttribute getGuiTableCellDouble_TimeseriesPath(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate Gui Table Cell Date}'. + * + * + * @return the meta object for class 'Gui Table Cell Date'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate + * @generated + */ + EClass getGuiTableCellDate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate#getValue() + * @see #getGuiTableCellDate() + * @generated + */ + EAttribute getGuiTableCellDate_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences Gui Table Cell References}'. + * + * + * @return the meta object for class 'Gui Table Cell References'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences + * @generated + */ + EClass getGuiTableCellReferences(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences#getRefs Refs}'. + * + * + * @return the meta object for the containment reference list 'Refs'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences#getRefs() + * @see #getGuiTableCellReferences() + * @generated + */ + EReference getGuiTableCellReferences_Refs(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference Gui Table Cell Reference}'. + * + * + * @return the meta object for class 'Gui Table Cell Reference'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference + * @generated + */ + EClass getGuiTableCellReference(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getLabel Label}'. + * + * + * @return the meta object for the attribute 'Label'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getLabel() + * @see #getGuiTableCellReference() + * @generated + */ + EAttribute getGuiTableCellReference_Label(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference#getPath() + * @see #getGuiTableCellReference() + * @generated + */ + EAttribute getGuiTableCellReference_Path(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram Gui Diagram}'. + * + * + * @return the meta object for class 'Gui Diagram'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram + * @generated + */ + EClass getGuiDiagram(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram#getItems Items}'. + * + * + * @return the meta object for the containment reference list 'Items'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram#getItems() + * @see #getGuiDiagram() + * @generated + */ + EReference getGuiDiagram_Items(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem Gui Diagram Item}'. + * + * + * @return the meta object for class 'Gui Diagram Item'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem + * @generated + */ + EClass getGuiDiagramItem(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem#getTooltip() + * @see #getGuiDiagramItem() + * @generated + */ + EAttribute getGuiDiagramItem_Tooltip(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle Gui Diagram Rectangle}'. + * + * + * @return the meta object for class 'Gui Diagram Rectangle'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle + * @generated + */ + EClass getGuiDiagramRectangle(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getX X}'. + * + * + * @return the meta object for the attribute 'X'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getX() + * @see #getGuiDiagramRectangle() + * @generated + */ + EAttribute getGuiDiagramRectangle_X(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getY Y}'. + * + * + * @return the meta object for the attribute 'Y'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getY() + * @see #getGuiDiagramRectangle() + * @generated + */ + EAttribute getGuiDiagramRectangle_Y(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getH H}'. + * + * + * @return the meta object for the attribute 'H'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getH() + * @see #getGuiDiagramRectangle() + * @generated + */ + EAttribute getGuiDiagramRectangle_H(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getW W}'. + * + * + * @return the meta object for the attribute 'W'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle#getW() + * @see #getGuiDiagramRectangle() + * @generated + */ + EAttribute getGuiDiagramRectangle_W(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml Gui Html}'. + * + * + * @return the meta object for class 'Gui Html'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml + * @generated + */ + EClass getGuiHtml(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml#getHtml Html}'. + * + * + * @return the meta object for the attribute 'Html'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml#getHtml() + * @see #getGuiHtml() + * @generated + */ + EAttribute getGuiHtml_Html(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiView Gui View}'. + * + * + * @return the meta object for enum 'Gui View'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiView + * @generated + */ + EEnum getGuiView(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType Gui Table Column Type}'. + * + * + * @return the meta object for enum 'Gui Table Column Type'. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType + * @generated + */ + EEnum getGuiTableColumnType(); + + /** + * Returns the meta object for data type '{@link java.util.Date Date}'. + * + * + * @return the meta object for data type 'Date'. + * @see java.util.Date + * @model instanceClass="java.util.Date" + * @generated + */ + EDataType getDate(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ModelFactory getModelFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl Gui Client Api}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiClientApiImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiClientApi() + * @generated + */ + EClass GUI_CLIENT_API = eINSTANCE.getGuiClientApi(); + + /** + * The meta object literal for the 'Get Tree' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_TREE = eINSTANCE.getGuiClientApi__GetTree(); + + /** + * The meta object literal for the 'Get Object' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_OBJECT__STRING = eINSTANCE.getGuiClientApi__GetObject__String(); + + /** + * The meta object literal for the 'Get Time Serie' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_TIME_SERIE__STRING_STRING_STRING_STRING = eINSTANCE.getGuiClientApi__GetTimeSerie__String_String_String_String(); + + /** + * The meta object literal for the 'Get Table' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_TABLE__STRING_STRING_STRING = eINSTANCE.getGuiClientApi__GetTable__String_String_String(); + + /** + * The meta object literal for the 'Get Html' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_HTML__STRING_STRING_STRING = eINSTANCE.getGuiClientApi__GetHtml__String_String_String(); + + /** + * The meta object literal for the 'Get Graph' operation. + * + * + * @generated + */ + EOperation GUI_CLIENT_API___GET_GRAPH__STRING_STRING_STRING = eINSTANCE.getGuiClientApi__GetGraph__String_String_String(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeImpl Gui Tree}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTree() + * @generated + */ + EClass GUI_TREE = eINSTANCE.getGuiTree(); + + /** + * The meta object literal for the 'Sections' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TREE__SECTIONS = eINSTANCE.getGuiTree_Sections(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl Gui Tree Node}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTreeNode() + * @generated + */ + EClass GUI_TREE_NODE = eINSTANCE.getGuiTreeNode(); + + /** + * The meta object literal for the 'Node Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TREE_NODE__NODE_NAME = eINSTANCE.getGuiTreeNode_NodeName(); + + /** + * The meta object literal for the 'Title' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TREE_NODE__TITLE = eINSTANCE.getGuiTreeNode_Title(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TREE_NODE__TOOLTIP = eINSTANCE.getGuiTreeNode_Tooltip(); + + /** + * The meta object literal for the 'Icon' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TREE_NODE__ICON = eINSTANCE.getGuiTreeNode_Icon(); + + /** + * The meta object literal for the 'View' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TREE_NODE__VIEW = eINSTANCE.getGuiTreeNode_View(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TREE_NODE__CHILDREN = eINSTANCE.getGuiTreeNode_Children(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectImpl Gui Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObject() + * @generated + */ + EClass GUI_OBJECT = eINSTANCE.getGuiObject(); + + /** + * The meta object literal for the 'Values' containment reference list feature. + * + * + * @generated + */ + EReference GUI_OBJECT__VALUES = eINSTANCE.getGuiObject_Values(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiNamedObjectImpl Gui Named Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiNamedObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiNamedObject() + * @generated + */ + EClass GUI_NAMED_OBJECT = eINSTANCE.getGuiNamedObject(); + + /** + * The meta object literal for the 'Object Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_NAMED_OBJECT__OBJECT_NAME = eINSTANCE.getGuiNamedObject_ObjectName(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl Gui Object Value}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValue() + * @generated + */ + EClass GUI_OBJECT_VALUE = eINSTANCE.getGuiObjectValue(); + + /** + * The meta object literal for the 'Value Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE__VALUE_NAME = eINSTANCE.getGuiObjectValue_ValueName(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE__TOOLTIP = eINSTANCE.getGuiObjectValue_Tooltip(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueIntegerImpl Gui Object Value Integer}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueIntegerImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueInteger() + * @generated + */ + EClass GUI_OBJECT_VALUE_INTEGER = eINSTANCE.getGuiObjectValueInteger(); + + /** + * The meta object literal for the 'I' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE_INTEGER__I = eINSTANCE.getGuiObjectValueInteger_I(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueStringImpl Gui Object Value String}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueStringImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueString() + * @generated + */ + EClass GUI_OBJECT_VALUE_STRING = eINSTANCE.getGuiObjectValueString(); + + /** + * The meta object literal for the 'V' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE_STRING__V = eINSTANCE.getGuiObjectValueString_V(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueReferenceImpl Gui Object Value Reference}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueReferenceImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueReference() + * @generated + */ + EClass GUI_OBJECT_VALUE_REFERENCE = eINSTANCE.getGuiObjectValueReference(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE_REFERENCE__PATH = eINSTANCE.getGuiObjectValueReference_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueTimeSeriesImpl Gui Object Value Time Series}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueTimeSeriesImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueTimeSeries() + * @generated + */ + EClass GUI_OBJECT_VALUE_TIME_SERIES = eINSTANCE.getGuiObjectValueTimeSeries(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute GUI_OBJECT_VALUE_TIME_SERIES__PATH = eINSTANCE.getGuiObjectValueTimeSeries_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueObjectImpl Gui Object Value Object}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueObjectImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectValueObject() + * @generated + */ + EClass GUI_OBJECT_VALUE_OBJECT = eINSTANCE.getGuiObjectValueObject(); + + /** + * The meta object literal for the 'V' containment reference feature. + * + * + * @generated + */ + EReference GUI_OBJECT_VALUE_OBJECT__V = eINSTANCE.getGuiObjectValueObject_V(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectUnNamedListImpl Gui Object Un Named List}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectUnNamedListImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectUnNamedList() + * @generated + */ + EClass GUI_OBJECT_UN_NAMED_LIST = eINSTANCE.getGuiObjectUnNamedList(); + + /** + * The meta object literal for the 'Objects' containment reference list feature. + * + * + * @generated + */ + EReference GUI_OBJECT_UN_NAMED_LIST__OBJECTS = eINSTANCE.getGuiObjectUnNamedList_Objects(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectNamedListImpl Gui Object Named List}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectNamedListImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiObjectNamedList() + * @generated + */ + EClass GUI_OBJECT_NAMED_LIST = eINSTANCE.getGuiObjectNamedList(); + + /** + * The meta object literal for the 'Objects' containment reference list feature. + * + * + * @generated + */ + EReference GUI_OBJECT_NAMED_LIST__OBJECTS = eINSTANCE.getGuiObjectNamedList_Objects(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl Gui Time Serie}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTimeSerie() + * @generated + */ + EClass GUI_TIME_SERIE = eINSTANCE.getGuiTimeSerie(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__NAME = eINSTANCE.getGuiTimeSerie_Name(); + + /** + * The meta object literal for the 'XAxis Label' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__XAXIS_LABEL = eINSTANCE.getGuiTimeSerie_XAxisLabel(); + + /** + * The meta object literal for the 'XAxis Date Format' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__XAXIS_DATE_FORMAT = eINSTANCE.getGuiTimeSerie_XAxisDateFormat(); + + /** + * The meta object literal for the 'YAxis Label' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__YAXIS_LABEL = eINSTANCE.getGuiTimeSerie_YAxisLabel(); + + /** + * The meta object literal for the 'Start' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__START = eINSTANCE.getGuiTimeSerie_Start(); + + /** + * The meta object literal for the 'End' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__END = eINSTANCE.getGuiTimeSerie_End(); + + /** + * The meta object literal for the 'Is Rate' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE__IS_RATE = eINSTANCE.getGuiTimeSerie_IsRate(); + + /** + * The meta object literal for the 'Data' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TIME_SERIE__DATA = eINSTANCE.getGuiTimeSerie_Data(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl Gui Time Serie Data}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTimeSerieData() + * @generated + */ + EClass GUI_TIME_SERIE_DATA = eINSTANCE.getGuiTimeSerieData(); + + /** + * The meta object literal for the 'Time' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE_DATA__TIME = eINSTANCE.getGuiTimeSerieData_Time(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE_DATA__VALUE = eINSTANCE.getGuiTimeSerieData_Value(); + + /** + * The meta object literal for the 'Max' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE_DATA__MAX = eINSTANCE.getGuiTimeSerieData_Max(); + + /** + * The meta object literal for the 'Min' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE_DATA__MIN = eINSTANCE.getGuiTimeSerieData_Min(); + + /** + * The meta object literal for the 'Num' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TIME_SERIE_DATA__NUM = eINSTANCE.getGuiTimeSerieData_Num(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl Gui Table}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTable() + * @generated + */ + EClass GUI_TABLE = eINSTANCE.getGuiTable(); + + /** + * The meta object literal for the 'Columns' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TABLE__COLUMNS = eINSTANCE.getGuiTable_Columns(); + + /** + * The meta object literal for the 'Rows' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TABLE__ROWS = eINSTANCE.getGuiTable_Rows(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl Gui Table Column}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableColumn() + * @generated + */ + EClass GUI_TABLE_COLUMN = eINSTANCE.getGuiTableColumn(); + + /** + * The meta object literal for the 'Col Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__COL_NAME = eINSTANCE.getGuiTableColumn_ColName(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__TOOLTIP = eINSTANCE.getGuiTableColumn_Tooltip(); + + /** + * The meta object literal for the 'Format' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__FORMAT = eINSTANCE.getGuiTableColumn_Format(); + + /** + * The meta object literal for the 'Width' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__WIDTH = eINSTANCE.getGuiTableColumn_Width(); + + /** + * The meta object literal for the 'Hidden' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__HIDDEN = eINSTANCE.getGuiTableColumn_Hidden(); + + /** + * The meta object literal for the 'Column Type' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_COLUMN__COLUMN_TYPE = eINSTANCE.getGuiTableColumn_ColumnType(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableRowImpl Gui Table Row}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableRowImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableRow() + * @generated + */ + EClass GUI_TABLE_ROW = eINSTANCE.getGuiTableRow(); + + /** + * The meta object literal for the 'Cells' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TABLE_ROW__CELLS = eINSTANCE.getGuiTableRow_Cells(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellImpl Gui Table Cell}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCell() + * @generated + */ + EClass GUI_TABLE_CELL = eINSTANCE.getGuiTableCell(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL__TOOLTIP = eINSTANCE.getGuiTableCell_Tooltip(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellStringImpl Gui Table Cell String}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellStringImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellString() + * @generated + */ + EClass GUI_TABLE_CELL_STRING = eINSTANCE.getGuiTableCellString(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_STRING__VALUE = eINSTANCE.getGuiTableCellString_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl Gui Table Cell Double}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellDouble() + * @generated + */ + EClass GUI_TABLE_CELL_DOUBLE = eINSTANCE.getGuiTableCellDouble(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_DOUBLE__VALUE = eINSTANCE.getGuiTableCellDouble_Value(); + + /** + * The meta object literal for the 'Timeseries Path' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH = eINSTANCE.getGuiTableCellDouble_TimeseriesPath(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDateImpl Gui Table Cell Date}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDateImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellDate() + * @generated + */ + EClass GUI_TABLE_CELL_DATE = eINSTANCE.getGuiTableCellDate(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_DATE__VALUE = eINSTANCE.getGuiTableCellDate_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferencesImpl Gui Table Cell References}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferencesImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellReferences() + * @generated + */ + EClass GUI_TABLE_CELL_REFERENCES = eINSTANCE.getGuiTableCellReferences(); + + /** + * The meta object literal for the 'Refs' containment reference list feature. + * + * + * @generated + */ + EReference GUI_TABLE_CELL_REFERENCES__REFS = eINSTANCE.getGuiTableCellReferences_Refs(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl Gui Table Cell Reference}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableCellReference() + * @generated + */ + EClass GUI_TABLE_CELL_REFERENCE = eINSTANCE.getGuiTableCellReference(); + + /** + * The meta object literal for the 'Label' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_REFERENCE__LABEL = eINSTANCE.getGuiTableCellReference_Label(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute GUI_TABLE_CELL_REFERENCE__PATH = eINSTANCE.getGuiTableCellReference_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramImpl Gui Diagram}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagram() + * @generated + */ + EClass GUI_DIAGRAM = eINSTANCE.getGuiDiagram(); + + /** + * The meta object literal for the 'Items' containment reference list feature. + * + * + * @generated + */ + EReference GUI_DIAGRAM__ITEMS = eINSTANCE.getGuiDiagram_Items(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramItemImpl Gui Diagram Item}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramItemImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagramItem() + * @generated + */ + EClass GUI_DIAGRAM_ITEM = eINSTANCE.getGuiDiagramItem(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_DIAGRAM_ITEM__TOOLTIP = eINSTANCE.getGuiDiagramItem_Tooltip(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl Gui Diagram Rectangle}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiDiagramRectangle() + * @generated + */ + EClass GUI_DIAGRAM_RECTANGLE = eINSTANCE.getGuiDiagramRectangle(); + + /** + * The meta object literal for the 'X' attribute feature. + * + * + * @generated + */ + EAttribute GUI_DIAGRAM_RECTANGLE__X = eINSTANCE.getGuiDiagramRectangle_X(); + + /** + * The meta object literal for the 'Y' attribute feature. + * + * + * @generated + */ + EAttribute GUI_DIAGRAM_RECTANGLE__Y = eINSTANCE.getGuiDiagramRectangle_Y(); + + /** + * The meta object literal for the 'H' attribute feature. + * + * + * @generated + */ + EAttribute GUI_DIAGRAM_RECTANGLE__H = eINSTANCE.getGuiDiagramRectangle_H(); + + /** + * The meta object literal for the 'W' attribute feature. + * + * + * @generated + */ + EAttribute GUI_DIAGRAM_RECTANGLE__W = eINSTANCE.getGuiDiagramRectangle_W(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiHtmlImpl Gui Html}' class. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiHtmlImpl + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiHtml() + * @generated + */ + EClass GUI_HTML = eINSTANCE.getGuiHtml(); + + /** + * The meta object literal for the 'Html' attribute feature. + * + * + * @generated + */ + EAttribute GUI_HTML__HTML = eINSTANCE.getGuiHtml_Html(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiView Gui View}' enum. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiView + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiView() + * @generated + */ + EEnum GUI_VIEW = eINSTANCE.getGuiView(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType Gui Table Column Type}' enum. + * + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getGuiTableColumnType() + * @generated + */ + EEnum GUI_TABLE_COLUMN_TYPE = eINSTANCE.getGuiTableColumnType(); + + /** + * The meta object literal for the 'Date' data type. + * + * + * @see java.util.Date + * @see org.openecomp.ncomp.gwt.siriusportal.model.impl.ModelPackageImpl#getDate() + * @generated + */ + EDataType DATE = eINSTANCE.getDate(); + + } + +} //ModelPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiClientApiImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiClientApiImpl.java new file mode 100644 index 0000000..d732717 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiClientApiImpl.java @@ -0,0 +1,163 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTable; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTree; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.openecomp.ncomp.sirius.manager.graph.GuiGraph; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Client Api'. + * + *

+ *

+ * + * @generated + */ +public class GuiClientApiImpl extends MinimalEObjectImpl.Container implements GuiClientApi { + /** + * + * + * @generated + */ + protected GuiClientApiImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_CLIENT_API; + } + + /** + * + * + * @generated + */ + public GuiTree getTree() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public GuiObject getObject(String path) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public GuiTimeSerie getTimeSerie(String path, String start, String end, String duration) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public GuiTable getTable(String path, String start, String end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public GuiHtml getHtml(String path, String start, String end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public GuiGraph getGraph(String path, String start, String end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ModelPackage.GUI_CLIENT_API___GET_TREE: + return getTree(); + case ModelPackage.GUI_CLIENT_API___GET_OBJECT__STRING: + return getObject((String)arguments.get(0)); + case ModelPackage.GUI_CLIENT_API___GET_TIME_SERIE__STRING_STRING_STRING_STRING: + return getTimeSerie((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (String)arguments.get(3)); + case ModelPackage.GUI_CLIENT_API___GET_TABLE__STRING_STRING_STRING: + return getTable((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ModelPackage.GUI_CLIENT_API___GET_HTML__STRING_STRING_STRING: + return getHtml((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + case ModelPackage.GUI_CLIENT_API___GET_GRAPH__STRING_STRING_STRING: + return getGraph((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2)); + } + return super.eInvoke(operationID, arguments); + } + +} //GuiClientApiImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramImpl.java new file mode 100644 index 0000000..288d68f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Diagram'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramImpl#getItems Items}
  • + *
+ *

+ * + * @generated + */ +public class GuiDiagramImpl extends MinimalEObjectImpl.Container implements GuiDiagram { + /** + * The cached value of the '{@link #getItems() Items}' containment reference list. + * + * + * @see #getItems() + * @generated + * @ordered + */ + protected EList items; + + /** + * + * + * @generated + */ + protected GuiDiagramImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_DIAGRAM; + } + + /** + * + * + * @generated + */ + public EList getItems() { + if (items == null) { + items = new EObjectContainmentEList(GuiDiagramItem.class, this, ModelPackage.GUI_DIAGRAM__ITEMS); + } + return items; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM__ITEMS: + return ((InternalEList)getItems()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM__ITEMS: + return getItems(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM__ITEMS: + getItems().clear(); + getItems().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM__ITEMS: + getItems().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM__ITEMS: + return items != null && !items.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiDiagramImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramItemImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramItemImpl.java new file mode 100644 index 0000000..9671459 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiDiagramItemImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Diagram Item'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramItemImpl#getTooltip Tooltip}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl#getX X}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl#getY Y}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl#getH H}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiDiagramRectangleImpl#getW W}
  • + *
+ *

+ * + * @generated + */ +public class GuiDiagramRectangleImpl extends GuiDiagramItemImpl implements GuiDiagramRectangle { + /** + * The default value of the '{@link #getX() X}' attribute. + * + * + * @see #getX() + * @generated + * @ordered + */ + protected static final int X_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getX() X}' attribute. + * + * + * @see #getX() + * @generated + * @ordered + */ + protected int x = X_EDEFAULT; + + /** + * The default value of the '{@link #getY() Y}' attribute. + * + * + * @see #getY() + * @generated + * @ordered + */ + protected static final int Y_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getY() Y}' attribute. + * + * + * @see #getY() + * @generated + * @ordered + */ + protected int y = Y_EDEFAULT; + + /** + * The default value of the '{@link #getH() H}' attribute. + * + * + * @see #getH() + * @generated + * @ordered + */ + protected static final int H_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getH() H}' attribute. + * + * + * @see #getH() + * @generated + * @ordered + */ + protected int h = H_EDEFAULT; + + /** + * The default value of the '{@link #getW() W}' attribute. + * + * + * @see #getW() + * @generated + * @ordered + */ + protected static final int W_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getW() W}' attribute. + * + * + * @see #getW() + * @generated + * @ordered + */ + protected int w = W_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiDiagramRectangleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_DIAGRAM_RECTANGLE; + } + + /** + * + * + * @generated + */ + public int getX() { + return x; + } + + /** + * + * + * @generated + */ + public void setX(int newX) { + int oldX = x; + x = newX; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_DIAGRAM_RECTANGLE__X, oldX, x)); + } + + /** + * + * + * @generated + */ + public int getY() { + return y; + } + + /** + * + * + * @generated + */ + public void setY(int newY) { + int oldY = y; + y = newY; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_DIAGRAM_RECTANGLE__Y, oldY, y)); + } + + /** + * + * + * @generated + */ + public int getH() { + return h; + } + + /** + * + * + * @generated + */ + public void setH(int newH) { + int oldH = h; + h = newH; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_DIAGRAM_RECTANGLE__H, oldH, h)); + } + + /** + * + * + * @generated + */ + public int getW() { + return w; + } + + /** + * + * + * @generated + */ + public void setW(int newW) { + int oldW = w; + w = newW; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_DIAGRAM_RECTANGLE__W, oldW, w)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM_RECTANGLE__X: + return getX(); + case ModelPackage.GUI_DIAGRAM_RECTANGLE__Y: + return getY(); + case ModelPackage.GUI_DIAGRAM_RECTANGLE__H: + return getH(); + case ModelPackage.GUI_DIAGRAM_RECTANGLE__W: + return getW(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM_RECTANGLE__X: + setX((Integer)newValue); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__Y: + setY((Integer)newValue); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__H: + setH((Integer)newValue); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__W: + setW((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM_RECTANGLE__X: + setX(X_EDEFAULT); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__Y: + setY(Y_EDEFAULT); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__H: + setH(H_EDEFAULT); + return; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__W: + setW(W_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_DIAGRAM_RECTANGLE__X: + return x != X_EDEFAULT; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__Y: + return y != Y_EDEFAULT; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__H: + return h != H_EDEFAULT; + case ModelPackage.GUI_DIAGRAM_RECTANGLE__W: + return w != W_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (x: "); + result.append(x); + result.append(", y: "); + result.append(y); + result.append(", h: "); + result.append(h); + result.append(", w: "); + result.append(w); + result.append(')'); + return result.toString(); + } + +} //GuiDiagramRectangleImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiHtmlImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiHtmlImpl.java new file mode 100644 index 0000000..10430c7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiHtmlImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Html'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiHtmlImpl#getHtml Html}
  • + *
+ *

+ * + * @generated + */ +public class GuiHtmlImpl extends MinimalEObjectImpl.Container implements GuiHtml { + /** + * The default value of the '{@link #getHtml() Html}' attribute. + * + * + * @see #getHtml() + * @generated + * @ordered + */ + protected static final String HTML_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHtml() Html}' attribute. + * + * + * @see #getHtml() + * @generated + * @ordered + */ + protected String html = HTML_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiHtmlImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_HTML; + } + + /** + * + * + * @generated + */ + public String getHtml() { + return html; + } + + /** + * + * + * @generated + */ + public void setHtml(String newHtml) { + String oldHtml = html; + html = newHtml; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_HTML__HTML, oldHtml, html)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_HTML__HTML: + return getHtml(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_HTML__HTML: + setHtml((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_HTML__HTML: + setHtml(HTML_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_HTML__HTML: + return HTML_EDEFAULT == null ? html != null : !HTML_EDEFAULT.equals(html); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (html: "); + result.append(html); + result.append(')'); + return result.toString(); + } + +} //GuiHtmlImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiNamedObjectImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiNamedObjectImpl.java new file mode 100644 index 0000000..13b1ffd --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiNamedObjectImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Named Object'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiNamedObjectImpl#getObjectName Object Name}
  • + *
+ *

+ * + * @generated + */ +public class GuiNamedObjectImpl extends GuiObjectImpl implements GuiNamedObject { + /** + * The default value of the '{@link #getObjectName() Object Name}' attribute. + * + * + * @see #getObjectName() + * @generated + * @ordered + */ + protected static final String OBJECT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getObjectName() Object Name}' attribute. + * + * + * @see #getObjectName() + * @generated + * @ordered + */ + protected String objectName = OBJECT_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiNamedObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_NAMED_OBJECT; + } + + /** + * + * + * @generated + */ + public String getObjectName() { + return objectName; + } + + /** + * + * + * @generated + */ + public void setObjectName(String newObjectName) { + String oldObjectName = objectName; + objectName = newObjectName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_NAMED_OBJECT__OBJECT_NAME, oldObjectName, objectName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_NAMED_OBJECT__OBJECT_NAME: + return getObjectName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_NAMED_OBJECT__OBJECT_NAME: + setObjectName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_NAMED_OBJECT__OBJECT_NAME: + setObjectName(OBJECT_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_NAMED_OBJECT__OBJECT_NAME: + return OBJECT_NAME_EDEFAULT == null ? objectName != null : !OBJECT_NAME_EDEFAULT.equals(objectName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (objectName: "); + result.append(objectName); + result.append(')'); + return result.toString(); + } + +} //GuiNamedObjectImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectImpl.java new file mode 100644 index 0000000..2aabc3b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Object'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectImpl#getValues Values}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectImpl extends MinimalEObjectImpl.Container implements GuiObject { + /** + * The cached value of the '{@link #getValues() Values}' containment reference list. + * + * + * @see #getValues() + * @generated + * @ordered + */ + protected EList values; + + /** + * + * + * @generated + */ + protected GuiObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT; + } + + /** + * + * + * @generated + */ + public EList getValues() { + if (values == null) { + values = new EObjectContainmentEList(GuiObjectValue.class, this, ModelPackage.GUI_OBJECT__VALUES); + } + return values; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_OBJECT__VALUES: + return ((InternalEList)getValues()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT__VALUES: + return getValues(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT__VALUES: + getValues().clear(); + getValues().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT__VALUES: + getValues().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT__VALUES: + return values != null && !values.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiObjectImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectNamedListImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectNamedListImpl.java new file mode 100644 index 0000000..95b3aa8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectNamedListImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Object Named List'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectNamedListImpl#getObjects Objects}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectNamedListImpl extends GuiObjectValueImpl implements GuiObjectNamedList { + /** + * The cached value of the '{@link #getObjects() Objects}' containment reference list. + * + * + * @see #getObjects() + * @generated + * @ordered + */ + protected EList objects; + + /** + * + * + * @generated + */ + protected GuiObjectNamedListImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_NAMED_LIST; + } + + /** + * + * + * @generated + */ + public EList getObjects() { + if (objects == null) { + objects = new EObjectContainmentEList(GuiNamedObject.class, this, ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS); + } + return objects; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS: + return ((InternalEList)getObjects()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS: + return getObjects(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS: + getObjects().clear(); + getObjects().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS: + getObjects().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_NAMED_LIST__OBJECTS: + return objects != null && !objects.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiObjectNamedListImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectUnNamedListImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectUnNamedListImpl.java new file mode 100644 index 0000000..b10ad2a --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectUnNamedListImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Object Un Named List'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectUnNamedListImpl#getObjects Objects}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectUnNamedListImpl extends GuiObjectValueImpl implements GuiObjectUnNamedList { + /** + * The cached value of the '{@link #getObjects() Objects}' containment reference list. + * + * + * @see #getObjects() + * @generated + * @ordered + */ + protected EList objects; + + /** + * + * + * @generated + */ + protected GuiObjectUnNamedListImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_UN_NAMED_LIST; + } + + /** + * + * + * @generated + */ + public EList getObjects() { + if (objects == null) { + objects = new EObjectContainmentEList(GuiObject.class, this, ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS); + } + return objects; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS: + return ((InternalEList)getObjects()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS: + return getObjects(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS: + getObjects().clear(); + getObjects().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS: + getObjects().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST__OBJECTS: + return objects != null && !objects.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiObjectUnNamedListImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueImpl.java new file mode 100644 index 0000000..3b0878d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Object Value'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl#getValueName Value Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueImpl#getTooltip Tooltip}
  • + *
+ *

+ * + * @generated + */ +public abstract class GuiObjectValueImpl extends MinimalEObjectImpl.Container implements GuiObjectValue { + /** + * The default value of the '{@link #getValueName() Value Name}' attribute. + * + * + * @see #getValueName() + * @generated + * @ordered + */ + protected static final String VALUE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValueName() Value Name}' attribute. + * + * + * @see #getValueName() + * @generated + * @ordered + */ + protected String valueName = VALUE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected static final String TOOLTIP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected String tooltip = TOOLTIP_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiObjectValueImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE; + } + + /** + * + * + * @generated + */ + public String getValueName() { + return valueName; + } + + /** + * + * + * @generated + */ + public void setValueName(String newValueName) { + String oldValueName = valueName; + valueName = newValueName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE__VALUE_NAME, oldValueName, valueName)); + } + + /** + * + * + * @generated + */ + public String getTooltip() { + return tooltip; + } + + /** + * + * + * @generated + */ + public void setTooltip(String newTooltip) { + String oldTooltip = tooltip; + tooltip = newTooltip; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE__TOOLTIP, oldTooltip, tooltip)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE__VALUE_NAME: + return getValueName(); + case ModelPackage.GUI_OBJECT_VALUE__TOOLTIP: + return getTooltip(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE__VALUE_NAME: + setValueName((String)newValue); + return; + case ModelPackage.GUI_OBJECT_VALUE__TOOLTIP: + setTooltip((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE__VALUE_NAME: + setValueName(VALUE_NAME_EDEFAULT); + return; + case ModelPackage.GUI_OBJECT_VALUE__TOOLTIP: + setTooltip(TOOLTIP_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE__VALUE_NAME: + return VALUE_NAME_EDEFAULT == null ? valueName != null : !VALUE_NAME_EDEFAULT.equals(valueName); + case ModelPackage.GUI_OBJECT_VALUE__TOOLTIP: + return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (valueName: "); + result.append(valueName); + result.append(", tooltip: "); + result.append(tooltip); + result.append(')'); + return result.toString(); + } + +} //GuiObjectValueImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueIntegerImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueIntegerImpl.java new file mode 100644 index 0000000..357cd4c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueIntegerImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Object Value Integer'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueIntegerImpl#getI I}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectValueIntegerImpl extends GuiObjectValueImpl implements GuiObjectValueInteger { + /** + * The default value of the '{@link #getI() I}' attribute. + * + * + * @see #getI() + * @generated + * @ordered + */ + protected static final int I_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getI() I}' attribute. + * + * + * @see #getI() + * @generated + * @ordered + */ + protected int i = I_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiObjectValueIntegerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE_INTEGER; + } + + /** + * + * + * @generated + */ + public int getI() { + return i; + } + + /** + * + * + * @generated + */ + public void setI(int newI) { + int oldI = i; + i = newI; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_INTEGER__I, oldI, i)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_INTEGER__I: + return getI(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_INTEGER__I: + setI((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_INTEGER__I: + setI(I_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_INTEGER__I: + return i != I_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (i: "); + result.append(i); + result.append(')'); + return result.toString(); + } + +} //GuiObjectValueIntegerImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueObjectImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueObjectImpl.java new file mode 100644 index 0000000..6f3606d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueObjectImpl.java @@ -0,0 +1,196 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Object Value Object'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueObjectImpl#getV V}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectValueObjectImpl extends GuiObjectValueImpl implements GuiObjectValueObject { + /** + * The cached value of the '{@link #getV() V}' containment reference. + * + * + * @see #getV() + * @generated + * @ordered + */ + protected GuiObject v; + + /** + * + * + * @generated + */ + protected GuiObjectValueObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE_OBJECT; + } + + /** + * + * + * @generated + */ + public GuiObject getV() { + return v; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetV(GuiObject newV, NotificationChain msgs) { + GuiObject oldV = v; + v = newV; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_OBJECT__V, oldV, newV); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setV(GuiObject newV) { + if (newV != v) { + NotificationChain msgs = null; + if (v != null) + msgs = ((InternalEObject)v).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ModelPackage.GUI_OBJECT_VALUE_OBJECT__V, null, msgs); + if (newV != null) + msgs = ((InternalEObject)newV).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ModelPackage.GUI_OBJECT_VALUE_OBJECT__V, null, msgs); + msgs = basicSetV(newV, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_OBJECT__V, newV, newV)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_OBJECT__V: + return basicSetV(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_OBJECT__V: + return getV(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_OBJECT__V: + setV((GuiObject)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_OBJECT__V: + setV((GuiObject)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_OBJECT__V: + return v != null; + } + return super.eIsSet(featureID); + } + +} //GuiObjectValueObjectImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueReferenceImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueReferenceImpl.java new file mode 100644 index 0000000..71e7c05 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueReferenceImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Object Value Reference'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueReferenceImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectValueReferenceImpl extends GuiObjectValueStringImpl implements GuiObjectValueReference { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiObjectValueReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE_REFERENCE; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_REFERENCE__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //GuiObjectValueReferenceImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueStringImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueStringImpl.java new file mode 100644 index 0000000..9c8db1c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueStringImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Object Value String'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueStringImpl#getV V}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectValueStringImpl extends GuiObjectValueImpl implements GuiObjectValueString { + /** + * The default value of the '{@link #getV() V}' attribute. + * + * + * @see #getV() + * @generated + * @ordered + */ + protected static final String V_EDEFAULT = null; + + /** + * The cached value of the '{@link #getV() V}' attribute. + * + * + * @see #getV() + * @generated + * @ordered + */ + protected String v = V_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiObjectValueStringImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE_STRING; + } + + /** + * + * + * @generated + */ + public String getV() { + return v; + } + + /** + * + * + * @generated + */ + public void setV(String newV) { + String oldV = v; + v = newV; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_STRING__V, oldV, v)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_STRING__V: + return getV(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_STRING__V: + setV((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_STRING__V: + setV(V_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_STRING__V: + return V_EDEFAULT == null ? v != null : !V_EDEFAULT.equals(v); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (v: "); + result.append(v); + result.append(')'); + return result.toString(); + } + +} //GuiObjectValueStringImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueTimeSeriesImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueTimeSeriesImpl.java new file mode 100644 index 0000000..897f299 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiObjectValueTimeSeriesImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Object Value Time Series'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiObjectValueTimeSeriesImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public class GuiObjectValueTimeSeriesImpl extends GuiObjectValueStringImpl implements GuiObjectValueTimeSeries { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiObjectValueTimeSeriesImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_OBJECT_VALUE_TIME_SERIES; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //GuiObjectValueTimeSeriesImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDateImpl.java new file mode 100644 index 0000000..8620380 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDateImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Table Cell Date'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDateImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableCellDateImpl extends GuiTableCellImpl implements GuiTableCellDate { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final Date VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected Date value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTableCellDateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_CELL_DATE; + } + + /** + * + * + * @generated + */ + public Date getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(Date newValue) { + Date oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL_DATE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DATE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DATE__VALUE: + setValue((Date)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DATE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DATE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //GuiTableCellDateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDoubleImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDoubleImpl.java new file mode 100644 index 0000000..86092e6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellDoubleImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Table Cell Double'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellDoubleImpl#getTimeseriesPath Timeseries Path}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableCellDoubleImpl extends GuiTableCellImpl implements GuiTableCellDouble { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected double value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getTimeseriesPath() Timeseries Path}' attribute. + * + * + * @see #getTimeseriesPath() + * @generated + * @ordered + */ + protected static final String TIMESERIES_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTimeseriesPath() Timeseries Path}' attribute. + * + * + * @see #getTimeseriesPath() + * @generated + * @ordered + */ + protected String timeseriesPath = TIMESERIES_PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTableCellDoubleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_CELL_DOUBLE; + } + + /** + * + * + * @generated + */ + public double getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(double newValue) { + double oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL_DOUBLE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public String getTimeseriesPath() { + return timeseriesPath; + } + + /** + * + * + * @generated + */ + public void setTimeseriesPath(String newTimeseriesPath) { + String oldTimeseriesPath = timeseriesPath; + timeseriesPath = newTimeseriesPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH, oldTimeseriesPath, timeseriesPath)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DOUBLE__VALUE: + return getValue(); + case ModelPackage.GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH: + return getTimeseriesPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DOUBLE__VALUE: + setValue((Double)newValue); + return; + case ModelPackage.GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH: + setTimeseriesPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DOUBLE__VALUE: + setValue(VALUE_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH: + setTimeseriesPath(TIMESERIES_PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_DOUBLE__VALUE: + return value != VALUE_EDEFAULT; + case ModelPackage.GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH: + return TIMESERIES_PATH_EDEFAULT == null ? timeseriesPath != null : !TIMESERIES_PATH_EDEFAULT.equals(timeseriesPath); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(", timeseriesPath: "); + result.append(timeseriesPath); + result.append(')'); + return result.toString(); + } + +} //GuiTableCellDoubleImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellImpl.java new file mode 100644 index 0000000..1fcc803 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Table Cell'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellImpl#getTooltip Tooltip}
  • + *
+ *

+ * + * @generated + */ +public abstract class GuiTableCellImpl extends MinimalEObjectImpl.Container implements GuiTableCell { + /** + * The default value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected static final String TOOLTIP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected String tooltip = TOOLTIP_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTableCellImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_CELL; + } + + /** + * + * + * @generated + */ + public String getTooltip() { + return tooltip; + } + + /** + * + * + * @generated + */ + public void setTooltip(String newTooltip) { + String oldTooltip = tooltip; + tooltip = newTooltip; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL__TOOLTIP, oldTooltip, tooltip)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL__TOOLTIP: + return getTooltip(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL__TOOLTIP: + setTooltip((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL__TOOLTIP: + setTooltip(TOOLTIP_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL__TOOLTIP: + return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (tooltip: "); + result.append(tooltip); + result.append(')'); + return result.toString(); + } + +} //GuiTableCellImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferenceImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferenceImpl.java new file mode 100644 index 0000000..539de91 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferenceImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Table Cell Reference'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl#getLabel Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferenceImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableCellReferenceImpl extends MinimalEObjectImpl.Container implements GuiTableCellReference { + /** + * The default value of the '{@link #getLabel() Label}' attribute. + * + * + * @see #getLabel() + * @generated + * @ordered + */ + protected static final String LABEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLabel() Label}' attribute. + * + * + * @see #getLabel() + * @generated + * @ordered + */ + protected String label = LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTableCellReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_CELL_REFERENCE; + } + + /** + * + * + * @generated + */ + public String getLabel() { + return label; + } + + /** + * + * + * @generated + */ + public void setLabel(String newLabel) { + String oldLabel = label; + label = newLabel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL_REFERENCE__LABEL, oldLabel, label)); + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_CELL_REFERENCE__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCE__LABEL: + return getLabel(); + case ModelPackage.GUI_TABLE_CELL_REFERENCE__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCE__LABEL: + setLabel((String)newValue); + return; + case ModelPackage.GUI_TABLE_CELL_REFERENCE__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCE__LABEL: + setLabel(LABEL_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_CELL_REFERENCE__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCE__LABEL: + return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label); + case ModelPackage.GUI_TABLE_CELL_REFERENCE__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (label: "); + result.append(label); + result.append(", path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //GuiTableCellReferenceImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferencesImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferencesImpl.java new file mode 100644 index 0000000..26a1374 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellReferencesImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Table Cell References'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellReferencesImpl#getRefs Refs}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableCellReferencesImpl extends GuiTableCellImpl implements GuiTableCellReferences { + /** + * The cached value of the '{@link #getRefs() Refs}' containment reference list. + * + * + * @see #getRefs() + * @generated + * @ordered + */ + protected EList refs; + + /** + * + * + * @generated + */ + protected GuiTableCellReferencesImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_CELL_REFERENCES; + } + + /** + * + * + * @generated + */ + public EList getRefs() { + if (refs == null) { + refs = new EObjectContainmentEList(GuiTableCellReference.class, this, ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS); + } + return refs; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS: + return ((InternalEList)getRefs()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS: + return getRefs(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS: + getRefs().clear(); + getRefs().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS: + getRefs().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_CELL_REFERENCES__REFS: + return refs != null && !refs.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiTableCellReferencesImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellStringImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellStringImpl.java new file mode 100644 index 0000000..8f399e4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableCellStringImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Table Cell String'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableCellStringImpl#getValue Value}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#getColName Col Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#getFormat Format}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#getWidth Width}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#isHidden Hidden}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableColumnImpl#getColumnType Column Type}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableColumnImpl extends MinimalEObjectImpl.Container implements GuiTableColumn { + /** + * The default value of the '{@link #getColName() Col Name}' attribute. + * + * + * @see #getColName() + * @generated + * @ordered + */ + protected static final String COL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getColName() Col Name}' attribute. + * + * + * @see #getColName() + * @generated + * @ordered + */ + protected String colName = COL_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected static final String TOOLTIP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected String tooltip = TOOLTIP_EDEFAULT; + + /** + * The default value of the '{@link #getFormat() Format}' attribute. + * + * + * @see #getFormat() + * @generated + * @ordered + */ + protected static final String FORMAT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFormat() Format}' attribute. + * + * + * @see #getFormat() + * @generated + * @ordered + */ + protected String format = FORMAT_EDEFAULT; + + /** + * The default value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected static final int WIDTH_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getWidth() Width}' attribute. + * + * + * @see #getWidth() + * @generated + * @ordered + */ + protected int width = WIDTH_EDEFAULT; + + /** + * The default value of the '{@link #isHidden() Hidden}' attribute. + * + * + * @see #isHidden() + * @generated + * @ordered + */ + protected static final boolean HIDDEN_EDEFAULT = false; + + /** + * The cached value of the '{@link #isHidden() Hidden}' attribute. + * + * + * @see #isHidden() + * @generated + * @ordered + */ + protected boolean hidden = HIDDEN_EDEFAULT; + + /** + * The default value of the '{@link #getColumnType() Column Type}' attribute. + * + * + * @see #getColumnType() + * @generated + * @ordered + */ + protected static final GuiTableColumnType COLUMN_TYPE_EDEFAULT = GuiTableColumnType.STRING; + + /** + * The cached value of the '{@link #getColumnType() Column Type}' attribute. + * + * + * @see #getColumnType() + * @generated + * @ordered + */ + protected GuiTableColumnType columnType = COLUMN_TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTableColumnImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE_COLUMN; + } + + /** + * + * + * @generated + */ + public String getColName() { + return colName; + } + + /** + * + * + * @generated + */ + public void setColName(String newColName) { + String oldColName = colName; + colName = newColName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__COL_NAME, oldColName, colName)); + } + + /** + * + * + * @generated + */ + public String getTooltip() { + return tooltip; + } + + /** + * + * + * @generated + */ + public void setTooltip(String newTooltip) { + String oldTooltip = tooltip; + tooltip = newTooltip; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__TOOLTIP, oldTooltip, tooltip)); + } + + /** + * + * + * @generated + */ + public String getFormat() { + return format; + } + + /** + * + * + * @generated + */ + public void setFormat(String newFormat) { + String oldFormat = format; + format = newFormat; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__FORMAT, oldFormat, format)); + } + + /** + * + * + * @generated + */ + public int getWidth() { + return width; + } + + /** + * + * + * @generated + */ + public void setWidth(int newWidth) { + int oldWidth = width; + width = newWidth; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__WIDTH, oldWidth, width)); + } + + /** + * + * + * @generated + */ + public boolean isHidden() { + return hidden; + } + + /** + * + * + * @generated + */ + public void setHidden(boolean newHidden) { + boolean oldHidden = hidden; + hidden = newHidden; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__HIDDEN, oldHidden, hidden)); + } + + /** + * + * + * @generated + */ + public GuiTableColumnType getColumnType() { + return columnType; + } + + /** + * + * + * @generated + */ + public void setColumnType(GuiTableColumnType newColumnType) { + GuiTableColumnType oldColumnType = columnType; + columnType = newColumnType == null ? COLUMN_TYPE_EDEFAULT : newColumnType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TABLE_COLUMN__COLUMN_TYPE, oldColumnType, columnType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE_COLUMN__COL_NAME: + return getColName(); + case ModelPackage.GUI_TABLE_COLUMN__TOOLTIP: + return getTooltip(); + case ModelPackage.GUI_TABLE_COLUMN__FORMAT: + return getFormat(); + case ModelPackage.GUI_TABLE_COLUMN__WIDTH: + return getWidth(); + case ModelPackage.GUI_TABLE_COLUMN__HIDDEN: + return isHidden(); + case ModelPackage.GUI_TABLE_COLUMN__COLUMN_TYPE: + return getColumnType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE_COLUMN__COL_NAME: + setColName((String)newValue); + return; + case ModelPackage.GUI_TABLE_COLUMN__TOOLTIP: + setTooltip((String)newValue); + return; + case ModelPackage.GUI_TABLE_COLUMN__FORMAT: + setFormat((String)newValue); + return; + case ModelPackage.GUI_TABLE_COLUMN__WIDTH: + setWidth((Integer)newValue); + return; + case ModelPackage.GUI_TABLE_COLUMN__HIDDEN: + setHidden((Boolean)newValue); + return; + case ModelPackage.GUI_TABLE_COLUMN__COLUMN_TYPE: + setColumnType((GuiTableColumnType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_COLUMN__COL_NAME: + setColName(COL_NAME_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_COLUMN__TOOLTIP: + setTooltip(TOOLTIP_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_COLUMN__FORMAT: + setFormat(FORMAT_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_COLUMN__WIDTH: + setWidth(WIDTH_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_COLUMN__HIDDEN: + setHidden(HIDDEN_EDEFAULT); + return; + case ModelPackage.GUI_TABLE_COLUMN__COLUMN_TYPE: + setColumnType(COLUMN_TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE_COLUMN__COL_NAME: + return COL_NAME_EDEFAULT == null ? colName != null : !COL_NAME_EDEFAULT.equals(colName); + case ModelPackage.GUI_TABLE_COLUMN__TOOLTIP: + return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); + case ModelPackage.GUI_TABLE_COLUMN__FORMAT: + return FORMAT_EDEFAULT == null ? format != null : !FORMAT_EDEFAULT.equals(format); + case ModelPackage.GUI_TABLE_COLUMN__WIDTH: + return width != WIDTH_EDEFAULT; + case ModelPackage.GUI_TABLE_COLUMN__HIDDEN: + return hidden != HIDDEN_EDEFAULT; + case ModelPackage.GUI_TABLE_COLUMN__COLUMN_TYPE: + return columnType != COLUMN_TYPE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (colName: "); + result.append(colName); + result.append(", tooltip: "); + result.append(tooltip); + result.append(", format: "); + result.append(format); + result.append(", width: "); + result.append(width); + result.append(", hidden: "); + result.append(hidden); + result.append(", columnType: "); + result.append(columnType); + result.append(')'); + return result.toString(); + } + +} //GuiTableColumnImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableImpl.java new file mode 100644 index 0000000..fcabac8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTable; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Table'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl#getColumns Columns}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableImpl#getRows Rows}
  • + *
+ *

+ * + * @generated + */ +public class GuiTableImpl extends MinimalEObjectImpl.Container implements GuiTable { + /** + * The cached value of the '{@link #getColumns() Columns}' containment reference list. + * + * + * @see #getColumns() + * @generated + * @ordered + */ + protected EList columns; + + /** + * The cached value of the '{@link #getRows() Rows}' containment reference list. + * + * + * @see #getRows() + * @generated + * @ordered + */ + protected EList rows; + + /** + * + * + * @generated + */ + protected GuiTableImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TABLE; + } + + /** + * + * + * @generated + */ + public EList getColumns() { + if (columns == null) { + columns = new EObjectContainmentEList(GuiTableColumn.class, this, ModelPackage.GUI_TABLE__COLUMNS); + } + return columns; + } + + /** + * + * + * @generated + */ + public EList getRows() { + if (rows == null) { + rows = new EObjectContainmentEList(GuiTableRow.class, this, ModelPackage.GUI_TABLE__ROWS); + } + return rows; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_TABLE__COLUMNS: + return ((InternalEList)getColumns()).basicRemove(otherEnd, msgs); + case ModelPackage.GUI_TABLE__ROWS: + return ((InternalEList)getRows()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TABLE__COLUMNS: + return getColumns(); + case ModelPackage.GUI_TABLE__ROWS: + return getRows(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TABLE__COLUMNS: + getColumns().clear(); + getColumns().addAll((Collection)newValue); + return; + case ModelPackage.GUI_TABLE__ROWS: + getRows().clear(); + getRows().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE__COLUMNS: + getColumns().clear(); + return; + case ModelPackage.GUI_TABLE__ROWS: + getRows().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TABLE__COLUMNS: + return columns != null && !columns.isEmpty(); + case ModelPackage.GUI_TABLE__ROWS: + return rows != null && !rows.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiTableImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableRowImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableRowImpl.java new file mode 100644 index 0000000..74757a8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTableRowImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Table Row'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTableRowImpl#getCells Cells}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl#getValue Value}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl#getMax Max}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl#getMin Min}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieDataImpl#getNum Num}
  • + *
+ *

+ * + * @generated + */ +public class GuiTimeSerieDataImpl extends MinimalEObjectImpl.Container implements GuiTimeSerieData { + /** + * The default value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected static final Date TIME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected Date time = TIME_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected double value = VALUE_EDEFAULT; + + /** + * The default value of the '{@link #getMax() Max}' attribute. + * + * + * @see #getMax() + * @generated + * @ordered + */ + protected static final Double MAX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMax() Max}' attribute. + * + * + * @see #getMax() + * @generated + * @ordered + */ + protected Double max = MAX_EDEFAULT; + + /** + * The default value of the '{@link #getMin() Min}' attribute. + * + * + * @see #getMin() + * @generated + * @ordered + */ + protected static final Double MIN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMin() Min}' attribute. + * + * + * @see #getMin() + * @generated + * @ordered + */ + protected Double min = MIN_EDEFAULT; + + /** + * The default value of the '{@link #getNum() Num}' attribute. + * + * + * @see #getNum() + * @generated + * @ordered + */ + protected static final int NUM_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getNum() Num}' attribute. + * + * + * @see #getNum() + * @generated + * @ordered + */ + protected int num = NUM_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiTimeSerieDataImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TIME_SERIE_DATA; + } + + /** + * + * + * @generated + */ + public Date getTime() { + return time; + } + + /** + * + * + * @generated + */ + public void setTime(Date newTime) { + Date oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE_DATA__TIME, oldTime, time)); + } + + /** + * + * + * @generated + */ + public double getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(double newValue) { + double oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE_DATA__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + public Double getMax() { + return max; + } + + /** + * + * + * @generated + */ + public void setMax(Double newMax) { + Double oldMax = max; + max = newMax; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE_DATA__MAX, oldMax, max)); + } + + /** + * + * + * @generated + */ + public Double getMin() { + return min; + } + + /** + * + * + * @generated + */ + public void setMin(Double newMin) { + Double oldMin = min; + min = newMin; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE_DATA__MIN, oldMin, min)); + } + + /** + * + * + * @generated + */ + public int getNum() { + return num; + } + + /** + * + * + * @generated + */ + public void setNum(int newNum) { + int oldNum = num; + num = newNum; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE_DATA__NUM, oldNum, num)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE_DATA__TIME: + return getTime(); + case ModelPackage.GUI_TIME_SERIE_DATA__VALUE: + return getValue(); + case ModelPackage.GUI_TIME_SERIE_DATA__MAX: + return getMax(); + case ModelPackage.GUI_TIME_SERIE_DATA__MIN: + return getMin(); + case ModelPackage.GUI_TIME_SERIE_DATA__NUM: + return getNum(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE_DATA__TIME: + setTime((Date)newValue); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__VALUE: + setValue((Double)newValue); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__MAX: + setMax((Double)newValue); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__MIN: + setMin((Double)newValue); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__NUM: + setNum((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE_DATA__TIME: + setTime(TIME_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__VALUE: + setValue(VALUE_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__MAX: + setMax(MAX_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__MIN: + setMin(MIN_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE_DATA__NUM: + setNum(NUM_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE_DATA__TIME: + return TIME_EDEFAULT == null ? time != null : !TIME_EDEFAULT.equals(time); + case ModelPackage.GUI_TIME_SERIE_DATA__VALUE: + return value != VALUE_EDEFAULT; + case ModelPackage.GUI_TIME_SERIE_DATA__MAX: + return MAX_EDEFAULT == null ? max != null : !MAX_EDEFAULT.equals(max); + case ModelPackage.GUI_TIME_SERIE_DATA__MIN: + return MIN_EDEFAULT == null ? min != null : !MIN_EDEFAULT.equals(min); + case ModelPackage.GUI_TIME_SERIE_DATA__NUM: + return num != NUM_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (time: "); + result.append(time); + result.append(", value: "); + result.append(value); + result.append(", max: "); + result.append(max); + result.append(", min: "); + result.append(min); + result.append(", num: "); + result.append(num); + result.append(')'); + return result.toString(); + } + +} //GuiTimeSerieDataImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTimeSerieImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTimeSerieImpl.java new file mode 100644 index 0000000..b4fb472 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTimeSerieImpl.java @@ -0,0 +1,568 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Time Serie'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getXAxisLabel XAxis Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getXAxisDateFormat XAxis Date Format}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getYAxisLabel YAxis Label}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getStart Start}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getEnd End}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#isIsRate Is Rate}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTimeSerieImpl#getData Data}
  • + *
+ *

+ * + * @generated + */ +public class GuiTimeSerieImpl extends MinimalEObjectImpl.Container implements GuiTimeSerie { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getXAxisLabel() XAxis Label}' attribute. + * + * + * @see #getXAxisLabel() + * @generated + * @ordered + */ + protected static final String XAXIS_LABEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getXAxisLabel() XAxis Label}' attribute. + * + * + * @see #getXAxisLabel() + * @generated + * @ordered + */ + protected String xAxisLabel = XAXIS_LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getXAxisDateFormat() XAxis Date Format}' attribute. + * + * + * @see #getXAxisDateFormat() + * @generated + * @ordered + */ + protected static final String XAXIS_DATE_FORMAT_EDEFAULT = "MM-dd HH:mm"; + + /** + * The cached value of the '{@link #getXAxisDateFormat() XAxis Date Format}' attribute. + * + * + * @see #getXAxisDateFormat() + * @generated + * @ordered + */ + protected String xAxisDateFormat = XAXIS_DATE_FORMAT_EDEFAULT; + + /** + * The default value of the '{@link #getYAxisLabel() YAxis Label}' attribute. + * + * + * @see #getYAxisLabel() + * @generated + * @ordered + */ + protected static final String YAXIS_LABEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getYAxisLabel() YAxis Label}' attribute. + * + * + * @see #getYAxisLabel() + * @generated + * @ordered + */ + protected String yAxisLabel = YAXIS_LABEL_EDEFAULT; + + /** + * The default value of the '{@link #getStart() Start}' attribute. + * + * + * @see #getStart() + * @generated + * @ordered + */ + protected static final Date START_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStart() Start}' attribute. + * + * + * @see #getStart() + * @generated + * @ordered + */ + protected Date start = START_EDEFAULT; + + /** + * The default value of the '{@link #getEnd() End}' attribute. + * + * + * @see #getEnd() + * @generated + * @ordered + */ + protected static final Date END_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEnd() End}' attribute. + * + * + * @see #getEnd() + * @generated + * @ordered + */ + protected Date end = END_EDEFAULT; + + /** + * The default value of the '{@link #isIsRate() Is Rate}' attribute. + * + * + * @see #isIsRate() + * @generated + * @ordered + */ + protected static final boolean IS_RATE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIsRate() Is Rate}' attribute. + * + * + * @see #isIsRate() + * @generated + * @ordered + */ + protected boolean isRate = IS_RATE_EDEFAULT; + + /** + * The cached value of the '{@link #getData() Data}' containment reference list. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected EList data; + + /** + * + * + * @generated + */ + protected GuiTimeSerieImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TIME_SERIE; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getXAxisLabel() { + return xAxisLabel; + } + + /** + * + * + * @generated + */ + public void setXAxisLabel(String newXAxisLabel) { + String oldXAxisLabel = xAxisLabel; + xAxisLabel = newXAxisLabel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__XAXIS_LABEL, oldXAxisLabel, xAxisLabel)); + } + + /** + * + * + * @generated + */ + public String getXAxisDateFormat() { + return xAxisDateFormat; + } + + /** + * + * + * @generated + */ + public void setXAxisDateFormat(String newXAxisDateFormat) { + String oldXAxisDateFormat = xAxisDateFormat; + xAxisDateFormat = newXAxisDateFormat; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__XAXIS_DATE_FORMAT, oldXAxisDateFormat, xAxisDateFormat)); + } + + /** + * + * + * @generated + */ + public String getYAxisLabel() { + return yAxisLabel; + } + + /** + * + * + * @generated + */ + public void setYAxisLabel(String newYAxisLabel) { + String oldYAxisLabel = yAxisLabel; + yAxisLabel = newYAxisLabel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__YAXIS_LABEL, oldYAxisLabel, yAxisLabel)); + } + + /** + * + * + * @generated + */ + public Date getStart() { + return start; + } + + /** + * + * + * @generated + */ + public void setStart(Date newStart) { + Date oldStart = start; + start = newStart; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__START, oldStart, start)); + } + + /** + * + * + * @generated + */ + public Date getEnd() { + return end; + } + + /** + * + * + * @generated + */ + public void setEnd(Date newEnd) { + Date oldEnd = end; + end = newEnd; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__END, oldEnd, end)); + } + + /** + * + * + * @generated + */ + public boolean isIsRate() { + return isRate; + } + + /** + * + * + * @generated + */ + public void setIsRate(boolean newIsRate) { + boolean oldIsRate = isRate; + isRate = newIsRate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TIME_SERIE__IS_RATE, oldIsRate, isRate)); + } + + /** + * + * + * @generated + */ + public EList getData() { + if (data == null) { + data = new EObjectContainmentEList(GuiTimeSerieData.class, this, ModelPackage.GUI_TIME_SERIE__DATA); + } + return data; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE__DATA: + return ((InternalEList)getData()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE__NAME: + return getName(); + case ModelPackage.GUI_TIME_SERIE__XAXIS_LABEL: + return getXAxisLabel(); + case ModelPackage.GUI_TIME_SERIE__XAXIS_DATE_FORMAT: + return getXAxisDateFormat(); + case ModelPackage.GUI_TIME_SERIE__YAXIS_LABEL: + return getYAxisLabel(); + case ModelPackage.GUI_TIME_SERIE__START: + return getStart(); + case ModelPackage.GUI_TIME_SERIE__END: + return getEnd(); + case ModelPackage.GUI_TIME_SERIE__IS_RATE: + return isIsRate(); + case ModelPackage.GUI_TIME_SERIE__DATA: + return getData(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE__NAME: + setName((String)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__XAXIS_LABEL: + setXAxisLabel((String)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__XAXIS_DATE_FORMAT: + setXAxisDateFormat((String)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__YAXIS_LABEL: + setYAxisLabel((String)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__START: + setStart((Date)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__END: + setEnd((Date)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__IS_RATE: + setIsRate((Boolean)newValue); + return; + case ModelPackage.GUI_TIME_SERIE__DATA: + getData().clear(); + getData().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE__NAME: + setName(NAME_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__XAXIS_LABEL: + setXAxisLabel(XAXIS_LABEL_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__XAXIS_DATE_FORMAT: + setXAxisDateFormat(XAXIS_DATE_FORMAT_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__YAXIS_LABEL: + setYAxisLabel(YAXIS_LABEL_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__START: + setStart(START_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__END: + setEnd(END_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__IS_RATE: + setIsRate(IS_RATE_EDEFAULT); + return; + case ModelPackage.GUI_TIME_SERIE__DATA: + getData().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TIME_SERIE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case ModelPackage.GUI_TIME_SERIE__XAXIS_LABEL: + return XAXIS_LABEL_EDEFAULT == null ? xAxisLabel != null : !XAXIS_LABEL_EDEFAULT.equals(xAxisLabel); + case ModelPackage.GUI_TIME_SERIE__XAXIS_DATE_FORMAT: + return XAXIS_DATE_FORMAT_EDEFAULT == null ? xAxisDateFormat != null : !XAXIS_DATE_FORMAT_EDEFAULT.equals(xAxisDateFormat); + case ModelPackage.GUI_TIME_SERIE__YAXIS_LABEL: + return YAXIS_LABEL_EDEFAULT == null ? yAxisLabel != null : !YAXIS_LABEL_EDEFAULT.equals(yAxisLabel); + case ModelPackage.GUI_TIME_SERIE__START: + return START_EDEFAULT == null ? start != null : !START_EDEFAULT.equals(start); + case ModelPackage.GUI_TIME_SERIE__END: + return END_EDEFAULT == null ? end != null : !END_EDEFAULT.equals(end); + case ModelPackage.GUI_TIME_SERIE__IS_RATE: + return isRate != IS_RATE_EDEFAULT; + case ModelPackage.GUI_TIME_SERIE__DATA: + return data != null && !data.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", xAxisLabel: "); + result.append(xAxisLabel); + result.append(", xAxisDateFormat: "); + result.append(xAxisDateFormat); + result.append(", yAxisLabel: "); + result.append(yAxisLabel); + result.append(", start: "); + result.append(start); + result.append(", end: "); + result.append(end); + result.append(", isRate: "); + result.append(isRate); + result.append(')'); + return result.toString(); + } + +} //GuiTimeSerieImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTreeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTreeImpl.java new file mode 100644 index 0000000..89b8b27 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/GuiTreeImpl.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.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTree; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Tree'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeImpl#getSections Sections}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getNodeName Node Name}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getIcon Icon}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getView View}
  • + *
  • {@link org.openecomp.ncomp.gwt.siriusportal.model.impl.GuiTreeNodeImpl#getChildren Children}
  • + *
+ *

+ * + * @generated + */ +public class GuiTreeNodeImpl extends MinimalEObjectImpl.Container implements GuiTreeNode { + /** + * The default value of the '{@link #getNodeName() Node Name}' attribute. + * + * + * @see #getNodeName() + * @generated + * @ordered + */ + protected static final String NODE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNodeName() Node Name}' attribute. + * + * + * @see #getNodeName() + * @generated + * @ordered + */ + protected String nodeName = NODE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected static final String TITLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected String title = TITLE_EDEFAULT; + + /** + * The default value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected static final String TOOLTIP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected String tooltip = TOOLTIP_EDEFAULT; + + /** + * The default value of the '{@link #getIcon() Icon}' attribute. + * + * + * @see #getIcon() + * @generated + * @ordered + */ + protected static final String ICON_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIcon() Icon}' attribute. + * + * + * @see #getIcon() + * @generated + * @ordered + */ + protected String icon = ICON_EDEFAULT; + + /** + * The default value of the '{@link #getView() View}' attribute. + * + * + * @see #getView() + * @generated + * @ordered + */ + protected static final GuiView VIEW_EDEFAULT = GuiView.NONE; + + /** + * The cached value of the '{@link #getView() View}' attribute. + * + * + * @see #getView() + * @generated + * @ordered + */ + protected GuiView view = VIEW_EDEFAULT; + + /** + * The cached value of the '{@link #getChildren() Children}' containment reference list. + * + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList children; + + /** + * + * + * @generated + */ + protected GuiTreeNodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ModelPackage.Literals.GUI_TREE_NODE; + } + + /** + * + * + * @generated + */ + public String getNodeName() { + return nodeName; + } + + /** + * + * + * @generated + */ + public void setNodeName(String newNodeName) { + String oldNodeName = nodeName; + nodeName = newNodeName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TREE_NODE__NODE_NAME, oldNodeName, nodeName)); + } + + /** + * + * + * @generated + */ + public String getTitle() { + return title; + } + + /** + * + * + * @generated + */ + public void setTitle(String newTitle) { + String oldTitle = title; + title = newTitle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TREE_NODE__TITLE, oldTitle, title)); + } + + /** + * + * + * @generated + */ + public String getTooltip() { + return tooltip; + } + + /** + * + * + * @generated + */ + public void setTooltip(String newTooltip) { + String oldTooltip = tooltip; + tooltip = newTooltip; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TREE_NODE__TOOLTIP, oldTooltip, tooltip)); + } + + /** + * + * + * @generated + */ + public String getIcon() { + return icon; + } + + /** + * + * + * @generated + */ + public void setIcon(String newIcon) { + String oldIcon = icon; + icon = newIcon; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TREE_NODE__ICON, oldIcon, icon)); + } + + /** + * + * + * @generated + */ + public GuiView getView() { + return view; + } + + /** + * + * + * @generated + */ + public void setView(GuiView newView) { + GuiView oldView = view; + view = newView == null ? VIEW_EDEFAULT : newView; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.GUI_TREE_NODE__VIEW, oldView, view)); + } + + /** + * + * + * @generated + */ + public EList getChildren() { + if (children == null) { + children = new EObjectContainmentEList(GuiTreeNode.class, this, ModelPackage.GUI_TREE_NODE__CHILDREN); + } + return children; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ModelPackage.GUI_TREE_NODE__CHILDREN: + return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ModelPackage.GUI_TREE_NODE__NODE_NAME: + return getNodeName(); + case ModelPackage.GUI_TREE_NODE__TITLE: + return getTitle(); + case ModelPackage.GUI_TREE_NODE__TOOLTIP: + return getTooltip(); + case ModelPackage.GUI_TREE_NODE__ICON: + return getIcon(); + case ModelPackage.GUI_TREE_NODE__VIEW: + return getView(); + case ModelPackage.GUI_TREE_NODE__CHILDREN: + return getChildren(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ModelPackage.GUI_TREE_NODE__NODE_NAME: + setNodeName((String)newValue); + return; + case ModelPackage.GUI_TREE_NODE__TITLE: + setTitle((String)newValue); + return; + case ModelPackage.GUI_TREE_NODE__TOOLTIP: + setTooltip((String)newValue); + return; + case ModelPackage.GUI_TREE_NODE__ICON: + setIcon((String)newValue); + return; + case ModelPackage.GUI_TREE_NODE__VIEW: + setView((GuiView)newValue); + return; + case ModelPackage.GUI_TREE_NODE__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TREE_NODE__NODE_NAME: + setNodeName(NODE_NAME_EDEFAULT); + return; + case ModelPackage.GUI_TREE_NODE__TITLE: + setTitle(TITLE_EDEFAULT); + return; + case ModelPackage.GUI_TREE_NODE__TOOLTIP: + setTooltip(TOOLTIP_EDEFAULT); + return; + case ModelPackage.GUI_TREE_NODE__ICON: + setIcon(ICON_EDEFAULT); + return; + case ModelPackage.GUI_TREE_NODE__VIEW: + setView(VIEW_EDEFAULT); + return; + case ModelPackage.GUI_TREE_NODE__CHILDREN: + getChildren().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ModelPackage.GUI_TREE_NODE__NODE_NAME: + return NODE_NAME_EDEFAULT == null ? nodeName != null : !NODE_NAME_EDEFAULT.equals(nodeName); + case ModelPackage.GUI_TREE_NODE__TITLE: + return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title); + case ModelPackage.GUI_TREE_NODE__TOOLTIP: + return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); + case ModelPackage.GUI_TREE_NODE__ICON: + return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon); + case ModelPackage.GUI_TREE_NODE__VIEW: + return view != VIEW_EDEFAULT; + case ModelPackage.GUI_TREE_NODE__CHILDREN: + return children != null && !children.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (nodeName: "); + result.append(nodeName); + result.append(", title: "); + result.append(title); + result.append(", tooltip: "); + result.append(tooltip); + result.append(", icon: "); + result.append(icon); + result.append(", view: "); + result.append(view); + result.append(')'); + return result.toString(); + } + +} //GuiTreeNodeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelFactoryImpl.java new file mode 100644 index 0000000..7f05b3e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelFactoryImpl.java @@ -0,0 +1,490 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + +import java.util.Date; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ModelFactoryImpl extends EFactoryImpl implements ModelFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ModelFactory init() { + try { + ModelFactory theModelFactory = (ModelFactory)EPackage.Registry.INSTANCE.getEFactory(ModelPackage.eNS_URI); + if (theModelFactory != null) { + return theModelFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ModelFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ModelFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ModelPackage.GUI_CLIENT_API: return createGuiClientApi(); + case ModelPackage.GUI_TREE: return createGuiTree(); + case ModelPackage.GUI_TREE_NODE: return createGuiTreeNode(); + case ModelPackage.GUI_OBJECT: return createGuiObject(); + case ModelPackage.GUI_NAMED_OBJECT: return createGuiNamedObject(); + case ModelPackage.GUI_OBJECT_VALUE_INTEGER: return createGuiObjectValueInteger(); + case ModelPackage.GUI_OBJECT_VALUE_STRING: return createGuiObjectValueString(); + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE: return createGuiObjectValueReference(); + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES: return createGuiObjectValueTimeSeries(); + case ModelPackage.GUI_OBJECT_VALUE_OBJECT: return createGuiObjectValueObject(); + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST: return createGuiObjectUnNamedList(); + case ModelPackage.GUI_OBJECT_NAMED_LIST: return createGuiObjectNamedList(); + case ModelPackage.GUI_TIME_SERIE: return createGuiTimeSerie(); + case ModelPackage.GUI_TIME_SERIE_DATA: return createGuiTimeSerieData(); + case ModelPackage.GUI_TABLE: return createGuiTable(); + case ModelPackage.GUI_TABLE_COLUMN: return createGuiTableColumn(); + case ModelPackage.GUI_TABLE_ROW: return createGuiTableRow(); + case ModelPackage.GUI_TABLE_CELL_STRING: return createGuiTableCellString(); + case ModelPackage.GUI_TABLE_CELL_DOUBLE: return createGuiTableCellDouble(); + case ModelPackage.GUI_TABLE_CELL_DATE: return createGuiTableCellDate(); + case ModelPackage.GUI_TABLE_CELL_REFERENCES: return createGuiTableCellReferences(); + case ModelPackage.GUI_TABLE_CELL_REFERENCE: return createGuiTableCellReference(); + case ModelPackage.GUI_DIAGRAM: return createGuiDiagram(); + case ModelPackage.GUI_DIAGRAM_ITEM: return createGuiDiagramItem(); + case ModelPackage.GUI_DIAGRAM_RECTANGLE: return createGuiDiagramRectangle(); + case ModelPackage.GUI_HTML: return createGuiHtml(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ModelPackage.GUI_VIEW: + return createGuiViewFromString(eDataType, initialValue); + case ModelPackage.GUI_TABLE_COLUMN_TYPE: + return createGuiTableColumnTypeFromString(eDataType, initialValue); + case ModelPackage.DATE: + return createDateFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ModelPackage.GUI_VIEW: + return convertGuiViewToString(eDataType, instanceValue); + case ModelPackage.GUI_TABLE_COLUMN_TYPE: + return convertGuiTableColumnTypeToString(eDataType, instanceValue); + case ModelPackage.DATE: + return convertDateToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public GuiClientApi createGuiClientApi() { + GuiClientApiImpl guiClientApi = new GuiClientApiImpl(); + return guiClientApi; + } + + /** + * + * + * @generated + */ + public GuiTree createGuiTree() { + GuiTreeImpl guiTree = new GuiTreeImpl(); + return guiTree; + } + + /** + * + * + * @generated + */ + public GuiTreeNode createGuiTreeNode() { + GuiTreeNodeImpl guiTreeNode = new GuiTreeNodeImpl(); + return guiTreeNode; + } + + /** + * + * + * @generated + */ + public GuiObject createGuiObject() { + GuiObjectImpl guiObject = new GuiObjectImpl(); + return guiObject; + } + + /** + * + * + * @generated + */ + public GuiNamedObject createGuiNamedObject() { + GuiNamedObjectImpl guiNamedObject = new GuiNamedObjectImpl(); + return guiNamedObject; + } + + /** + * + * + * @generated + */ + public GuiObjectValueInteger createGuiObjectValueInteger() { + GuiObjectValueIntegerImpl guiObjectValueInteger = new GuiObjectValueIntegerImpl(); + return guiObjectValueInteger; + } + + /** + * + * + * @generated + */ + public GuiObjectValueString createGuiObjectValueString() { + GuiObjectValueStringImpl guiObjectValueString = new GuiObjectValueStringImpl(); + return guiObjectValueString; + } + + /** + * + * + * @generated + */ + public GuiObjectValueReference createGuiObjectValueReference() { + GuiObjectValueReferenceImpl guiObjectValueReference = new GuiObjectValueReferenceImpl(); + return guiObjectValueReference; + } + + /** + * + * + * @generated + */ + public GuiObjectValueTimeSeries createGuiObjectValueTimeSeries() { + GuiObjectValueTimeSeriesImpl guiObjectValueTimeSeries = new GuiObjectValueTimeSeriesImpl(); + return guiObjectValueTimeSeries; + } + + /** + * + * + * @generated + */ + public GuiObjectValueObject createGuiObjectValueObject() { + GuiObjectValueObjectImpl guiObjectValueObject = new GuiObjectValueObjectImpl(); + return guiObjectValueObject; + } + + /** + * + * + * @generated + */ + public GuiObjectUnNamedList createGuiObjectUnNamedList() { + GuiObjectUnNamedListImpl guiObjectUnNamedList = new GuiObjectUnNamedListImpl(); + return guiObjectUnNamedList; + } + + /** + * + * + * @generated + */ + public GuiObjectNamedList createGuiObjectNamedList() { + GuiObjectNamedListImpl guiObjectNamedList = new GuiObjectNamedListImpl(); + return guiObjectNamedList; + } + + /** + * + * + * @generated + */ + public GuiTimeSerie createGuiTimeSerie() { + GuiTimeSerieImpl guiTimeSerie = new GuiTimeSerieImpl(); + return guiTimeSerie; + } + + /** + * + * + * @generated + */ + public GuiTimeSerieData createGuiTimeSerieData() { + GuiTimeSerieDataImpl guiTimeSerieData = new GuiTimeSerieDataImpl(); + return guiTimeSerieData; + } + + /** + * + * + * @generated + */ + public GuiTable createGuiTable() { + GuiTableImpl guiTable = new GuiTableImpl(); + return guiTable; + } + + /** + * + * + * @generated + */ + public GuiTableColumn createGuiTableColumn() { + GuiTableColumnImpl guiTableColumn = new GuiTableColumnImpl(); + return guiTableColumn; + } + + /** + * + * + * @generated + */ + public GuiTableRow createGuiTableRow() { + GuiTableRowImpl guiTableRow = new GuiTableRowImpl(); + return guiTableRow; + } + + /** + * + * + * @generated + */ + public GuiTableCellString createGuiTableCellString() { + GuiTableCellStringImpl guiTableCellString = new GuiTableCellStringImpl(); + return guiTableCellString; + } + + /** + * + * + * @generated + */ + public GuiTableCellDouble createGuiTableCellDouble() { + GuiTableCellDoubleImpl guiTableCellDouble = new GuiTableCellDoubleImpl(); + return guiTableCellDouble; + } + + /** + * + * + * @generated + */ + public GuiTableCellDate createGuiTableCellDate() { + GuiTableCellDateImpl guiTableCellDate = new GuiTableCellDateImpl(); + return guiTableCellDate; + } + + /** + * + * + * @generated + */ + public GuiTableCellReferences createGuiTableCellReferences() { + GuiTableCellReferencesImpl guiTableCellReferences = new GuiTableCellReferencesImpl(); + return guiTableCellReferences; + } + + /** + * + * + * @generated + */ + public GuiTableCellReference createGuiTableCellReference() { + GuiTableCellReferenceImpl guiTableCellReference = new GuiTableCellReferenceImpl(); + return guiTableCellReference; + } + + /** + * + * + * @generated + */ + public GuiDiagram createGuiDiagram() { + GuiDiagramImpl guiDiagram = new GuiDiagramImpl(); + return guiDiagram; + } + + /** + * + * + * @generated + */ + public GuiDiagramItem createGuiDiagramItem() { + GuiDiagramItemImpl guiDiagramItem = new GuiDiagramItemImpl(); + return guiDiagramItem; + } + + /** + * + * + * @generated + */ + public GuiDiagramRectangle createGuiDiagramRectangle() { + GuiDiagramRectangleImpl guiDiagramRectangle = new GuiDiagramRectangleImpl(); + return guiDiagramRectangle; + } + + /** + * + * + * @generated + */ + public GuiHtml createGuiHtml() { + GuiHtmlImpl guiHtml = new GuiHtmlImpl(); + return guiHtml; + } + + /** + * + * + * @generated + */ + public GuiView createGuiViewFromString(EDataType eDataType, String initialValue) { + GuiView result = GuiView.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertGuiViewToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public GuiTableColumnType createGuiTableColumnTypeFromString(EDataType eDataType, String initialValue) { + GuiTableColumnType result = GuiTableColumnType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertGuiTableColumnTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public Date createDateFromString(EDataType eDataType, String initialValue) { + return (Date)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertDateToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public ModelPackage getModelPackage() { + return (ModelPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ModelPackage getPackage() { + return ModelPackage.eINSTANCE; + } + +} //ModelFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelPackageImpl.java new file mode 100644 index 0000000..c2a2363 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/impl/ModelPackageImpl.java @@ -0,0 +1,1569 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.impl; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTable; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumnType; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTree; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiView; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelFactory; +import org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage; + +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; + +import java.util.Date; + +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.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ModelPackageImpl extends EPackageImpl implements ModelPackage { + /** + * + * + * @generated + */ + private EClass guiClientApiEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTreeEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTreeNodeEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass guiNamedObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueIntegerEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueStringEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueTimeSeriesEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectValueObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectUnNamedListEClass = null; + + /** + * + * + * @generated + */ + private EClass guiObjectNamedListEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTimeSerieEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTimeSerieDataEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableColumnEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableRowEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellStringEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellDoubleEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellDateEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellReferencesEClass = null; + + /** + * + * + * @generated + */ + private EClass guiTableCellReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass guiDiagramEClass = null; + + /** + * + * + * @generated + */ + private EClass guiDiagramItemEClass = null; + + /** + * + * + * @generated + */ + private EClass guiDiagramRectangleEClass = null; + + /** + * + * + * @generated + */ + private EClass guiHtmlEClass = null; + + /** + * + * + * @generated + */ + private EEnum guiViewEEnum = null; + + /** + * + * + * @generated + */ + private EEnum guiTableColumnTypeEEnum = null; + + /** + * + * + * @generated + */ + private EDataType dateEDataType = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link ModelPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ModelPackage init() { + if (isInited) return (ModelPackage)EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI); + + // Obtain or create and register package + ModelPackageImpl theModelPackage = (ModelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ModelPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + GraphPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theModelPackage.createPackageContents(); + + // Initialize created meta-data + theModelPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theModelPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ModelPackage.eNS_URI, theModelPackage); + return theModelPackage; + } + + /** + * + * + * @generated + */ + public EClass getGuiClientApi() { + return guiClientApiEClass; + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetTree() { + return guiClientApiEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetObject__String() { + return guiClientApiEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetTimeSerie__String_String_String_String() { + return guiClientApiEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetTable__String_String_String() { + return guiClientApiEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetHtml__String_String_String() { + return guiClientApiEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getGuiClientApi__GetGraph__String_String_String() { + return guiClientApiEClass.getEOperations().get(5); + } + + /** + * + * + * @generated + */ + public EClass getGuiTree() { + return guiTreeEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiTree_Sections() { + return (EReference)guiTreeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTreeNode() { + return guiTreeNodeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTreeNode_NodeName() { + return (EAttribute)guiTreeNodeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTreeNode_Title() { + return (EAttribute)guiTreeNodeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTreeNode_Tooltip() { + return (EAttribute)guiTreeNodeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTreeNode_Icon() { + return (EAttribute)guiTreeNodeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTreeNode_View() { + return (EAttribute)guiTreeNodeEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getGuiTreeNode_Children() { + return (EReference)guiTreeNodeEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getGuiObject() { + return guiObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiObject_Values() { + return (EReference)guiObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiNamedObject() { + return guiNamedObjectEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiNamedObject_ObjectName() { + return (EAttribute)guiNamedObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValue() { + return guiObjectValueEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValue_ValueName() { + return (EAttribute)guiObjectValueEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValue_Tooltip() { + return (EAttribute)guiObjectValueEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValueInteger() { + return guiObjectValueIntegerEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValueInteger_I() { + return (EAttribute)guiObjectValueIntegerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValueString() { + return guiObjectValueStringEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValueString_V() { + return (EAttribute)guiObjectValueStringEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValueReference() { + return guiObjectValueReferenceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValueReference_Path() { + return (EAttribute)guiObjectValueReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValueTimeSeries() { + return guiObjectValueTimeSeriesEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiObjectValueTimeSeries_Path() { + return (EAttribute)guiObjectValueTimeSeriesEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectValueObject() { + return guiObjectValueObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiObjectValueObject_V() { + return (EReference)guiObjectValueObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectUnNamedList() { + return guiObjectUnNamedListEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiObjectUnNamedList_Objects() { + return (EReference)guiObjectUnNamedListEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiObjectNamedList() { + return guiObjectNamedListEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiObjectNamedList_Objects() { + return (EReference)guiObjectNamedListEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTimeSerie() { + return guiTimeSerieEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_Name() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_XAxisLabel() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_XAxisDateFormat() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_YAxisLabel() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_Start() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_End() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerie_IsRate() { + return (EAttribute)guiTimeSerieEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getGuiTimeSerie_Data() { + return (EReference)guiTimeSerieEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EClass getGuiTimeSerieData() { + return guiTimeSerieDataEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerieData_Time() { + return (EAttribute)guiTimeSerieDataEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerieData_Value() { + return (EAttribute)guiTimeSerieDataEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerieData_Max() { + return (EAttribute)guiTimeSerieDataEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerieData_Min() { + return (EAttribute)guiTimeSerieDataEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTimeSerieData_Num() { + return (EAttribute)guiTimeSerieDataEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getGuiTable() { + return guiTableEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiTable_Columns() { + return (EReference)guiTableEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGuiTable_Rows() { + return (EReference)guiTableEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableColumn() { + return guiTableColumnEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_ColName() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_Tooltip() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_Format() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_Width() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_Hidden() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableColumn_ColumnType() { + return (EAttribute)guiTableColumnEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableRow() { + return guiTableRowEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiTableRow_Cells() { + return (EReference)guiTableRowEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCell() { + return guiTableCellEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCell_Tooltip() { + return (EAttribute)guiTableCellEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCellString() { + return guiTableCellStringEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellString_Value() { + return (EAttribute)guiTableCellStringEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCellDouble() { + return guiTableCellDoubleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellDouble_Value() { + return (EAttribute)guiTableCellDoubleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellDouble_TimeseriesPath() { + return (EAttribute)guiTableCellDoubleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCellDate() { + return guiTableCellDateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellDate_Value() { + return (EAttribute)guiTableCellDateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCellReferences() { + return guiTableCellReferencesEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiTableCellReferences_Refs() { + return (EReference)guiTableCellReferencesEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiTableCellReference() { + return guiTableCellReferenceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellReference_Label() { + return (EAttribute)guiTableCellReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiTableCellReference_Path() { + return (EAttribute)guiTableCellReferenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGuiDiagram() { + return guiDiagramEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiDiagram_Items() { + return (EReference)guiDiagramEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiDiagramItem() { + return guiDiagramItemEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiDiagramItem_Tooltip() { + return (EAttribute)guiDiagramItemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getGuiDiagramRectangle() { + return guiDiagramRectangleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiDiagramRectangle_X() { + return (EAttribute)guiDiagramRectangleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiDiagramRectangle_Y() { + return (EAttribute)guiDiagramRectangleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiDiagramRectangle_H() { + return (EAttribute)guiDiagramRectangleEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiDiagramRectangle_W() { + return (EAttribute)guiDiagramRectangleEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getGuiHtml() { + return guiHtmlEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiHtml_Html() { + return (EAttribute)guiHtmlEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getGuiView() { + return guiViewEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getGuiTableColumnType() { + return guiTableColumnTypeEEnum; + } + + /** + * + * + * @generated + */ + public EDataType getDate() { + return dateEDataType; + } + + /** + * + * + * @generated + */ + public ModelFactory getModelFactory() { + return (ModelFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + guiClientApiEClass = createEClass(GUI_CLIENT_API); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_TREE); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_OBJECT__STRING); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_TIME_SERIE__STRING_STRING_STRING_STRING); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_TABLE__STRING_STRING_STRING); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_HTML__STRING_STRING_STRING); + createEOperation(guiClientApiEClass, GUI_CLIENT_API___GET_GRAPH__STRING_STRING_STRING); + + guiTreeEClass = createEClass(GUI_TREE); + createEReference(guiTreeEClass, GUI_TREE__SECTIONS); + + guiTreeNodeEClass = createEClass(GUI_TREE_NODE); + createEAttribute(guiTreeNodeEClass, GUI_TREE_NODE__NODE_NAME); + createEAttribute(guiTreeNodeEClass, GUI_TREE_NODE__TITLE); + createEAttribute(guiTreeNodeEClass, GUI_TREE_NODE__TOOLTIP); + createEAttribute(guiTreeNodeEClass, GUI_TREE_NODE__ICON); + createEAttribute(guiTreeNodeEClass, GUI_TREE_NODE__VIEW); + createEReference(guiTreeNodeEClass, GUI_TREE_NODE__CHILDREN); + + guiObjectEClass = createEClass(GUI_OBJECT); + createEReference(guiObjectEClass, GUI_OBJECT__VALUES); + + guiNamedObjectEClass = createEClass(GUI_NAMED_OBJECT); + createEAttribute(guiNamedObjectEClass, GUI_NAMED_OBJECT__OBJECT_NAME); + + guiObjectValueEClass = createEClass(GUI_OBJECT_VALUE); + createEAttribute(guiObjectValueEClass, GUI_OBJECT_VALUE__VALUE_NAME); + createEAttribute(guiObjectValueEClass, GUI_OBJECT_VALUE__TOOLTIP); + + guiObjectValueIntegerEClass = createEClass(GUI_OBJECT_VALUE_INTEGER); + createEAttribute(guiObjectValueIntegerEClass, GUI_OBJECT_VALUE_INTEGER__I); + + guiObjectValueStringEClass = createEClass(GUI_OBJECT_VALUE_STRING); + createEAttribute(guiObjectValueStringEClass, GUI_OBJECT_VALUE_STRING__V); + + guiObjectValueReferenceEClass = createEClass(GUI_OBJECT_VALUE_REFERENCE); + createEAttribute(guiObjectValueReferenceEClass, GUI_OBJECT_VALUE_REFERENCE__PATH); + + guiObjectValueTimeSeriesEClass = createEClass(GUI_OBJECT_VALUE_TIME_SERIES); + createEAttribute(guiObjectValueTimeSeriesEClass, GUI_OBJECT_VALUE_TIME_SERIES__PATH); + + guiObjectValueObjectEClass = createEClass(GUI_OBJECT_VALUE_OBJECT); + createEReference(guiObjectValueObjectEClass, GUI_OBJECT_VALUE_OBJECT__V); + + guiObjectUnNamedListEClass = createEClass(GUI_OBJECT_UN_NAMED_LIST); + createEReference(guiObjectUnNamedListEClass, GUI_OBJECT_UN_NAMED_LIST__OBJECTS); + + guiObjectNamedListEClass = createEClass(GUI_OBJECT_NAMED_LIST); + createEReference(guiObjectNamedListEClass, GUI_OBJECT_NAMED_LIST__OBJECTS); + + guiTimeSerieEClass = createEClass(GUI_TIME_SERIE); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__NAME); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__XAXIS_LABEL); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__XAXIS_DATE_FORMAT); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__YAXIS_LABEL); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__START); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__END); + createEAttribute(guiTimeSerieEClass, GUI_TIME_SERIE__IS_RATE); + createEReference(guiTimeSerieEClass, GUI_TIME_SERIE__DATA); + + guiTimeSerieDataEClass = createEClass(GUI_TIME_SERIE_DATA); + createEAttribute(guiTimeSerieDataEClass, GUI_TIME_SERIE_DATA__TIME); + createEAttribute(guiTimeSerieDataEClass, GUI_TIME_SERIE_DATA__VALUE); + createEAttribute(guiTimeSerieDataEClass, GUI_TIME_SERIE_DATA__MAX); + createEAttribute(guiTimeSerieDataEClass, GUI_TIME_SERIE_DATA__MIN); + createEAttribute(guiTimeSerieDataEClass, GUI_TIME_SERIE_DATA__NUM); + + guiTableEClass = createEClass(GUI_TABLE); + createEReference(guiTableEClass, GUI_TABLE__COLUMNS); + createEReference(guiTableEClass, GUI_TABLE__ROWS); + + guiTableColumnEClass = createEClass(GUI_TABLE_COLUMN); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__COL_NAME); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__TOOLTIP); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__FORMAT); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__WIDTH); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__HIDDEN); + createEAttribute(guiTableColumnEClass, GUI_TABLE_COLUMN__COLUMN_TYPE); + + guiTableRowEClass = createEClass(GUI_TABLE_ROW); + createEReference(guiTableRowEClass, GUI_TABLE_ROW__CELLS); + + guiTableCellEClass = createEClass(GUI_TABLE_CELL); + createEAttribute(guiTableCellEClass, GUI_TABLE_CELL__TOOLTIP); + + guiTableCellStringEClass = createEClass(GUI_TABLE_CELL_STRING); + createEAttribute(guiTableCellStringEClass, GUI_TABLE_CELL_STRING__VALUE); + + guiTableCellDoubleEClass = createEClass(GUI_TABLE_CELL_DOUBLE); + createEAttribute(guiTableCellDoubleEClass, GUI_TABLE_CELL_DOUBLE__VALUE); + createEAttribute(guiTableCellDoubleEClass, GUI_TABLE_CELL_DOUBLE__TIMESERIES_PATH); + + guiTableCellDateEClass = createEClass(GUI_TABLE_CELL_DATE); + createEAttribute(guiTableCellDateEClass, GUI_TABLE_CELL_DATE__VALUE); + + guiTableCellReferencesEClass = createEClass(GUI_TABLE_CELL_REFERENCES); + createEReference(guiTableCellReferencesEClass, GUI_TABLE_CELL_REFERENCES__REFS); + + guiTableCellReferenceEClass = createEClass(GUI_TABLE_CELL_REFERENCE); + createEAttribute(guiTableCellReferenceEClass, GUI_TABLE_CELL_REFERENCE__LABEL); + createEAttribute(guiTableCellReferenceEClass, GUI_TABLE_CELL_REFERENCE__PATH); + + guiDiagramEClass = createEClass(GUI_DIAGRAM); + createEReference(guiDiagramEClass, GUI_DIAGRAM__ITEMS); + + guiDiagramItemEClass = createEClass(GUI_DIAGRAM_ITEM); + createEAttribute(guiDiagramItemEClass, GUI_DIAGRAM_ITEM__TOOLTIP); + + guiDiagramRectangleEClass = createEClass(GUI_DIAGRAM_RECTANGLE); + createEAttribute(guiDiagramRectangleEClass, GUI_DIAGRAM_RECTANGLE__X); + createEAttribute(guiDiagramRectangleEClass, GUI_DIAGRAM_RECTANGLE__Y); + createEAttribute(guiDiagramRectangleEClass, GUI_DIAGRAM_RECTANGLE__H); + createEAttribute(guiDiagramRectangleEClass, GUI_DIAGRAM_RECTANGLE__W); + + guiHtmlEClass = createEClass(GUI_HTML); + createEAttribute(guiHtmlEClass, GUI_HTML__HTML); + + // Create enums + guiViewEEnum = createEEnum(GUI_VIEW); + guiTableColumnTypeEEnum = createEEnum(GUI_TABLE_COLUMN_TYPE); + + // Create data types + dateEDataType = createEDataType(DATE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + GraphPackage theGraphPackage = (GraphPackage)EPackage.Registry.INSTANCE.getEPackage(GraphPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + guiNamedObjectEClass.getESuperTypes().add(this.getGuiObject()); + guiObjectValueIntegerEClass.getESuperTypes().add(this.getGuiObjectValue()); + guiObjectValueStringEClass.getESuperTypes().add(this.getGuiObjectValue()); + guiObjectValueReferenceEClass.getESuperTypes().add(this.getGuiObjectValueString()); + guiObjectValueTimeSeriesEClass.getESuperTypes().add(this.getGuiObjectValueString()); + guiObjectValueObjectEClass.getESuperTypes().add(this.getGuiObjectValue()); + guiObjectUnNamedListEClass.getESuperTypes().add(this.getGuiObjectValue()); + guiObjectNamedListEClass.getESuperTypes().add(this.getGuiObjectValue()); + guiTableCellStringEClass.getESuperTypes().add(this.getGuiTableCell()); + guiTableCellDoubleEClass.getESuperTypes().add(this.getGuiTableCell()); + guiTableCellDateEClass.getESuperTypes().add(this.getGuiTableCell()); + guiTableCellReferencesEClass.getESuperTypes().add(this.getGuiTableCell()); + guiDiagramRectangleEClass.getESuperTypes().add(this.getGuiDiagramItem()); + + // Initialize classes, features, and operations; add parameters + initEClass(guiClientApiEClass, GuiClientApi.class, "GuiClientApi", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEOperation(getGuiClientApi__GetTree(), this.getGuiTree(), "getTree", 0, 1, !IS_UNIQUE, IS_ORDERED); + + EOperation op = initEOperation(getGuiClientApi__GetObject__String(), this.getGuiObject(), "getObject", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getGuiClientApi__GetTimeSerie__String_String_String_String(), this.getGuiTimeSerie(), "getTimeSerie", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "duration", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getGuiClientApi__GetTable__String_String_String(), this.getGuiTable(), "getTable", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getGuiClientApi__GetHtml__String_String_String(), this.getGuiHtml(), "getHtml", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getGuiClientApi__GetGraph__String_String_String(), theGraphPackage.getGuiGraph(), "getGraph", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(guiTreeEClass, GuiTree.class, "GuiTree", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiTree_Sections(), this.getGuiTreeNode(), null, "sections", null, 0, -1, GuiTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTreeNodeEClass, GuiTreeNode.class, "GuiTreeNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTreeNode_NodeName(), theEcorePackage.getEString(), "nodeName", null, 0, 1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTreeNode_Title(), theEcorePackage.getEString(), "title", null, 0, 1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTreeNode_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTreeNode_Icon(), theEcorePackage.getEString(), "icon", null, 0, 1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTreeNode_View(), this.getGuiView(), "view", null, 0, 1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGuiTreeNode_Children(), this.getGuiTreeNode(), null, "children", null, 0, -1, GuiTreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectEClass, GuiObject.class, "GuiObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiObject_Values(), this.getGuiObjectValue(), null, "values", null, 0, -1, GuiObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiNamedObjectEClass, GuiNamedObject.class, "GuiNamedObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiNamedObject_ObjectName(), theEcorePackage.getEString(), "objectName", null, 0, 1, GuiNamedObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueEClass, GuiObjectValue.class, "GuiObjectValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiObjectValue_ValueName(), theEcorePackage.getEString(), "valueName", null, 0, 1, GuiObjectValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiObjectValue_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiObjectValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueIntegerEClass, GuiObjectValueInteger.class, "GuiObjectValueInteger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiObjectValueInteger_I(), theEcorePackage.getEInt(), "i", null, 0, 1, GuiObjectValueInteger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueStringEClass, GuiObjectValueString.class, "GuiObjectValueString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiObjectValueString_V(), theEcorePackage.getEString(), "v", null, 0, 1, GuiObjectValueString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueReferenceEClass, GuiObjectValueReference.class, "GuiObjectValueReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiObjectValueReference_Path(), theEcorePackage.getEString(), "path", null, 0, 1, GuiObjectValueReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueTimeSeriesEClass, GuiObjectValueTimeSeries.class, "GuiObjectValueTimeSeries", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiObjectValueTimeSeries_Path(), theEcorePackage.getEString(), "path", null, 0, 1, GuiObjectValueTimeSeries.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectValueObjectEClass, GuiObjectValueObject.class, "GuiObjectValueObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiObjectValueObject_V(), this.getGuiObject(), null, "v", null, 0, 1, GuiObjectValueObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectUnNamedListEClass, GuiObjectUnNamedList.class, "GuiObjectUnNamedList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiObjectUnNamedList_Objects(), this.getGuiObject(), null, "objects", null, 0, -1, GuiObjectUnNamedList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiObjectNamedListEClass, GuiObjectNamedList.class, "GuiObjectNamedList", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiObjectNamedList_Objects(), this.getGuiNamedObject(), null, "objects", null, 0, -1, GuiObjectNamedList.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTimeSerieEClass, GuiTimeSerie.class, "GuiTimeSerie", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTimeSerie_Name(), theEcorePackage.getEString(), "name", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_XAxisLabel(), theEcorePackage.getEString(), "xAxisLabel", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_XAxisDateFormat(), theEcorePackage.getEString(), "xAxisDateFormat", "MM-dd HH:mm", 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_YAxisLabel(), theEcorePackage.getEString(), "yAxisLabel", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_Start(), this.getDate(), "start", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_End(), this.getDate(), "end", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerie_IsRate(), theEcorePackage.getEBoolean(), "isRate", null, 0, 1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGuiTimeSerie_Data(), this.getGuiTimeSerieData(), null, "data", null, 0, -1, GuiTimeSerie.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTimeSerieDataEClass, GuiTimeSerieData.class, "GuiTimeSerieData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTimeSerieData_Time(), this.getDate(), "time", null, 0, 1, GuiTimeSerieData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerieData_Value(), theEcorePackage.getEDouble(), "value", null, 0, 1, GuiTimeSerieData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerieData_Max(), theEcorePackage.getEDoubleObject(), "max", null, 0, 1, GuiTimeSerieData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerieData_Min(), theEcorePackage.getEDoubleObject(), "min", null, 0, 1, GuiTimeSerieData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTimeSerieData_Num(), theEcorePackage.getEInt(), "num", null, 0, 1, GuiTimeSerieData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableEClass, GuiTable.class, "GuiTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiTable_Columns(), this.getGuiTableColumn(), null, "columns", null, 0, -1, GuiTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGuiTable_Rows(), this.getGuiTableRow(), null, "rows", null, 0, -1, GuiTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableColumnEClass, GuiTableColumn.class, "GuiTableColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableColumn_ColName(), theEcorePackage.getEString(), "colName", null, 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableColumn_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableColumn_Format(), theEcorePackage.getEString(), "format", null, 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableColumn_Width(), theEcorePackage.getEInt(), "width", "0", 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableColumn_Hidden(), theEcorePackage.getEBoolean(), "hidden", "false", 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableColumn_ColumnType(), this.getGuiTableColumnType(), "columnType", null, 0, 1, GuiTableColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableRowEClass, GuiTableRow.class, "GuiTableRow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiTableRow_Cells(), this.getGuiTableCell(), null, "cells", null, 0, -1, GuiTableRow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellEClass, GuiTableCell.class, "GuiTableCell", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableCell_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiTableCell.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellStringEClass, GuiTableCellString.class, "GuiTableCellString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableCellString_Value(), theEcorePackage.getEString(), "value", null, 0, 1, GuiTableCellString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellDoubleEClass, GuiTableCellDouble.class, "GuiTableCellDouble", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableCellDouble_Value(), theEcorePackage.getEDouble(), "value", null, 0, 1, GuiTableCellDouble.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableCellDouble_TimeseriesPath(), theEcorePackage.getEString(), "timeseriesPath", null, 0, 1, GuiTableCellDouble.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellDateEClass, GuiTableCellDate.class, "GuiTableCellDate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableCellDate_Value(), this.getDate(), "value", null, 0, 1, GuiTableCellDate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellReferencesEClass, GuiTableCellReferences.class, "GuiTableCellReferences", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiTableCellReferences_Refs(), this.getGuiTableCellReference(), null, "refs", null, 0, -1, GuiTableCellReferences.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiTableCellReferenceEClass, GuiTableCellReference.class, "GuiTableCellReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiTableCellReference_Label(), theEcorePackage.getEString(), "label", null, 0, 1, GuiTableCellReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiTableCellReference_Path(), theEcorePackage.getEString(), "path", null, 0, 1, GuiTableCellReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiDiagramEClass, GuiDiagram.class, "GuiDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiDiagram_Items(), this.getGuiDiagramItem(), null, "items", null, 0, -1, GuiDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiDiagramItemEClass, GuiDiagramItem.class, "GuiDiagramItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiDiagramItem_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiDiagramItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiDiagramRectangleEClass, GuiDiagramRectangle.class, "GuiDiagramRectangle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiDiagramRectangle_X(), theEcorePackage.getEInt(), "x", null, 0, 1, GuiDiagramRectangle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiDiagramRectangle_Y(), theEcorePackage.getEInt(), "y", null, 0, 1, GuiDiagramRectangle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiDiagramRectangle_H(), theEcorePackage.getEInt(), "h", null, 0, 1, GuiDiagramRectangle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiDiagramRectangle_W(), theEcorePackage.getEInt(), "w", null, 0, 1, GuiDiagramRectangle.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiHtmlEClass, GuiHtml.class, "GuiHtml", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiHtml_Html(), theEcorePackage.getEString(), "html", null, 0, 1, GuiHtml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(guiViewEEnum, GuiView.class, "GuiView"); + addEEnumLiteral(guiViewEEnum, GuiView.NONE); + addEEnumLiteral(guiViewEEnum, GuiView.OBJECT); + addEEnumLiteral(guiViewEEnum, GuiView.TIMESERIES); + addEEnumLiteral(guiViewEEnum, GuiView.BIRTREPORT); + addEEnumLiteral(guiViewEEnum, GuiView.HTML); + addEEnumLiteral(guiViewEEnum, GuiView.TABLE); + + initEEnum(guiTableColumnTypeEEnum, GuiTableColumnType.class, "GuiTableColumnType"); + addEEnumLiteral(guiTableColumnTypeEEnum, GuiTableColumnType.STRING); + addEEnumLiteral(guiTableColumnTypeEEnum, GuiTableColumnType.DOUBLE); + addEEnumLiteral(guiTableColumnTypeEEnum, GuiTableColumnType.DATE); + addEEnumLiteral(guiTableColumnTypeEEnum, GuiTableColumnType.REF_LIST); + + // Initialize data types + initEDataType(dateEDataType, Date.class, "Date", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "GenModel", "http://www.eclipse.org/emf/2002/GenModel" + }); + } + +} //ModelPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelAdapterFactory.java new file mode 100644 index 0000000..f47e797 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelAdapterFactory.java @@ -0,0 +1,627 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.util; + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage + * @generated + */ +public class ModelAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ModelPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ModelAdapterFactory() { + if (modelPackage == null) { + modelPackage = ModelPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ModelSwitch modelSwitch = + new ModelSwitch() { + @Override + public Adapter caseGuiClientApi(GuiClientApi object) { + return createGuiClientApiAdapter(); + } + @Override + public Adapter caseGuiTree(GuiTree object) { + return createGuiTreeAdapter(); + } + @Override + public Adapter caseGuiTreeNode(GuiTreeNode object) { + return createGuiTreeNodeAdapter(); + } + @Override + public Adapter caseGuiObject(GuiObject object) { + return createGuiObjectAdapter(); + } + @Override + public Adapter caseGuiNamedObject(GuiNamedObject object) { + return createGuiNamedObjectAdapter(); + } + @Override + public Adapter caseGuiObjectValue(GuiObjectValue object) { + return createGuiObjectValueAdapter(); + } + @Override + public Adapter caseGuiObjectValueInteger(GuiObjectValueInteger object) { + return createGuiObjectValueIntegerAdapter(); + } + @Override + public Adapter caseGuiObjectValueString(GuiObjectValueString object) { + return createGuiObjectValueStringAdapter(); + } + @Override + public Adapter caseGuiObjectValueReference(GuiObjectValueReference object) { + return createGuiObjectValueReferenceAdapter(); + } + @Override + public Adapter caseGuiObjectValueTimeSeries(GuiObjectValueTimeSeries object) { + return createGuiObjectValueTimeSeriesAdapter(); + } + @Override + public Adapter caseGuiObjectValueObject(GuiObjectValueObject object) { + return createGuiObjectValueObjectAdapter(); + } + @Override + public Adapter caseGuiObjectUnNamedList(GuiObjectUnNamedList object) { + return createGuiObjectUnNamedListAdapter(); + } + @Override + public Adapter caseGuiObjectNamedList(GuiObjectNamedList object) { + return createGuiObjectNamedListAdapter(); + } + @Override + public Adapter caseGuiTimeSerie(GuiTimeSerie object) { + return createGuiTimeSerieAdapter(); + } + @Override + public Adapter caseGuiTimeSerieData(GuiTimeSerieData object) { + return createGuiTimeSerieDataAdapter(); + } + @Override + public Adapter caseGuiTable(GuiTable object) { + return createGuiTableAdapter(); + } + @Override + public Adapter caseGuiTableColumn(GuiTableColumn object) { + return createGuiTableColumnAdapter(); + } + @Override + public Adapter caseGuiTableRow(GuiTableRow object) { + return createGuiTableRowAdapter(); + } + @Override + public Adapter caseGuiTableCell(GuiTableCell object) { + return createGuiTableCellAdapter(); + } + @Override + public Adapter caseGuiTableCellString(GuiTableCellString object) { + return createGuiTableCellStringAdapter(); + } + @Override + public Adapter caseGuiTableCellDouble(GuiTableCellDouble object) { + return createGuiTableCellDoubleAdapter(); + } + @Override + public Adapter caseGuiTableCellDate(GuiTableCellDate object) { + return createGuiTableCellDateAdapter(); + } + @Override + public Adapter caseGuiTableCellReferences(GuiTableCellReferences object) { + return createGuiTableCellReferencesAdapter(); + } + @Override + public Adapter caseGuiTableCellReference(GuiTableCellReference object) { + return createGuiTableCellReferenceAdapter(); + } + @Override + public Adapter caseGuiDiagram(GuiDiagram object) { + return createGuiDiagramAdapter(); + } + @Override + public Adapter caseGuiDiagramItem(GuiDiagramItem object) { + return createGuiDiagramItemAdapter(); + } + @Override + public Adapter caseGuiDiagramRectangle(GuiDiagramRectangle object) { + return createGuiDiagramRectangleAdapter(); + } + @Override + public Adapter caseGuiHtml(GuiHtml object) { + return createGuiHtmlAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi Gui Client Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi + * @generated + */ + public Adapter createGuiClientApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTree Gui Tree}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTree + * @generated + */ + public Adapter createGuiTreeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode Gui Tree Node}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTreeNode + * @generated + */ + public Adapter createGuiTreeNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObject Gui Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObject + * @generated + */ + public Adapter createGuiObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject Gui Named Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiNamedObject + * @generated + */ + public Adapter createGuiNamedObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue Gui Object Value}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValue + * @generated + */ + public Adapter createGuiObjectValueAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger Gui Object Value Integer}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueInteger + * @generated + */ + public Adapter createGuiObjectValueIntegerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString Gui Object Value String}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueString + * @generated + */ + public Adapter createGuiObjectValueStringAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference Gui Object Value Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueReference + * @generated + */ + public Adapter createGuiObjectValueReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries Gui Object Value Time Series}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueTimeSeries + * @generated + */ + public Adapter createGuiObjectValueTimeSeriesAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject Gui Object Value Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectValueObject + * @generated + */ + public Adapter createGuiObjectValueObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList Gui Object Un Named List}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectUnNamedList + * @generated + */ + public Adapter createGuiObjectUnNamedListAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList Gui Object Named List}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiObjectNamedList + * @generated + */ + public Adapter createGuiObjectNamedListAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie Gui Time Serie}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie + * @generated + */ + public Adapter createGuiTimeSerieAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData Gui Time Serie Data}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerieData + * @generated + */ + public Adapter createGuiTimeSerieDataAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTable Gui Table}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTable + * @generated + */ + public Adapter createGuiTableAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn Gui Table Column}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableColumn + * @generated + */ + public Adapter createGuiTableColumnAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow Gui Table Row}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableRow + * @generated + */ + public Adapter createGuiTableRowAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell Gui Table Cell}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCell + * @generated + */ + public Adapter createGuiTableCellAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString Gui Table Cell String}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellString + * @generated + */ + public Adapter createGuiTableCellStringAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble Gui Table Cell Double}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDouble + * @generated + */ + public Adapter createGuiTableCellDoubleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate Gui Table Cell Date}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellDate + * @generated + */ + public Adapter createGuiTableCellDateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences Gui Table Cell References}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReferences + * @generated + */ + public Adapter createGuiTableCellReferencesAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference Gui Table Cell Reference}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiTableCellReference + * @generated + */ + public Adapter createGuiTableCellReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram Gui Diagram}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagram + * @generated + */ + public Adapter createGuiDiagramAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem Gui Diagram Item}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramItem + * @generated + */ + public Adapter createGuiDiagramItemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle Gui Diagram Rectangle}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiDiagramRectangle + * @generated + */ + public Adapter createGuiDiagramRectangleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml Gui Html}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml + * @generated + */ + public Adapter createGuiHtmlAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ModelAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelSwitch.java new file mode 100644 index 0000000..cd6aa77 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/gwt/siriusportal/model/util/ModelSwitch.java @@ -0,0 +1,713 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.gwt.siriusportal.model.util; + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.gwt.siriusportal.model.ModelPackage + * @generated + */ +public class ModelSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ModelPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ModelSwitch() { + if (modelPackage == null) { + modelPackage = ModelPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ModelPackage.GUI_CLIENT_API: { + GuiClientApi guiClientApi = (GuiClientApi)theEObject; + T result = caseGuiClientApi(guiClientApi); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TREE: { + GuiTree guiTree = (GuiTree)theEObject; + T result = caseGuiTree(guiTree); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TREE_NODE: { + GuiTreeNode guiTreeNode = (GuiTreeNode)theEObject; + T result = caseGuiTreeNode(guiTreeNode); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT: { + GuiObject guiObject = (GuiObject)theEObject; + T result = caseGuiObject(guiObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_NAMED_OBJECT: { + GuiNamedObject guiNamedObject = (GuiNamedObject)theEObject; + T result = caseGuiNamedObject(guiNamedObject); + if (result == null) result = caseGuiObject(guiNamedObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE: { + GuiObjectValue guiObjectValue = (GuiObjectValue)theEObject; + T result = caseGuiObjectValue(guiObjectValue); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE_INTEGER: { + GuiObjectValueInteger guiObjectValueInteger = (GuiObjectValueInteger)theEObject; + T result = caseGuiObjectValueInteger(guiObjectValueInteger); + if (result == null) result = caseGuiObjectValue(guiObjectValueInteger); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE_STRING: { + GuiObjectValueString guiObjectValueString = (GuiObjectValueString)theEObject; + T result = caseGuiObjectValueString(guiObjectValueString); + if (result == null) result = caseGuiObjectValue(guiObjectValueString); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE_REFERENCE: { + GuiObjectValueReference guiObjectValueReference = (GuiObjectValueReference)theEObject; + T result = caseGuiObjectValueReference(guiObjectValueReference); + if (result == null) result = caseGuiObjectValueString(guiObjectValueReference); + if (result == null) result = caseGuiObjectValue(guiObjectValueReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE_TIME_SERIES: { + GuiObjectValueTimeSeries guiObjectValueTimeSeries = (GuiObjectValueTimeSeries)theEObject; + T result = caseGuiObjectValueTimeSeries(guiObjectValueTimeSeries); + if (result == null) result = caseGuiObjectValueString(guiObjectValueTimeSeries); + if (result == null) result = caseGuiObjectValue(guiObjectValueTimeSeries); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_VALUE_OBJECT: { + GuiObjectValueObject guiObjectValueObject = (GuiObjectValueObject)theEObject; + T result = caseGuiObjectValueObject(guiObjectValueObject); + if (result == null) result = caseGuiObjectValue(guiObjectValueObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_UN_NAMED_LIST: { + GuiObjectUnNamedList guiObjectUnNamedList = (GuiObjectUnNamedList)theEObject; + T result = caseGuiObjectUnNamedList(guiObjectUnNamedList); + if (result == null) result = caseGuiObjectValue(guiObjectUnNamedList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_OBJECT_NAMED_LIST: { + GuiObjectNamedList guiObjectNamedList = (GuiObjectNamedList)theEObject; + T result = caseGuiObjectNamedList(guiObjectNamedList); + if (result == null) result = caseGuiObjectValue(guiObjectNamedList); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TIME_SERIE: { + GuiTimeSerie guiTimeSerie = (GuiTimeSerie)theEObject; + T result = caseGuiTimeSerie(guiTimeSerie); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TIME_SERIE_DATA: { + GuiTimeSerieData guiTimeSerieData = (GuiTimeSerieData)theEObject; + T result = caseGuiTimeSerieData(guiTimeSerieData); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE: { + GuiTable guiTable = (GuiTable)theEObject; + T result = caseGuiTable(guiTable); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_COLUMN: { + GuiTableColumn guiTableColumn = (GuiTableColumn)theEObject; + T result = caseGuiTableColumn(guiTableColumn); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_ROW: { + GuiTableRow guiTableRow = (GuiTableRow)theEObject; + T result = caseGuiTableRow(guiTableRow); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL: { + GuiTableCell guiTableCell = (GuiTableCell)theEObject; + T result = caseGuiTableCell(guiTableCell); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL_STRING: { + GuiTableCellString guiTableCellString = (GuiTableCellString)theEObject; + T result = caseGuiTableCellString(guiTableCellString); + if (result == null) result = caseGuiTableCell(guiTableCellString); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL_DOUBLE: { + GuiTableCellDouble guiTableCellDouble = (GuiTableCellDouble)theEObject; + T result = caseGuiTableCellDouble(guiTableCellDouble); + if (result == null) result = caseGuiTableCell(guiTableCellDouble); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL_DATE: { + GuiTableCellDate guiTableCellDate = (GuiTableCellDate)theEObject; + T result = caseGuiTableCellDate(guiTableCellDate); + if (result == null) result = caseGuiTableCell(guiTableCellDate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL_REFERENCES: { + GuiTableCellReferences guiTableCellReferences = (GuiTableCellReferences)theEObject; + T result = caseGuiTableCellReferences(guiTableCellReferences); + if (result == null) result = caseGuiTableCell(guiTableCellReferences); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_TABLE_CELL_REFERENCE: { + GuiTableCellReference guiTableCellReference = (GuiTableCellReference)theEObject; + T result = caseGuiTableCellReference(guiTableCellReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_DIAGRAM: { + GuiDiagram guiDiagram = (GuiDiagram)theEObject; + T result = caseGuiDiagram(guiDiagram); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_DIAGRAM_ITEM: { + GuiDiagramItem guiDiagramItem = (GuiDiagramItem)theEObject; + T result = caseGuiDiagramItem(guiDiagramItem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_DIAGRAM_RECTANGLE: { + GuiDiagramRectangle guiDiagramRectangle = (GuiDiagramRectangle)theEObject; + T result = caseGuiDiagramRectangle(guiDiagramRectangle); + if (result == null) result = caseGuiDiagramItem(guiDiagramRectangle); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ModelPackage.GUI_HTML: { + GuiHtml guiHtml = (GuiHtml)theEObject; + T result = caseGuiHtml(guiHtml); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Client Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Client Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiClientApi(GuiClientApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Tree'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Tree'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTree(GuiTree object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Tree Node'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Tree Node'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTreeNode(GuiTreeNode object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObject(GuiObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Named Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Named Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiNamedObject(GuiNamedObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValue(GuiObjectValue object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value Integer'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value Integer'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValueInteger(GuiObjectValueInteger object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value String'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value String'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValueString(GuiObjectValueString object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValueReference(GuiObjectValueReference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value Time Series'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value Time Series'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValueTimeSeries(GuiObjectValueTimeSeries object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Value Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Value Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectValueObject(GuiObjectValueObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Un Named List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Un Named List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectUnNamedList(GuiObjectUnNamedList object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Object Named List'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Object Named List'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiObjectNamedList(GuiObjectNamedList object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Time Serie'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Time Serie'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTimeSerie(GuiTimeSerie object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Time Serie Data'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Time Serie Data'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTimeSerieData(GuiTimeSerieData object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTable(GuiTable object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Column'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Column'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableColumn(GuiTableColumn object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Row'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Row'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableRow(GuiTableRow object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCell(GuiTableCell object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell String'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell String'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCellString(GuiTableCellString object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell Double'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell Double'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCellDouble(GuiTableCellDouble object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell Date'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell Date'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCellDate(GuiTableCellDate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell References'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell References'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCellReferences(GuiTableCellReferences object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Table Cell Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Table Cell Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiTableCellReference(GuiTableCellReference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Diagram'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Diagram'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiDiagram(GuiDiagram object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Diagram Item'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Diagram Item'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiDiagramItem(GuiDiagramItem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Diagram Rectangle'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Diagram Rectangle'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiDiagramRectangle(GuiDiagramRectangle object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Html'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Html'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiHtml(GuiHtml object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ModelSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllerModel.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllerModel.java new file mode 100644 index 0000000..3301abc --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllerModel.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.sirius.manager.controllermodel; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Controller Model'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTemplateDirectory Template Directory}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPluginName Plugin Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPrefix Prefix}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel() + * @model + * @generated + */ +public interface ControllerModel extends EObject { + /** + * Returns the value of the 'Template Directory' attribute. + * + *

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

+ * + * @return the value of the 'Template Directory' attribute. + * @see #setTemplateDirectory(String) + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel_TemplateDirectory() + * @model unique="false" + * @generated + */ + String getTemplateDirectory(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTemplateDirectory Template Directory}' attribute. + * + * + * @param value the new value of the 'Template Directory' attribute. + * @see #getTemplateDirectory() + * @generated + */ + void setTemplateDirectory(String value); + + /** + * Returns the value of the 'Plugin Name' attribute. + * + *

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

+ * + * @return the value of the 'Plugin Name' attribute. + * @see #setPluginName(String) + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel_PluginName() + * @model unique="false" + * @generated + */ + String getPluginName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPluginName Plugin Name}' attribute. + * + * + * @param value the new value of the 'Plugin Name' attribute. + * @see #getPluginName() + * @generated + */ + void setPluginName(String value); + + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Title' attribute. + * + *

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

+ * + * @return the value of the 'Title' attribute. + * @see #setTitle(String) + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel_Title() + * @model unique="false" + * @generated + */ + String getTitle(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTitle Title}' attribute. + * + * + * @param value the new value of the 'Title' attribute. + * @see #getTitle() + * @generated + */ + void setTitle(String value); + + /** + * Returns the value of the 'Prefix' attribute. + * + *

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

+ * + * @return the value of the 'Prefix' attribute. + * @see #setPrefix(String) + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage#getControllerModel_Prefix() + * @model unique="false" + * @generated + */ + String getPrefix(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPrefix Prefix}' attribute. + * + * + * @param value the new value of the 'Prefix' attribute. + * @see #getPrefix() + * @generated + */ + void setPrefix(String value); + +} // ControllerModel diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelFactory.java new file mode 100644 index 0000000..7e9fc3b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelFactory.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.sirius.manager.controllermodel; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage + * @generated + */ +public interface ControllermodelFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ControllermodelFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllermodelFactoryImpl.init(); + + /** + * Returns a new object of class 'Controller Model'. + * + * + * @return a new object of class 'Controller Model'. + * @generated + */ + ControllerModel createControllerModel(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ControllermodelPackage getControllermodelPackage(); + +} //ControllermodelFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelPackage.java new file mode 100644 index 0000000..dde38a7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/ControllermodelPackage.java @@ -0,0 +1,294 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.controllermodel; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager'" + * @generated + */ +public interface ControllermodelPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "controllermodel"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.controllermodel"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "controllermodel"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ControllermodelPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllermodelPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl Controller Model}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl + * @see org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllermodelPackageImpl#getControllerModel() + * @generated + */ + int CONTROLLER_MODEL = 0; + + /** + * The feature id for the 'Template Directory' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL__TEMPLATE_DIRECTORY = 0; + + /** + * The feature id for the 'Plugin Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL__PLUGIN_NAME = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL__NAME = 2; + + /** + * The feature id for the 'Title' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL__TITLE = 3; + + /** + * The feature id for the 'Prefix' attribute. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL__PREFIX = 4; + + /** + * The number of structural features of the 'Controller Model' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL_FEATURE_COUNT = 5; + + /** + * The number of operations of the 'Controller Model' class. + * + * + * @generated + * @ordered + */ + int CONTROLLER_MODEL_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel Controller Model}'. + * + * + * @return the meta object for class 'Controller Model'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel + * @generated + */ + EClass getControllerModel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTemplateDirectory Template Directory}'. + * + * + * @return the meta object for the attribute 'Template Directory'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTemplateDirectory() + * @see #getControllerModel() + * @generated + */ + EAttribute getControllerModel_TemplateDirectory(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPluginName Plugin Name}'. + * + * + * @return the meta object for the attribute 'Plugin Name'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPluginName() + * @see #getControllerModel() + * @generated + */ + EAttribute getControllerModel_PluginName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getName() + * @see #getControllerModel() + * @generated + */ + EAttribute getControllerModel_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTitle Title}'. + * + * + * @return the meta object for the attribute 'Title'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getTitle() + * @see #getControllerModel() + * @generated + */ + EAttribute getControllerModel_Title(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPrefix Prefix}'. + * + * + * @return the meta object for the attribute 'Prefix'. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel#getPrefix() + * @see #getControllerModel() + * @generated + */ + EAttribute getControllerModel_Prefix(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ControllermodelFactory getControllermodelFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl Controller Model}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl + * @see org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllermodelPackageImpl#getControllerModel() + * @generated + */ + EClass CONTROLLER_MODEL = eINSTANCE.getControllerModel(); + + /** + * The meta object literal for the 'Template Directory' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_MODEL__TEMPLATE_DIRECTORY = eINSTANCE.getControllerModel_TemplateDirectory(); + + /** + * The meta object literal for the 'Plugin Name' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_MODEL__PLUGIN_NAME = eINSTANCE.getControllerModel_PluginName(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_MODEL__NAME = eINSTANCE.getControllerModel_Name(); + + /** + * The meta object literal for the 'Title' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_MODEL__TITLE = eINSTANCE.getControllerModel_Title(); + + /** + * The meta object literal for the 'Prefix' attribute feature. + * + * + * @generated + */ + EAttribute CONTROLLER_MODEL__PREFIX = eINSTANCE.getControllerModel_Prefix(); + + } + +} //ControllermodelPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllerModelImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllerModelImpl.java new file mode 100644 index 0000000..f948d13 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllerModelImpl.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.sirius.manager.controllermodel.impl; + +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Controller Model'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl#getTemplateDirectory Template Directory}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl#getPluginName Plugin Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.controllermodel.impl.ControllerModelImpl#getPrefix Prefix}
  • + *
+ *

+ * + * @generated + */ +public class ControllerModelImpl extends MinimalEObjectImpl.Container implements ControllerModel { + /** + * The default value of the '{@link #getTemplateDirectory() Template Directory}' attribute. + * + * + * @see #getTemplateDirectory() + * @generated + * @ordered + */ + protected static final String TEMPLATE_DIRECTORY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTemplateDirectory() Template Directory}' attribute. + * + * + * @see #getTemplateDirectory() + * @generated + * @ordered + */ + protected String templateDirectory = TEMPLATE_DIRECTORY_EDEFAULT; + + /** + * The default value of the '{@link #getPluginName() Plugin Name}' attribute. + * + * + * @see #getPluginName() + * @generated + * @ordered + */ + protected static final String PLUGIN_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPluginName() Plugin Name}' attribute. + * + * + * @see #getPluginName() + * @generated + * @ordered + */ + protected String pluginName = PLUGIN_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected static final String TITLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected String title = TITLE_EDEFAULT; + + /** + * The default value of the '{@link #getPrefix() Prefix}' attribute. + * + * + * @see #getPrefix() + * @generated + * @ordered + */ + protected static final String PREFIX_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPrefix() Prefix}' attribute. + * + * + * @see #getPrefix() + * @generated + * @ordered + */ + protected String prefix = PREFIX_EDEFAULT; + + /** + * + * + * @generated + */ + protected ControllerModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ControllermodelPackage.Literals.CONTROLLER_MODEL; + } + + /** + * + * + * @generated + */ + public String getTemplateDirectory() { + return templateDirectory; + } + + /** + * + * + * @generated + */ + public void setTemplateDirectory(String newTemplateDirectory) { + String oldTemplateDirectory = templateDirectory; + templateDirectory = newTemplateDirectory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllermodelPackage.CONTROLLER_MODEL__TEMPLATE_DIRECTORY, oldTemplateDirectory, templateDirectory)); + } + + /** + * + * + * @generated + */ + public String getPluginName() { + return pluginName; + } + + /** + * + * + * @generated + */ + public void setPluginName(String newPluginName) { + String oldPluginName = pluginName; + pluginName = newPluginName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllermodelPackage.CONTROLLER_MODEL__PLUGIN_NAME, oldPluginName, pluginName)); + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllermodelPackage.CONTROLLER_MODEL__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getTitle() { + return title; + } + + /** + * + * + * @generated + */ + public void setTitle(String newTitle) { + String oldTitle = title; + title = newTitle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllermodelPackage.CONTROLLER_MODEL__TITLE, oldTitle, title)); + } + + /** + * + * + * @generated + */ + public String getPrefix() { + return prefix; + } + + /** + * + * + * @generated + */ + public void setPrefix(String newPrefix) { + String oldPrefix = prefix; + prefix = newPrefix; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ControllermodelPackage.CONTROLLER_MODEL__PREFIX, oldPrefix, prefix)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ControllermodelPackage.CONTROLLER_MODEL__TEMPLATE_DIRECTORY: + return getTemplateDirectory(); + case ControllermodelPackage.CONTROLLER_MODEL__PLUGIN_NAME: + return getPluginName(); + case ControllermodelPackage.CONTROLLER_MODEL__NAME: + return getName(); + case ControllermodelPackage.CONTROLLER_MODEL__TITLE: + return getTitle(); + case ControllermodelPackage.CONTROLLER_MODEL__PREFIX: + return getPrefix(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ControllermodelPackage.CONTROLLER_MODEL__TEMPLATE_DIRECTORY: + setTemplateDirectory((String)newValue); + return; + case ControllermodelPackage.CONTROLLER_MODEL__PLUGIN_NAME: + setPluginName((String)newValue); + return; + case ControllermodelPackage.CONTROLLER_MODEL__NAME: + setName((String)newValue); + return; + case ControllermodelPackage.CONTROLLER_MODEL__TITLE: + setTitle((String)newValue); + return; + case ControllermodelPackage.CONTROLLER_MODEL__PREFIX: + setPrefix((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ControllermodelPackage.CONTROLLER_MODEL__TEMPLATE_DIRECTORY: + setTemplateDirectory(TEMPLATE_DIRECTORY_EDEFAULT); + return; + case ControllermodelPackage.CONTROLLER_MODEL__PLUGIN_NAME: + setPluginName(PLUGIN_NAME_EDEFAULT); + return; + case ControllermodelPackage.CONTROLLER_MODEL__NAME: + setName(NAME_EDEFAULT); + return; + case ControllermodelPackage.CONTROLLER_MODEL__TITLE: + setTitle(TITLE_EDEFAULT); + return; + case ControllermodelPackage.CONTROLLER_MODEL__PREFIX: + setPrefix(PREFIX_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ControllermodelPackage.CONTROLLER_MODEL__TEMPLATE_DIRECTORY: + return TEMPLATE_DIRECTORY_EDEFAULT == null ? templateDirectory != null : !TEMPLATE_DIRECTORY_EDEFAULT.equals(templateDirectory); + case ControllermodelPackage.CONTROLLER_MODEL__PLUGIN_NAME: + return PLUGIN_NAME_EDEFAULT == null ? pluginName != null : !PLUGIN_NAME_EDEFAULT.equals(pluginName); + case ControllermodelPackage.CONTROLLER_MODEL__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case ControllermodelPackage.CONTROLLER_MODEL__TITLE: + return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title); + case ControllermodelPackage.CONTROLLER_MODEL__PREFIX: + return PREFIX_EDEFAULT == null ? prefix != null : !PREFIX_EDEFAULT.equals(prefix); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (templateDirectory: "); + result.append(templateDirectory); + result.append(", pluginName: "); + result.append(pluginName); + result.append(", name: "); + result.append(name); + result.append(", title: "); + result.append(title); + result.append(", prefix: "); + result.append(prefix); + result.append(')'); + return result.toString(); + } + +} //ControllerModelImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelFactoryImpl.java new file mode 100644 index 0000000..cbf3aac --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelFactoryImpl.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.controllermodel.impl; + +import org.openecomp.ncomp.sirius.manager.controllermodel.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ControllermodelFactoryImpl extends EFactoryImpl implements ControllermodelFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ControllermodelFactory init() { + try { + ControllermodelFactory theControllermodelFactory = (ControllermodelFactory)EPackage.Registry.INSTANCE.getEFactory(ControllermodelPackage.eNS_URI); + if (theControllermodelFactory != null) { + return theControllermodelFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ControllermodelFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ControllermodelFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ControllermodelPackage.CONTROLLER_MODEL: return createControllerModel(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ControllerModel createControllerModel() { + ControllerModelImpl controllerModel = new ControllerModelImpl(); + return controllerModel; + } + + /** + * + * + * @generated + */ + public ControllermodelPackage getControllermodelPackage() { + return (ControllermodelPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ControllermodelPackage getPackage() { + return ControllermodelPackage.eINSTANCE; + } + +} //ControllermodelFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelPackageImpl.java new file mode 100644 index 0000000..13d3460 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/impl/ControllermodelPackageImpl.java @@ -0,0 +1,249 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.controllermodel.impl; + +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelFactory; +import org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ControllermodelPackageImpl extends EPackageImpl implements ControllermodelPackage { + /** + * + * + * @generated + */ + private EClass controllerModelEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link ControllermodelPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ControllermodelPackage init() { + if (isInited) return (ControllermodelPackage)EPackage.Registry.INSTANCE.getEPackage(ControllermodelPackage.eNS_URI); + + // Obtain or create and register package + ControllermodelPackageImpl theControllermodelPackage = (ControllermodelPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ControllermodelPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ControllermodelPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theControllermodelPackage.createPackageContents(); + + // Initialize created meta-data + theControllermodelPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theControllermodelPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ControllermodelPackage.eNS_URI, theControllermodelPackage); + return theControllermodelPackage; + } + + /** + * + * + * @generated + */ + public EClass getControllerModel() { + return controllerModelEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getControllerModel_TemplateDirectory() { + return (EAttribute)controllerModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerModel_PluginName() { + return (EAttribute)controllerModelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerModel_Name() { + return (EAttribute)controllerModelEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerModel_Title() { + return (EAttribute)controllerModelEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getControllerModel_Prefix() { + return (EAttribute)controllerModelEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public ControllermodelFactory getControllermodelFactory() { + return (ControllermodelFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + controllerModelEClass = createEClass(CONTROLLER_MODEL); + createEAttribute(controllerModelEClass, CONTROLLER_MODEL__TEMPLATE_DIRECTORY); + createEAttribute(controllerModelEClass, CONTROLLER_MODEL__PLUGIN_NAME); + createEAttribute(controllerModelEClass, CONTROLLER_MODEL__NAME); + createEAttribute(controllerModelEClass, CONTROLLER_MODEL__TITLE); + createEAttribute(controllerModelEClass, CONTROLLER_MODEL__PREFIX); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes, features, and operations; add parameters + initEClass(controllerModelEClass, ControllerModel.class, "ControllerModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getControllerModel_TemplateDirectory(), theEcorePackage.getEString(), "templateDirectory", null, 0, 1, ControllerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerModel_PluginName(), theEcorePackage.getEString(), "pluginName", null, 0, 1, ControllerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerModel_Name(), theEcorePackage.getEString(), "name", null, 0, 1, ControllerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerModel_Title(), theEcorePackage.getEString(), "title", null, 0, 1, ControllerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getControllerModel_Prefix(), theEcorePackage.getEString(), "prefix", null, 0, 1, ControllerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //ControllermodelPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelAdapterFactory.java new file mode 100644 index 0000000..fee7dc9 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelAdapterFactory.java @@ -0,0 +1,141 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.controllermodel.util; + +import org.openecomp.ncomp.sirius.manager.controllermodel.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage + * @generated + */ +public class ControllermodelAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ControllermodelPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ControllermodelAdapterFactory() { + if (modelPackage == null) { + modelPackage = ControllermodelPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ControllermodelSwitch modelSwitch = + new ControllermodelSwitch() { + @Override + public Adapter caseControllerModel(ControllerModel object) { + return createControllerModelAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel Controller Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllerModel + * @generated + */ + public Adapter createControllerModelAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ControllermodelAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelSwitch.java new file mode 100644 index 0000000..03f3528 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/controllermodel/util/ControllermodelSwitch.java @@ -0,0 +1,131 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.controllermodel.util; + +import org.openecomp.ncomp.sirius.manager.controllermodel.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.controllermodel.ControllermodelPackage + * @generated + */ +public class ControllermodelSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ControllermodelPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ControllermodelSwitch() { + if (modelPackage == null) { + modelPackage = ControllermodelPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ControllermodelPackage.CONTROLLER_MODEL: { + ControllerModel controllerModel = (ControllerModel)theEObject; + T result = caseControllerModel(controllerModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Controller Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Controller Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseControllerModel(ControllerModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ControllermodelSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphFactory.java new file mode 100644 index 0000000..e6ac653 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphFactory.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.sirius.manager.graph; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage + * @generated + */ +public interface GraphFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + GraphFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.graph.impl.GraphFactoryImpl.init(); + + /** + * Returns a new object of class 'Gui Graph'. + * + * + * @return a new object of class 'Gui Graph'. + * @generated + */ + GuiGraph createGuiGraph(); + + /** + * Returns a new object of class 'Gui Graph Item'. + * + * + * @return a new object of class 'Gui Graph Item'. + * @generated + */ + GuiGraphItem createGuiGraphItem(); + + /** + * Returns a new object of class 'Gui Graph Node'. + * + * + * @return a new object of class 'Gui Graph Node'. + * @generated + */ + GuiGraphNode createGuiGraphNode(); + + /** + * Returns a new object of class 'Gui Graph Edge'. + * + * + * @return a new object of class 'Gui Graph Edge'. + * @generated + */ + GuiGraphEdge createGuiGraphEdge(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + GraphPackage getGraphPackage(); + +} //GraphFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphPackage.java new file mode 100644 index 0000000..68f61a1 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GraphPackage.java @@ -0,0 +1,662 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.graph; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' updateClasspath='false' basePackage='org.openecomp.ncomp.sirius.manager'" + * annotation="http://www.eclipse.org/emf/2011/Xcore GenModel='http://www.eclipse.org/emf/2002/GenModel'" + * @generated + */ +public interface GraphPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "graph"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.graph"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "graph"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + GraphPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl Gui Graph}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraph() + * @generated + */ + int GUI_GRAPH = 0; + + /** + * The feature id for the 'Nodes' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH__NODES = 0; + + /** + * The feature id for the 'Edges' containment reference list. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH__EDGES = 1; + + /** + * The number of structural features of the 'Gui Graph' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Gui Graph' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl Gui Graph Item}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphItem() + * @generated + */ + int GUI_GRAPH_ITEM = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_ITEM__NAME = 0; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_ITEM__TOOLTIP = 1; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_ITEM__URL = 2; + + /** + * The number of structural features of the 'Gui Graph Item' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_ITEM_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Gui Graph Item' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_ITEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl Gui Graph Node}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphNode() + * @generated + */ + int GUI_GRAPH_NODE = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__NAME = GUI_GRAPH_ITEM__NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__TOOLTIP = GUI_GRAPH_ITEM__TOOLTIP; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__URL = GUI_GRAPH_ITEM__URL; + + /** + * The feature id for the 'X' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__X = GUI_GRAPH_ITEM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Y' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__Y = GUI_GRAPH_ITEM_FEATURE_COUNT + 1; + + /** + * The feature id for the 'H' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__H = GUI_GRAPH_ITEM_FEATURE_COUNT + 2; + + /** + * The feature id for the 'W' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE__W = GUI_GRAPH_ITEM_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Gui Graph Node' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE_FEATURE_COUNT = GUI_GRAPH_ITEM_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Gui Graph Node' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_NODE_OPERATION_COUNT = GUI_GRAPH_ITEM_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl Gui Graph Edge}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphEdge() + * @generated + */ + int GUI_GRAPH_EDGE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE__NAME = GUI_GRAPH_ITEM__NAME; + + /** + * The feature id for the 'Tooltip' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE__TOOLTIP = GUI_GRAPH_ITEM__TOOLTIP; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE__URL = GUI_GRAPH_ITEM__URL; + + /** + * The feature id for the 'X' reference. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE__X = GUI_GRAPH_ITEM_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Y' reference. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE__Y = GUI_GRAPH_ITEM_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Gui Graph Edge' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE_FEATURE_COUNT = GUI_GRAPH_ITEM_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Gui Graph Edge' class. + * + * + * @generated + * @ordered + */ + int GUI_GRAPH_EDGE_OPERATION_COUNT = GUI_GRAPH_ITEM_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph Gui Graph}'. + * + * + * @return the meta object for class 'Gui Graph'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraph + * @generated + */ + EClass getGuiGraph(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getNodes Nodes}'. + * + * + * @return the meta object for the containment reference list 'Nodes'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getNodes() + * @see #getGuiGraph() + * @generated + */ + EReference getGuiGraph_Nodes(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getEdges Edges}'. + * + * + * @return the meta object for the containment reference list 'Edges'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getEdges() + * @see #getGuiGraph() + * @generated + */ + EReference getGuiGraph_Edges(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem Gui Graph Item}'. + * + * + * @return the meta object for class 'Gui Graph Item'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem + * @generated + */ + EClass getGuiGraphItem(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getName() + * @see #getGuiGraphItem() + * @generated + */ + EAttribute getGuiGraphItem_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getTooltip Tooltip}'. + * + * + * @return the meta object for the attribute 'Tooltip'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getTooltip() + * @see #getGuiGraphItem() + * @generated + */ + EAttribute getGuiGraphItem_Tooltip(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getUrl Url}'. + * + * + * @return the meta object for the attribute 'Url'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getUrl() + * @see #getGuiGraphItem() + * @generated + */ + EAttribute getGuiGraphItem_Url(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode Gui Graph Node}'. + * + * + * @return the meta object for class 'Gui Graph Node'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode + * @generated + */ + EClass getGuiGraphNode(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getX X}'. + * + * + * @return the meta object for the attribute 'X'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getX() + * @see #getGuiGraphNode() + * @generated + */ + EAttribute getGuiGraphNode_X(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getY Y}'. + * + * + * @return the meta object for the attribute 'Y'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getY() + * @see #getGuiGraphNode() + * @generated + */ + EAttribute getGuiGraphNode_Y(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getH H}'. + * + * + * @return the meta object for the attribute 'H'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getH() + * @see #getGuiGraphNode() + * @generated + */ + EAttribute getGuiGraphNode_H(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getW W}'. + * + * + * @return the meta object for the attribute 'W'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getW() + * @see #getGuiGraphNode() + * @generated + */ + EAttribute getGuiGraphNode_W(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge Gui Graph Edge}'. + * + * + * @return the meta object for class 'Gui Graph Edge'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge + * @generated + */ + EClass getGuiGraphEdge(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getX X}'. + * + * + * @return the meta object for the reference 'X'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getX() + * @see #getGuiGraphEdge() + * @generated + */ + EReference getGuiGraphEdge_X(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getY Y}'. + * + * + * @return the meta object for the reference 'Y'. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getY() + * @see #getGuiGraphEdge() + * @generated + */ + EReference getGuiGraphEdge_Y(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + GraphFactory getGraphFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl Gui Graph}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraph() + * @generated + */ + EClass GUI_GRAPH = eINSTANCE.getGuiGraph(); + + /** + * The meta object literal for the 'Nodes' containment reference list feature. + * + * + * @generated + */ + EReference GUI_GRAPH__NODES = eINSTANCE.getGuiGraph_Nodes(); + + /** + * The meta object literal for the 'Edges' containment reference list feature. + * + * + * @generated + */ + EReference GUI_GRAPH__EDGES = eINSTANCE.getGuiGraph_Edges(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl Gui Graph Item}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphItem() + * @generated + */ + EClass GUI_GRAPH_ITEM = eINSTANCE.getGuiGraphItem(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_ITEM__NAME = eINSTANCE.getGuiGraphItem_Name(); + + /** + * The meta object literal for the 'Tooltip' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_ITEM__TOOLTIP = eINSTANCE.getGuiGraphItem_Tooltip(); + + /** + * The meta object literal for the 'Url' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_ITEM__URL = eINSTANCE.getGuiGraphItem_Url(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl Gui Graph Node}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphNode() + * @generated + */ + EClass GUI_GRAPH_NODE = eINSTANCE.getGuiGraphNode(); + + /** + * The meta object literal for the 'X' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_NODE__X = eINSTANCE.getGuiGraphNode_X(); + + /** + * The meta object literal for the 'Y' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_NODE__Y = eINSTANCE.getGuiGraphNode_Y(); + + /** + * The meta object literal for the 'H' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_NODE__H = eINSTANCE.getGuiGraphNode_H(); + + /** + * The meta object literal for the 'W' attribute feature. + * + * + * @generated + */ + EAttribute GUI_GRAPH_NODE__W = eINSTANCE.getGuiGraphNode_W(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl Gui Graph Edge}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl + * @see org.openecomp.ncomp.sirius.manager.graph.impl.GraphPackageImpl#getGuiGraphEdge() + * @generated + */ + EClass GUI_GRAPH_EDGE = eINSTANCE.getGuiGraphEdge(); + + /** + * The meta object literal for the 'X' reference feature. + * + * + * @generated + */ + EReference GUI_GRAPH_EDGE__X = eINSTANCE.getGuiGraphEdge_X(); + + /** + * The meta object literal for the 'Y' reference feature. + * + * + * @generated + */ + EReference GUI_GRAPH_EDGE__Y = eINSTANCE.getGuiGraphEdge_Y(); + + } + +} //GraphPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraph.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraph.java new file mode 100644 index 0000000..c303295 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraph.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.sirius.manager.graph; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Graph'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getNodes Nodes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph#getEdges Edges}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraph() + * @model + * @generated + */ +public interface GuiGraph extends EObject { + /** + * Returns the value of the 'Nodes' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode}. + * + *

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

+ * + * @return the value of the 'Nodes' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraph_Nodes() + * @model containment="true" + * @generated + */ + EList getNodes(); + + /** + * Returns the value of the 'Edges' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge}. + * + *

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

+ * + * @return the value of the 'Edges' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraph_Edges() + * @model containment="true" + * @generated + */ + EList getEdges(); + +} // GuiGraph diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphEdge.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphEdge.java new file mode 100644 index 0000000..3de2df3 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphEdge.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.sirius.manager.graph; + + +/** + * + * A representation of the model object 'Gui Graph Edge'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getX X}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getY Y}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphEdge() + * @model + * @generated + */ +public interface GuiGraphEdge extends GuiGraphItem { + /** + * Returns the value of the 'X' reference. + * + *

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

+ * + * @return the value of the 'X' reference. + * @see #setX(GuiGraphNode) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphEdge_X() + * @model + * @generated + */ + GuiGraphNode getX(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getX X}' reference. + * + * + * @param value the new value of the 'X' reference. + * @see #getX() + * @generated + */ + void setX(GuiGraphNode value); + + /** + * Returns the value of the 'Y' reference. + * + *

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

+ * + * @return the value of the 'Y' reference. + * @see #setY(GuiGraphNode) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphEdge_Y() + * @model + * @generated + */ + GuiGraphNode getY(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge#getY Y}' reference. + * + * + * @param value the new value of the 'Y' reference. + * @see #getY() + * @generated + */ + void setY(GuiGraphNode value); + +} // GuiGraphEdge diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphItem.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphItem.java new file mode 100644 index 0000000..7df3873 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/GuiGraphItem.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.sirius.manager.graph; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Gui Graph Item'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getUrl Url}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphItem() + * @model + * @generated + */ +public interface GuiGraphItem extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphItem_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Tooltip' attribute. + * + *

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

+ * + * @return the value of the 'Tooltip' attribute. + * @see #setTooltip(String) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphItem_Tooltip() + * @model unique="false" + * @generated + */ + String getTooltip(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem#getTooltip Tooltip}' attribute. + * + * + * @param value the new value of the 'Tooltip' attribute. + * @see #getTooltip() + * @generated + */ + void setTooltip(String value); + + /** + * Returns the value of the 'Url' attribute. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getX X}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getY Y}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getH H}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getW W}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphNode() + * @model + * @generated + */ +public interface GuiGraphNode extends GuiGraphItem { + /** + * Returns the value of the 'X' attribute. + * + *

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

+ * + * @return the value of the 'X' attribute. + * @see #setX(Integer) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphNode_X() + * @model unique="false" + * @generated + */ + Integer getX(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getX X}' attribute. + * + * + * @param value the new value of the 'X' attribute. + * @see #getX() + * @generated + */ + void setX(Integer value); + + /** + * Returns the value of the 'Y' attribute. + * + *

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

+ * + * @return the value of the 'Y' attribute. + * @see #setY(Integer) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphNode_Y() + * @model unique="false" + * @generated + */ + Integer getY(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getY Y}' attribute. + * + * + * @param value the new value of the 'Y' attribute. + * @see #getY() + * @generated + */ + void setY(Integer value); + + /** + * Returns the value of the 'H' attribute. + * + *

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

+ * + * @return the value of the 'H' attribute. + * @see #setH(Integer) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphNode_H() + * @model unique="false" + * @generated + */ + Integer getH(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getH H}' attribute. + * + * + * @param value the new value of the 'H' attribute. + * @see #getH() + * @generated + */ + void setH(Integer value); + + /** + * Returns the value of the 'W' attribute. + * + *

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

+ * + * @return the value of the 'W' attribute. + * @see #setW(Integer) + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage#getGuiGraphNode_W() + * @model unique="false" + * @generated + */ + Integer getW(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode#getW W}' attribute. + * + * + * @param value the new value of the 'W' attribute. + * @see #getW() + * @generated + */ + void setW(Integer value); + +} // GuiGraphNode diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphFactoryImpl.java new file mode 100644 index 0000000..1671c9f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphFactoryImpl.java @@ -0,0 +1,149 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class GraphFactoryImpl extends EFactoryImpl implements GraphFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static GraphFactory init() { + try { + GraphFactory theGraphFactory = (GraphFactory)EPackage.Registry.INSTANCE.getEFactory(GraphPackage.eNS_URI); + if (theGraphFactory != null) { + return theGraphFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new GraphFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public GraphFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case GraphPackage.GUI_GRAPH: return createGuiGraph(); + case GraphPackage.GUI_GRAPH_ITEM: return createGuiGraphItem(); + case GraphPackage.GUI_GRAPH_NODE: return createGuiGraphNode(); + case GraphPackage.GUI_GRAPH_EDGE: return createGuiGraphEdge(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public GuiGraph createGuiGraph() { + GuiGraphImpl guiGraph = new GuiGraphImpl(); + return guiGraph; + } + + /** + * + * + * @generated + */ + public GuiGraphItem createGuiGraphItem() { + GuiGraphItemImpl guiGraphItem = new GuiGraphItemImpl(); + return guiGraphItem; + } + + /** + * + * + * @generated + */ + public GuiGraphNode createGuiGraphNode() { + GuiGraphNodeImpl guiGraphNode = new GuiGraphNodeImpl(); + return guiGraphNode; + } + + /** + * + * + * @generated + */ + public GuiGraphEdge createGuiGraphEdge() { + GuiGraphEdgeImpl guiGraphEdge = new GuiGraphEdgeImpl(); + return guiGraphEdge; + } + + /** + * + * + * @generated + */ + public GraphPackage getGraphPackage() { + return (GraphPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static GraphPackage getPackage() { + return GraphPackage.eINSTANCE; + } + +} //GraphFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphPackageImpl.java new file mode 100644 index 0000000..9e1c4c5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GraphPackageImpl.java @@ -0,0 +1,401 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.GraphFactory; +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraph; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class GraphPackageImpl extends EPackageImpl implements GraphPackage { + /** + * + * + * @generated + */ + private EClass guiGraphEClass = null; + + /** + * + * + * @generated + */ + private EClass guiGraphItemEClass = null; + + /** + * + * + * @generated + */ + private EClass guiGraphNodeEClass = null; + + /** + * + * + * @generated + */ + private EClass guiGraphEdgeEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link GraphPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static GraphPackage init() { + if (isInited) return (GraphPackage)EPackage.Registry.INSTANCE.getEPackage(GraphPackage.eNS_URI); + + // Obtain or create and register package + GraphPackageImpl theGraphPackage = (GraphPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GraphPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GraphPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theGraphPackage.createPackageContents(); + + // Initialize created meta-data + theGraphPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theGraphPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(GraphPackage.eNS_URI, theGraphPackage); + return theGraphPackage; + } + + /** + * + * + * @generated + */ + public EClass getGuiGraph() { + return guiGraphEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiGraph_Nodes() { + return (EReference)guiGraphEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGuiGraph_Edges() { + return (EReference)guiGraphEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getGuiGraphItem() { + return guiGraphItemEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphItem_Name() { + return (EAttribute)guiGraphItemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphItem_Tooltip() { + return (EAttribute)guiGraphItemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphItem_Url() { + return (EAttribute)guiGraphItemEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getGuiGraphNode() { + return guiGraphNodeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphNode_X() { + return (EAttribute)guiGraphNodeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphNode_Y() { + return (EAttribute)guiGraphNodeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphNode_H() { + return (EAttribute)guiGraphNodeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getGuiGraphNode_W() { + return (EAttribute)guiGraphNodeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getGuiGraphEdge() { + return guiGraphEdgeEClass; + } + + /** + * + * + * @generated + */ + public EReference getGuiGraphEdge_X() { + return (EReference)guiGraphEdgeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getGuiGraphEdge_Y() { + return (EReference)guiGraphEdgeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public GraphFactory getGraphFactory() { + return (GraphFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + guiGraphEClass = createEClass(GUI_GRAPH); + createEReference(guiGraphEClass, GUI_GRAPH__NODES); + createEReference(guiGraphEClass, GUI_GRAPH__EDGES); + + guiGraphItemEClass = createEClass(GUI_GRAPH_ITEM); + createEAttribute(guiGraphItemEClass, GUI_GRAPH_ITEM__NAME); + createEAttribute(guiGraphItemEClass, GUI_GRAPH_ITEM__TOOLTIP); + createEAttribute(guiGraphItemEClass, GUI_GRAPH_ITEM__URL); + + guiGraphNodeEClass = createEClass(GUI_GRAPH_NODE); + createEAttribute(guiGraphNodeEClass, GUI_GRAPH_NODE__X); + createEAttribute(guiGraphNodeEClass, GUI_GRAPH_NODE__Y); + createEAttribute(guiGraphNodeEClass, GUI_GRAPH_NODE__H); + createEAttribute(guiGraphNodeEClass, GUI_GRAPH_NODE__W); + + guiGraphEdgeEClass = createEClass(GUI_GRAPH_EDGE); + createEReference(guiGraphEdgeEClass, GUI_GRAPH_EDGE__X); + createEReference(guiGraphEdgeEClass, GUI_GRAPH_EDGE__Y); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + guiGraphNodeEClass.getESuperTypes().add(this.getGuiGraphItem()); + guiGraphEdgeEClass.getESuperTypes().add(this.getGuiGraphItem()); + + // Initialize classes, features, and operations; add parameters + initEClass(guiGraphEClass, GuiGraph.class, "GuiGraph", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiGraph_Nodes(), this.getGuiGraphNode(), null, "nodes", null, 0, -1, GuiGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGuiGraph_Edges(), this.getGuiGraphEdge(), null, "edges", null, 0, -1, GuiGraph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiGraphItemEClass, GuiGraphItem.class, "GuiGraphItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiGraphItem_Name(), theEcorePackage.getEString(), "name", null, 0, 1, GuiGraphItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiGraphItem_Tooltip(), theEcorePackage.getEString(), "tooltip", null, 0, 1, GuiGraphItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiGraphItem_Url(), theEcorePackage.getEString(), "Url", null, 0, 1, GuiGraphItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiGraphNodeEClass, GuiGraphNode.class, "GuiGraphNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getGuiGraphNode_X(), theEcorePackage.getEIntegerObject(), "x", null, 0, 1, GuiGraphNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiGraphNode_Y(), theEcorePackage.getEIntegerObject(), "y", null, 0, 1, GuiGraphNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiGraphNode_H(), theEcorePackage.getEIntegerObject(), "h", null, 0, 1, GuiGraphNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getGuiGraphNode_W(), theEcorePackage.getEIntegerObject(), "w", null, 0, 1, GuiGraphNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(guiGraphEdgeEClass, GuiGraphEdge.class, "GuiGraphEdge", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getGuiGraphEdge_X(), this.getGuiGraphNode(), null, "x", null, 0, 1, GuiGraphEdge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getGuiGraphEdge_Y(), this.getGuiGraphNode(), null, "y", null, 0, 1, GuiGraphEdge.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "GenModel", "http://www.eclipse.org/emf/2002/GenModel" + }); + } + +} //GraphPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphEdgeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphEdgeImpl.java new file mode 100644 index 0000000..0a1c680 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphEdgeImpl.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.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Graph Edge'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl#getX X}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphEdgeImpl#getY Y}
  • + *
+ *

+ * + * @generated + */ +public class GuiGraphEdgeImpl extends GuiGraphItemImpl implements GuiGraphEdge { + /** + * The cached value of the '{@link #getX() X}' reference. + * + * + * @see #getX() + * @generated + * @ordered + */ + protected GuiGraphNode x; + + /** + * The cached value of the '{@link #getY() Y}' reference. + * + * + * @see #getY() + * @generated + * @ordered + */ + protected GuiGraphNode y; + + /** + * + * + * @generated + */ + protected GuiGraphEdgeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GraphPackage.Literals.GUI_GRAPH_EDGE; + } + + /** + * + * + * @generated + */ + public GuiGraphNode getX() { + if (x != null && x.eIsProxy()) { + InternalEObject oldX = (InternalEObject)x; + x = (GuiGraphNode)eResolveProxy(oldX); + if (x != oldX) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, GraphPackage.GUI_GRAPH_EDGE__X, oldX, x)); + } + } + return x; + } + + /** + * + * + * @generated + */ + public GuiGraphNode basicGetX() { + return x; + } + + /** + * + * + * @generated + */ + public void setX(GuiGraphNode newX) { + GuiGraphNode oldX = x; + x = newX; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_EDGE__X, oldX, x)); + } + + /** + * + * + * @generated + */ + public GuiGraphNode getY() { + if (y != null && y.eIsProxy()) { + InternalEObject oldY = (InternalEObject)y; + y = (GuiGraphNode)eResolveProxy(oldY); + if (y != oldY) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, GraphPackage.GUI_GRAPH_EDGE__Y, oldY, y)); + } + } + return y; + } + + /** + * + * + * @generated + */ + public GuiGraphNode basicGetY() { + return y; + } + + /** + * + * + * @generated + */ + public void setY(GuiGraphNode newY) { + GuiGraphNode oldY = y; + y = newY; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_EDGE__Y, oldY, y)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_EDGE__X: + if (resolve) return getX(); + return basicGetX(); + case GraphPackage.GUI_GRAPH_EDGE__Y: + if (resolve) return getY(); + return basicGetY(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_EDGE__X: + setX((GuiGraphNode)newValue); + return; + case GraphPackage.GUI_GRAPH_EDGE__Y: + setY((GuiGraphNode)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_EDGE__X: + setX((GuiGraphNode)null); + return; + case GraphPackage.GUI_GRAPH_EDGE__Y: + setY((GuiGraphNode)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_EDGE__X: + return x != null; + case GraphPackage.GUI_GRAPH_EDGE__Y: + return y != null; + } + return super.eIsSet(featureID); + } + +} //GuiGraphEdgeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphImpl.java new file mode 100644 index 0000000..7f52720 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphImpl.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.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraph; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Gui Graph'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl#getNodes Nodes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphImpl#getEdges Edges}
  • + *
+ *

+ * + * @generated + */ +public class GuiGraphImpl extends MinimalEObjectImpl.Container implements GuiGraph { + /** + * The cached value of the '{@link #getNodes() Nodes}' containment reference list. + * + * + * @see #getNodes() + * @generated + * @ordered + */ + protected EList nodes; + + /** + * The cached value of the '{@link #getEdges() Edges}' containment reference list. + * + * + * @see #getEdges() + * @generated + * @ordered + */ + protected EList edges; + + /** + * + * + * @generated + */ + protected GuiGraphImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GraphPackage.Literals.GUI_GRAPH; + } + + /** + * + * + * @generated + */ + public EList getNodes() { + if (nodes == null) { + nodes = new EObjectContainmentEList(GuiGraphNode.class, this, GraphPackage.GUI_GRAPH__NODES); + } + return nodes; + } + + /** + * + * + * @generated + */ + public EList getEdges() { + if (edges == null) { + edges = new EObjectContainmentEList(GuiGraphEdge.class, this, GraphPackage.GUI_GRAPH__EDGES); + } + return edges; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case GraphPackage.GUI_GRAPH__NODES: + return ((InternalEList)getNodes()).basicRemove(otherEnd, msgs); + case GraphPackage.GUI_GRAPH__EDGES: + return ((InternalEList)getEdges()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GraphPackage.GUI_GRAPH__NODES: + return getNodes(); + case GraphPackage.GUI_GRAPH__EDGES: + return getEdges(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GraphPackage.GUI_GRAPH__NODES: + getNodes().clear(); + getNodes().addAll((Collection)newValue); + return; + case GraphPackage.GUI_GRAPH__EDGES: + getEdges().clear(); + getEdges().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH__NODES: + getNodes().clear(); + return; + case GraphPackage.GUI_GRAPH__EDGES: + getEdges().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH__NODES: + return nodes != null && !nodes.isEmpty(); + case GraphPackage.GUI_GRAPH__EDGES: + return edges != null && !edges.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //GuiGraphImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphItemImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphItemImpl.java new file mode 100644 index 0000000..e6c1fb3 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphItemImpl.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.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Gui Graph Item'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl#getTooltip Tooltip}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphItemImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class GuiGraphItemImpl extends MinimalEObjectImpl.Container implements GuiGraphItem { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected static final String TOOLTIP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTooltip() Tooltip}' attribute. + * + * + * @see #getTooltip() + * @generated + * @ordered + */ + protected String tooltip = TOOLTIP_EDEFAULT; + + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiGraphItemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GraphPackage.Literals.GUI_GRAPH_ITEM; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_ITEM__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getTooltip() { + return tooltip; + } + + /** + * + * + * @generated + */ + public void setTooltip(String newTooltip) { + String oldTooltip = tooltip; + tooltip = newTooltip; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_ITEM__TOOLTIP, oldTooltip, tooltip)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_ITEM__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_ITEM__NAME: + return getName(); + case GraphPackage.GUI_GRAPH_ITEM__TOOLTIP: + return getTooltip(); + case GraphPackage.GUI_GRAPH_ITEM__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_ITEM__NAME: + setName((String)newValue); + return; + case GraphPackage.GUI_GRAPH_ITEM__TOOLTIP: + setTooltip((String)newValue); + return; + case GraphPackage.GUI_GRAPH_ITEM__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_ITEM__NAME: + setName(NAME_EDEFAULT); + return; + case GraphPackage.GUI_GRAPH_ITEM__TOOLTIP: + setTooltip(TOOLTIP_EDEFAULT); + return; + case GraphPackage.GUI_GRAPH_ITEM__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_ITEM__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case GraphPackage.GUI_GRAPH_ITEM__TOOLTIP: + return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); + case GraphPackage.GUI_GRAPH_ITEM__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", tooltip: "); + result.append(tooltip); + result.append(", Url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //GuiGraphItemImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphNodeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphNodeImpl.java new file mode 100644 index 0000000..431c294 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/impl/GuiGraphNodeImpl.java @@ -0,0 +1,345 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.graph.impl; + +import org.openecomp.ncomp.sirius.manager.graph.GraphPackage; +import org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Gui Graph Node'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getX X}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getY Y}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getH H}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.graph.impl.GuiGraphNodeImpl#getW W}
  • + *
+ *

+ * + * @generated + */ +public class GuiGraphNodeImpl extends GuiGraphItemImpl implements GuiGraphNode { + /** + * The default value of the '{@link #getX() X}' attribute. + * + * + * @see #getX() + * @generated + * @ordered + */ + protected static final Integer X_EDEFAULT = null; + + /** + * The cached value of the '{@link #getX() X}' attribute. + * + * + * @see #getX() + * @generated + * @ordered + */ + protected Integer x = X_EDEFAULT; + + /** + * The default value of the '{@link #getY() Y}' attribute. + * + * + * @see #getY() + * @generated + * @ordered + */ + protected static final Integer Y_EDEFAULT = null; + + /** + * The cached value of the '{@link #getY() Y}' attribute. + * + * + * @see #getY() + * @generated + * @ordered + */ + protected Integer y = Y_EDEFAULT; + + /** + * The default value of the '{@link #getH() H}' attribute. + * + * + * @see #getH() + * @generated + * @ordered + */ + protected static final Integer H_EDEFAULT = null; + + /** + * The cached value of the '{@link #getH() H}' attribute. + * + * + * @see #getH() + * @generated + * @ordered + */ + protected Integer h = H_EDEFAULT; + + /** + * The default value of the '{@link #getW() W}' attribute. + * + * + * @see #getW() + * @generated + * @ordered + */ + protected static final Integer W_EDEFAULT = null; + + /** + * The cached value of the '{@link #getW() W}' attribute. + * + * + * @see #getW() + * @generated + * @ordered + */ + protected Integer w = W_EDEFAULT; + + /** + * + * + * @generated + */ + protected GuiGraphNodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GraphPackage.Literals.GUI_GRAPH_NODE; + } + + /** + * + * + * @generated + */ + public Integer getX() { + return x; + } + + /** + * + * + * @generated + */ + public void setX(Integer newX) { + Integer oldX = x; + x = newX; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__X, oldX, x)); + } + + /** + * + * + * @generated + */ + public Integer getY() { + return y; + } + + /** + * + * + * @generated + */ + public void setY(Integer newY) { + Integer oldY = y; + y = newY; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__Y, oldY, y)); + } + + /** + * + * + * @generated + */ + public Integer getH() { + return h; + } + + /** + * + * + * @generated + */ + public void setH(Integer newH) { + Integer oldH = h; + h = newH; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__H, oldH, h)); + } + + /** + * + * + * @generated + */ + public Integer getW() { + return w; + } + + /** + * + * + * @generated + */ + public void setW(Integer newW) { + Integer oldW = w; + w = newW; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.GUI_GRAPH_NODE__W, oldW, w)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_NODE__X: + return getX(); + case GraphPackage.GUI_GRAPH_NODE__Y: + return getY(); + case GraphPackage.GUI_GRAPH_NODE__H: + return getH(); + case GraphPackage.GUI_GRAPH_NODE__W: + return getW(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_NODE__X: + setX((Integer)newValue); + return; + case GraphPackage.GUI_GRAPH_NODE__Y: + setY((Integer)newValue); + return; + case GraphPackage.GUI_GRAPH_NODE__H: + setH((Integer)newValue); + return; + case GraphPackage.GUI_GRAPH_NODE__W: + setW((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_NODE__X: + setX(X_EDEFAULT); + return; + case GraphPackage.GUI_GRAPH_NODE__Y: + setY(Y_EDEFAULT); + return; + case GraphPackage.GUI_GRAPH_NODE__H: + setH(H_EDEFAULT); + return; + case GraphPackage.GUI_GRAPH_NODE__W: + setW(W_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case GraphPackage.GUI_GRAPH_NODE__X: + return X_EDEFAULT == null ? x != null : !X_EDEFAULT.equals(x); + case GraphPackage.GUI_GRAPH_NODE__Y: + return Y_EDEFAULT == null ? y != null : !Y_EDEFAULT.equals(y); + case GraphPackage.GUI_GRAPH_NODE__H: + return H_EDEFAULT == null ? h != null : !H_EDEFAULT.equals(h); + case GraphPackage.GUI_GRAPH_NODE__W: + return W_EDEFAULT == null ? w != null : !W_EDEFAULT.equals(w); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (x: "); + result.append(x); + result.append(", y: "); + result.append(y); + result.append(", h: "); + result.append(h); + result.append(", w: "); + result.append(w); + result.append(')'); + return result.toString(); + } + +} //GuiGraphNodeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphAdapterFactory.java new file mode 100644 index 0000000..2458088 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphAdapterFactory.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.sirius.manager.graph.util; + +import org.openecomp.ncomp.sirius.manager.graph.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage + * @generated + */ +public class GraphAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static GraphPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public GraphAdapterFactory() { + if (modelPackage == null) { + modelPackage = GraphPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected GraphSwitch modelSwitch = + new GraphSwitch() { + @Override + public Adapter caseGuiGraph(GuiGraph object) { + return createGuiGraphAdapter(); + } + @Override + public Adapter caseGuiGraphItem(GuiGraphItem object) { + return createGuiGraphItemAdapter(); + } + @Override + public Adapter caseGuiGraphNode(GuiGraphNode object) { + return createGuiGraphNodeAdapter(); + } + @Override + public Adapter caseGuiGraphEdge(GuiGraphEdge object) { + return createGuiGraphEdgeAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraph Gui Graph}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraph + * @generated + */ + public Adapter createGuiGraphAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem Gui Graph Item}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphItem + * @generated + */ + public Adapter createGuiGraphItemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode Gui Graph Node}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphNode + * @generated + */ + public Adapter createGuiGraphNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge Gui Graph Edge}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.graph.GuiGraphEdge + * @generated + */ + public Adapter createGuiGraphEdgeAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //GraphAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphSwitch.java new file mode 100644 index 0000000..db66b0f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/graph/util/GraphSwitch.java @@ -0,0 +1,196 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.graph.util; + +import org.openecomp.ncomp.sirius.manager.graph.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.graph.GraphPackage + * @generated + */ +public class GraphSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static GraphPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public GraphSwitch() { + if (modelPackage == null) { + modelPackage = GraphPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case GraphPackage.GUI_GRAPH: { + GuiGraph guiGraph = (GuiGraph)theEObject; + T result = caseGuiGraph(guiGraph); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GraphPackage.GUI_GRAPH_ITEM: { + GuiGraphItem guiGraphItem = (GuiGraphItem)theEObject; + T result = caseGuiGraphItem(guiGraphItem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GraphPackage.GUI_GRAPH_NODE: { + GuiGraphNode guiGraphNode = (GuiGraphNode)theEObject; + T result = caseGuiGraphNode(guiGraphNode); + if (result == null) result = caseGuiGraphItem(guiGraphNode); + if (result == null) result = defaultCase(theEObject); + return result; + } + case GraphPackage.GUI_GRAPH_EDGE: { + GuiGraphEdge guiGraphEdge = (GuiGraphEdge)theEObject; + T result = caseGuiGraphEdge(guiGraphEdge); + if (result == null) result = caseGuiGraphItem(guiGraphEdge); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Graph'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Graph'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiGraph(GuiGraph object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Graph Item'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Graph Item'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiGraphItem(GuiGraphItem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Graph Node'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Graph Node'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiGraphNode(GuiGraphNode object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Gui Graph Edge'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Gui Graph Edge'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseGuiGraphEdge(GuiGraphEdge object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //GraphSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/AbstractProperty.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/AbstractProperty.java new file mode 100644 index 0000000..9b39c2c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/AbstractProperty.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.sirius.manager.properties; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Abstract Property'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getAbstractProperty() + * @model abstract="true" + * @generated + */ +public interface AbstractProperty extends EObject { +} // AbstractProperty diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Module.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Module.java new file mode 100644 index 0000000..2cf8f90 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Module.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.sirius.manager.properties; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Module'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.Module#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.Module#getSubModules Sub Modules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModule() + * @model + * @generated + */ +public interface Module extends NamedEntity { + /** + * Returns the value of the 'Version' attribute. + * + *

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

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModule_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.properties.Module#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Sub Modules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.properties.Module}. + * + *

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

+ * + * @return the value of the 'Sub Modules' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModule_SubModules() + * @model containment="true" + * @generated + */ + EList getSubModules(); + +} // Module diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleContainer.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleContainer.java new file mode 100644 index 0000000..ec990db --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleContainer.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.sirius.manager.properties; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Module Container'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.ModuleContainer#getModules Modules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModuleContainer() + * @model abstract="true" + * @generated + */ +public interface ModuleContainer extends EObject { + /** + * Returns the value of the 'Modules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.properties.Module}. + * + *

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

+ * + * @return the value of the 'Modules' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModuleContainer_Modules() + * @model containment="true" + * @generated + */ + EList getModules(); + +} // ModuleContainer diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleProperty.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleProperty.java new file mode 100644 index 0000000..3495d87 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/ModuleProperty.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.sirius.manager.properties; + + +/** + * + * A representation of the model object 'Module Property'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getModuleProperty() + * @model + * @generated + */ +public interface ModuleProperty extends AbstractProperty, Module { +} // ModuleProperty diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesFactory.java new file mode 100644 index 0000000..80cd5a5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesFactory.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.sirius.manager.properties; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage + * @generated + */ +public interface PropertiesFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + PropertiesFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesFactoryImpl.init(); + + /** + * Returns a new object of class 'Property'. + * + * + * @return a new object of class 'Property'. + * @generated + */ + Property createProperty(); + + /** + * Returns a new object of class 'Module Property'. + * + * + * @return a new object of class 'Module Property'. + * @generated + */ + ModuleProperty createModuleProperty(); + + /** + * Returns a new object of class 'Module'. + * + * + * @return a new object of class 'Module'. + * @generated + */ + Module createModule(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + PropertiesPackage getPropertiesPackage(); + +} //PropertiesFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesPackage.java new file mode 100644 index 0000000..5f1bef1 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/PropertiesPackage.java @@ -0,0 +1,581 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.properties; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager'" + * annotation="http://www.eclipse.org/emf/2011/Xcore GenModel='http://www.eclipse.org/emf/2002/GenModel' doc='http://openecomp.org/sirius/doc'" + * @generated + */ +public interface PropertiesPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "properties"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.properties"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "properties"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + PropertiesPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.AbstractPropertyImpl Abstract Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.AbstractPropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getAbstractProperty() + * @generated + */ + int ABSTRACT_PROPERTY = 0; + + /** + * The number of structural features of the 'Abstract Property' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_PROPERTY_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Abstract Property' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_PROPERTY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getProperty() + * @generated + */ + int PROPERTY = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PROPERTY__NAME = ABSTRACT_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int PROPERTY__VALUE = ABSTRACT_PROPERTY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Property' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_FEATURE_COUNT = ABSTRACT_PROPERTY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Property' class. + * + * + * @generated + * @ordered + */ + int PROPERTY_OPERATION_COUNT = ABSTRACT_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl Module Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModuleProperty() + * @generated + */ + int MODULE_PROPERTY = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__NAME = ABSTRACT_PROPERTY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__LAST_POLLED = ABSTRACT_PROPERTY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__LAST_CHANGED = ABSTRACT_PROPERTY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__CREATED = ABSTRACT_PROPERTY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__VERSION = ABSTRACT_PROPERTY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Sub Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY__SUB_MODULES = ABSTRACT_PROPERTY_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Module Property' class. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY_FEATURE_COUNT = ABSTRACT_PROPERTY_FEATURE_COUNT + 6; + + /** + * The number of operations of the 'Module Property' class. + * + * + * @generated + * @ordered + */ + int MODULE_PROPERTY_OPERATION_COUNT = ABSTRACT_PROPERTY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl Module}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModule() + * @generated + */ + int MODULE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__VERSION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Sub Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int MODULE__SUB_MODULES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Module' class. + * + * + * @generated + * @ordered + */ + int MODULE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Module' class. + * + * + * @generated + * @ordered + */ + int MODULE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl Module Container}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModuleContainer() + * @generated + */ + int MODULE_CONTAINER = 4; + + /** + * The feature id for the 'Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int MODULE_CONTAINER__MODULES = 0; + + /** + * The number of structural features of the 'Module Container' class. + * + * + * @generated + * @ordered + */ + int MODULE_CONTAINER_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Module Container' class. + * + * + * @generated + * @ordered + */ + int MODULE_CONTAINER_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.properties.AbstractProperty Abstract Property}'. + * + * + * @return the meta object for class 'Abstract Property'. + * @see org.openecomp.ncomp.sirius.manager.properties.AbstractProperty + * @generated + */ + EClass getAbstractProperty(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.properties.Property Property}'. + * + * + * @return the meta object for class 'Property'. + * @see org.openecomp.ncomp.sirius.manager.properties.Property + * @generated + */ + EClass getProperty(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.properties.Property#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.properties.Property#getName() + * @see #getProperty() + * @generated + */ + EAttribute getProperty_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.properties.Property#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.sirius.manager.properties.Property#getValue() + * @see #getProperty() + * @generated + */ + EAttribute getProperty_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleProperty Module Property}'. + * + * + * @return the meta object for class 'Module Property'. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleProperty + * @generated + */ + EClass getModuleProperty(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.properties.Module Module}'. + * + * + * @return the meta object for class 'Module'. + * @see org.openecomp.ncomp.sirius.manager.properties.Module + * @generated + */ + EClass getModule(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.properties.Module#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.ncomp.sirius.manager.properties.Module#getVersion() + * @see #getModule() + * @generated + */ + EAttribute getModule_Version(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.properties.Module#getSubModules Sub Modules}'. + * + * + * @return the meta object for the containment reference list 'Sub Modules'. + * @see org.openecomp.ncomp.sirius.manager.properties.Module#getSubModules() + * @see #getModule() + * @generated + */ + EReference getModule_SubModules(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleContainer Module Container}'. + * + * + * @return the meta object for class 'Module Container'. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleContainer + * @generated + */ + EClass getModuleContainer(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleContainer#getModules Modules}'. + * + * + * @return the meta object for the containment reference list 'Modules'. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleContainer#getModules() + * @see #getModuleContainer() + * @generated + */ + EReference getModuleContainer_Modules(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + PropertiesFactory getPropertiesFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.AbstractPropertyImpl Abstract Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.AbstractPropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getAbstractProperty() + * @generated + */ + EClass ABSTRACT_PROPERTY = eINSTANCE.getAbstractProperty(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getProperty() + * @generated + */ + EClass PROPERTY = eINSTANCE.getProperty(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute PROPERTY__NAME = eINSTANCE.getProperty_Name(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute PROPERTY__VALUE = eINSTANCE.getProperty_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl Module Property}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModuleProperty() + * @generated + */ + EClass MODULE_PROPERTY = eINSTANCE.getModuleProperty(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl Module}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModule() + * @generated + */ + EClass MODULE = eINSTANCE.getModule(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute MODULE__VERSION = eINSTANCE.getModule_Version(); + + /** + * The meta object literal for the 'Sub Modules' containment reference list feature. + * + * + * @generated + */ + EReference MODULE__SUB_MODULES = eINSTANCE.getModule_SubModules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl Module Container}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl + * @see org.openecomp.ncomp.sirius.manager.properties.impl.PropertiesPackageImpl#getModuleContainer() + * @generated + */ + EClass MODULE_CONTAINER = eINSTANCE.getModuleContainer(); + + /** + * The meta object literal for the 'Modules' containment reference list feature. + * + * + * @generated + */ + EReference MODULE_CONTAINER__MODULES = eINSTANCE.getModuleContainer_Modules(); + + } + +} //PropertiesPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Property.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Property.java new file mode 100644 index 0000000..e716bec --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/Property.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.sirius.manager.properties; + + +/** + * + * A representation of the model object 'Property'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.Property#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.Property#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getProperty() + * @model + * @generated + */ +public interface Property extends AbstractProperty { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getProperty_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.properties.Property#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Value' attribute. + * + *

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

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage#getProperty_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.properties.Property#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // Property diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/AbstractPropertyImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/AbstractPropertyImpl.java new file mode 100644 index 0000000..78243fd --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/AbstractPropertyImpl.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.sirius.manager.properties.impl; + +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Abstract Property'. + * + *

+ *

+ * + * @generated + */ +public abstract class AbstractPropertyImpl extends MinimalEObjectImpl.Container implements AbstractProperty { + /** + * + * + * @generated + */ + protected AbstractPropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.ABSTRACT_PROPERTY; + } + +} //AbstractPropertyImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleContainerImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleContainerImpl.java new file mode 100644 index 0000000..b4451f0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleContainerImpl.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.sirius.manager.properties.impl; + +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Module Container'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl#getModules Modules}
  • + *
+ *

+ * + * @generated + */ +public abstract class ModuleContainerImpl extends MinimalEObjectImpl.Container implements ModuleContainer { + /** + * The cached value of the '{@link #getModules() Modules}' containment reference list. + * + * + * @see #getModules() + * @generated + * @ordered + */ + protected EList modules; + + /** + * + * + * @generated + */ + protected ModuleContainerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.MODULE_CONTAINER; + } + + /** + * + * + * @generated + */ + public EList getModules() { + if (modules == null) { + modules = new EObjectContainmentEList(Module.class, this, PropertiesPackage.MODULE_CONTAINER__MODULES); + } + return modules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.MODULE_CONTAINER__MODULES: + return ((InternalEList)getModules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.MODULE_CONTAINER__MODULES: + return getModules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.MODULE_CONTAINER__MODULES: + getModules().clear(); + getModules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE_CONTAINER__MODULES: + getModules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE_CONTAINER__MODULES: + return modules != null && !modules.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModuleContainerImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleImpl.java new file mode 100644 index 0000000..e5d7536 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModuleImpl.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.sirius.manager.properties.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Module'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModuleImpl#getSubModules Sub Modules}
  • + *
+ *

+ * + * @generated + */ +public class ModuleImpl extends NamedEntityImpl implements Module { + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The cached value of the '{@link #getSubModules() Sub Modules}' containment reference list. + * + * + * @see #getSubModules() + * @generated + * @ordered + */ + protected EList subModules; + + /** + * + * + * @generated + */ + protected ModuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.MODULE; + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public EList getSubModules() { + if (subModules == null) { + subModules = new EObjectContainmentEList(Module.class, this, PropertiesPackage.MODULE__SUB_MODULES); + } + return subModules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.MODULE__SUB_MODULES: + return ((InternalEList)getSubModules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.MODULE__VERSION: + return getVersion(); + case PropertiesPackage.MODULE__SUB_MODULES: + return getSubModules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.MODULE__VERSION: + setVersion((String)newValue); + return; + case PropertiesPackage.MODULE__SUB_MODULES: + getSubModules().clear(); + getSubModules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case PropertiesPackage.MODULE__SUB_MODULES: + getSubModules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case PropertiesPackage.MODULE__SUB_MODULES: + return subModules != null && !subModules.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //ModuleImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModulePropertyImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModulePropertyImpl.java new file mode 100644 index 0000000..82e3a9f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/ModulePropertyImpl.java @@ -0,0 +1,514 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.properties.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.openecomp.ncomp.sirius.manager.properties.ModuleProperty; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; + +import java.util.Collection; +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Module Property'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getLastPolled Last Polled}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getLastChanged Last Changed}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getCreated Created}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.ModulePropertyImpl#getSubModules Sub Modules}
  • + *
+ *

+ * + * @generated + */ +public class ModulePropertyImpl extends AbstractPropertyImpl implements ModuleProperty { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getLastPolled() Last Polled}' attribute. + * + * + * @see #getLastPolled() + * @generated + * @ordered + */ + protected static final Date LAST_POLLED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastPolled() Last Polled}' attribute. + * + * + * @see #getLastPolled() + * @generated + * @ordered + */ + protected Date lastPolled = LAST_POLLED_EDEFAULT; + + /** + * The default value of the '{@link #getLastChanged() Last Changed}' attribute. + * + * + * @see #getLastChanged() + * @generated + * @ordered + */ + protected static final Date LAST_CHANGED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastChanged() Last Changed}' attribute. + * + * + * @see #getLastChanged() + * @generated + * @ordered + */ + protected Date lastChanged = LAST_CHANGED_EDEFAULT; + + /** + * The default value of the '{@link #getCreated() Created}' attribute. + * + * + * @see #getCreated() + * @generated + * @ordered + */ + protected static final Date CREATED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCreated() Created}' attribute. + * + * + * @see #getCreated() + * @generated + * @ordered + */ + protected Date created = CREATED_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The cached value of the '{@link #getSubModules() Sub Modules}' containment reference list. + * + * + * @see #getSubModules() + * @generated + * @ordered + */ + protected EList subModules; + + /** + * + * + * @generated + */ + protected ModulePropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.MODULE_PROPERTY; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE_PROPERTY__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public Date getLastPolled() { + return lastPolled; + } + + /** + * + * + * @generated + */ + public void setLastPolled(Date newLastPolled) { + Date oldLastPolled = lastPolled; + lastPolled = newLastPolled; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE_PROPERTY__LAST_POLLED, oldLastPolled, lastPolled)); + } + + /** + * + * + * @generated + */ + public Date getLastChanged() { + return lastChanged; + } + + /** + * + * + * @generated + */ + public void setLastChanged(Date newLastChanged) { + Date oldLastChanged = lastChanged; + lastChanged = newLastChanged; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED, oldLastChanged, lastChanged)); + } + + /** + * + * + * @generated + */ + public Date getCreated() { + return created; + } + + /** + * + * + * @generated + */ + public void setCreated(Date newCreated) { + Date oldCreated = created; + created = newCreated; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE_PROPERTY__CREATED, oldCreated, created)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.MODULE_PROPERTY__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public EList getSubModules() { + if (subModules == null) { + subModules = new EObjectContainmentEList(Module.class, this, PropertiesPackage.MODULE_PROPERTY__SUB_MODULES); + } + return subModules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: + return ((InternalEList)getSubModules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.MODULE_PROPERTY__NAME: + return getName(); + case PropertiesPackage.MODULE_PROPERTY__LAST_POLLED: + return getLastPolled(); + case PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED: + return getLastChanged(); + case PropertiesPackage.MODULE_PROPERTY__CREATED: + return getCreated(); + case PropertiesPackage.MODULE_PROPERTY__VERSION: + return getVersion(); + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: + return getSubModules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.MODULE_PROPERTY__NAME: + setName((String)newValue); + return; + case PropertiesPackage.MODULE_PROPERTY__LAST_POLLED: + setLastPolled((Date)newValue); + return; + case PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED: + setLastChanged((Date)newValue); + return; + case PropertiesPackage.MODULE_PROPERTY__CREATED: + setCreated((Date)newValue); + return; + case PropertiesPackage.MODULE_PROPERTY__VERSION: + setVersion((String)newValue); + return; + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: + getSubModules().clear(); + getSubModules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE_PROPERTY__NAME: + setName(NAME_EDEFAULT); + return; + case PropertiesPackage.MODULE_PROPERTY__LAST_POLLED: + setLastPolled(LAST_POLLED_EDEFAULT); + return; + case PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED: + setLastChanged(LAST_CHANGED_EDEFAULT); + return; + case PropertiesPackage.MODULE_PROPERTY__CREATED: + setCreated(CREATED_EDEFAULT); + return; + case PropertiesPackage.MODULE_PROPERTY__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: + getSubModules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.MODULE_PROPERTY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case PropertiesPackage.MODULE_PROPERTY__LAST_POLLED: + return LAST_POLLED_EDEFAULT == null ? lastPolled != null : !LAST_POLLED_EDEFAULT.equals(lastPolled); + case PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED: + return LAST_CHANGED_EDEFAULT == null ? lastChanged != null : !LAST_CHANGED_EDEFAULT.equals(lastChanged); + case PropertiesPackage.MODULE_PROPERTY__CREATED: + return CREATED_EDEFAULT == null ? created != null : !CREATED_EDEFAULT.equals(created); + case PropertiesPackage.MODULE_PROPERTY__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: + return subModules != null && !subModules.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == NamedEntity.class) { + switch (derivedFeatureID) { + case PropertiesPackage.MODULE_PROPERTY__NAME: return CorePackage.NAMED_ENTITY__NAME; + case PropertiesPackage.MODULE_PROPERTY__LAST_POLLED: return CorePackage.NAMED_ENTITY__LAST_POLLED; + case PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED: return CorePackage.NAMED_ENTITY__LAST_CHANGED; + case PropertiesPackage.MODULE_PROPERTY__CREATED: return CorePackage.NAMED_ENTITY__CREATED; + default: return -1; + } + } + if (baseClass == Module.class) { + switch (derivedFeatureID) { + case PropertiesPackage.MODULE_PROPERTY__VERSION: return PropertiesPackage.MODULE__VERSION; + case PropertiesPackage.MODULE_PROPERTY__SUB_MODULES: return PropertiesPackage.MODULE__SUB_MODULES; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == NamedEntity.class) { + switch (baseFeatureID) { + case CorePackage.NAMED_ENTITY__NAME: return PropertiesPackage.MODULE_PROPERTY__NAME; + case CorePackage.NAMED_ENTITY__LAST_POLLED: return PropertiesPackage.MODULE_PROPERTY__LAST_POLLED; + case CorePackage.NAMED_ENTITY__LAST_CHANGED: return PropertiesPackage.MODULE_PROPERTY__LAST_CHANGED; + case CorePackage.NAMED_ENTITY__CREATED: return PropertiesPackage.MODULE_PROPERTY__CREATED; + default: return -1; + } + } + if (baseClass == Module.class) { + switch (baseFeatureID) { + case PropertiesPackage.MODULE__VERSION: return PropertiesPackage.MODULE_PROPERTY__VERSION; + case PropertiesPackage.MODULE__SUB_MODULES: return PropertiesPackage.MODULE_PROPERTY__SUB_MODULES; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", lastPolled: "); + result.append(lastPolled); + result.append(", lastChanged: "); + result.append(lastChanged); + result.append(", created: "); + result.append(created); + result.append(", version: "); + result.append(version); + result.append(')'); + return result.toString(); + } + +} //ModulePropertyImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesFactoryImpl.java new file mode 100644 index 0000000..6ce17fb --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesFactoryImpl.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.sirius.manager.properties.impl; + +import org.openecomp.ncomp.sirius.manager.properties.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static PropertiesFactory init() { + try { + PropertiesFactory thePropertiesFactory = (PropertiesFactory)EPackage.Registry.INSTANCE.getEFactory(PropertiesPackage.eNS_URI); + if (thePropertiesFactory != null) { + return thePropertiesFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new PropertiesFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public PropertiesFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case PropertiesPackage.PROPERTY: return createProperty(); + case PropertiesPackage.MODULE_PROPERTY: return createModuleProperty(); + case PropertiesPackage.MODULE: return createModule(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Property createProperty() { + PropertyImpl property = new PropertyImpl(); + return property; + } + + /** + * + * + * @generated + */ + public ModuleProperty createModuleProperty() { + ModulePropertyImpl moduleProperty = new ModulePropertyImpl(); + return moduleProperty; + } + + /** + * + * + * @generated + */ + public Module createModule() { + ModuleImpl module = new ModuleImpl(); + return module; + } + + /** + * + * + * @generated + */ + public PropertiesPackage getPropertiesPackage() { + return (PropertiesPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static PropertiesPackage getPackage() { + return PropertiesPackage.eINSTANCE; + } + +} //PropertiesFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesPackageImpl.java new file mode 100644 index 0000000..311d8c3 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertiesPackageImpl.java @@ -0,0 +1,362 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.properties.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer; +import org.openecomp.ncomp.sirius.manager.properties.ModuleProperty; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesFactory; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; +import org.openecomp.ncomp.sirius.manager.properties.Property; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPackage { + /** + * + * + * @generated + */ + private EClass abstractPropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass propertyEClass = null; + + /** + * + * + * @generated + */ + private EClass modulePropertyEClass = null; + + /** + * + * + * @generated + */ + private EClass moduleEClass = null; + + /** + * + * + * @generated + */ + private EClass moduleContainerEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link PropertiesPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static PropertiesPackage init() { + if (isInited) return (PropertiesPackage)EPackage.Registry.INSTANCE.getEPackage(PropertiesPackage.eNS_URI); + + // Obtain or create and register package + PropertiesPackageImpl thePropertiesPackage = (PropertiesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PropertiesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PropertiesPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + thePropertiesPackage.createPackageContents(); + + // Initialize created meta-data + thePropertiesPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thePropertiesPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(PropertiesPackage.eNS_URI, thePropertiesPackage); + return thePropertiesPackage; + } + + /** + * + * + * @generated + */ + public EClass getAbstractProperty() { + return abstractPropertyEClass; + } + + /** + * + * + * @generated + */ + public EClass getProperty() { + return propertyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getProperty_Name() { + return (EAttribute)propertyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getProperty_Value() { + return (EAttribute)propertyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getModuleProperty() { + return modulePropertyEClass; + } + + /** + * + * + * @generated + */ + public EClass getModule() { + return moduleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getModule_Version() { + return (EAttribute)moduleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getModule_SubModules() { + return (EReference)moduleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getModuleContainer() { + return moduleContainerEClass; + } + + /** + * + * + * @generated + */ + public EReference getModuleContainer_Modules() { + return (EReference)moduleContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public PropertiesFactory getPropertiesFactory() { + return (PropertiesFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + abstractPropertyEClass = createEClass(ABSTRACT_PROPERTY); + + propertyEClass = createEClass(PROPERTY); + createEAttribute(propertyEClass, PROPERTY__NAME); + createEAttribute(propertyEClass, PROPERTY__VALUE); + + modulePropertyEClass = createEClass(MODULE_PROPERTY); + + moduleEClass = createEClass(MODULE); + createEAttribute(moduleEClass, MODULE__VERSION); + createEReference(moduleEClass, MODULE__SUB_MODULES); + + moduleContainerEClass = createEClass(MODULE_CONTAINER); + createEReference(moduleContainerEClass, MODULE_CONTAINER__MODULES); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + propertyEClass.getESuperTypes().add(this.getAbstractProperty()); + modulePropertyEClass.getESuperTypes().add(this.getAbstractProperty()); + modulePropertyEClass.getESuperTypes().add(this.getModule()); + moduleEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(abstractPropertyEClass, AbstractProperty.class, "AbstractProperty", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProperty_Name(), theEcorePackage.getEString(), "name", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProperty_Value(), theEcorePackage.getEString(), "value", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(modulePropertyEClass, ModuleProperty.class, "ModuleProperty", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(moduleEClass, Module.class, "Module", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getModule_Version(), theEcorePackage.getEString(), "version", null, 0, 1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModule_SubModules(), this.getModule(), null, "subModules", null, 0, -1, Module.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(moduleContainerEClass, ModuleContainer.class, "ModuleContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModuleContainer_Modules(), this.getModule(), null, "modules", null, 0, -1, ModuleContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "GenModel", "http://www.eclipse.org/emf/2002/GenModel", + "doc", "http://openecomp.org/sirius/doc" + }); + } + +} //PropertiesPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertyImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertyImpl.java new file mode 100644 index 0000000..08df14f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/impl/PropertyImpl.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.sirius.manager.properties.impl; + +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; +import org.openecomp.ncomp.sirius.manager.properties.Property; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Property'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.properties.impl.PropertyImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class PropertyImpl extends AbstractPropertyImpl implements Property { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected PropertyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.PROPERTY; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.PROPERTY__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.PROPERTY__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.PROPERTY__NAME: + return getName(); + case PropertiesPackage.PROPERTY__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.PROPERTY__NAME: + setName((String)newValue); + return; + case PropertiesPackage.PROPERTY__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.PROPERTY__NAME: + setName(NAME_EDEFAULT); + return; + case PropertiesPackage.PROPERTY__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.PROPERTY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case PropertiesPackage.PROPERTY__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //PropertyImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesAdapterFactory.java new file mode 100644 index 0000000..3a15e72 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesAdapterFactory.java @@ -0,0 +1,233 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.properties.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.properties.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage + * @generated + */ +public class PropertiesAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static PropertiesPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public PropertiesAdapterFactory() { + if (modelPackage == null) { + modelPackage = PropertiesPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected PropertiesSwitch modelSwitch = + new PropertiesSwitch() { + @Override + public Adapter caseAbstractProperty(AbstractProperty object) { + return createAbstractPropertyAdapter(); + } + @Override + public Adapter caseProperty(Property object) { + return createPropertyAdapter(); + } + @Override + public Adapter caseModuleProperty(ModuleProperty object) { + return createModulePropertyAdapter(); + } + @Override + public Adapter caseModule(Module object) { + return createModuleAdapter(); + } + @Override + public Adapter caseModuleContainer(ModuleContainer object) { + return createModuleContainerAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.AbstractProperty Abstract Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.AbstractProperty + * @generated + */ + public Adapter createAbstractPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.Property Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.Property + * @generated + */ + public Adapter createPropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleProperty Module Property}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleProperty + * @generated + */ + public Adapter createModulePropertyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.Module Module}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.Module + * @generated + */ + public Adapter createModuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleContainer Module Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleContainer + * @generated + */ + public Adapter createModuleContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //PropertiesAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesSwitch.java new file mode 100644 index 0000000..e67e811 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/properties/util/PropertiesSwitch.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.sirius.manager.properties.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.properties.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage + * @generated + */ +public class PropertiesSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static PropertiesPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public PropertiesSwitch() { + if (modelPackage == null) { + modelPackage = PropertiesPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case PropertiesPackage.ABSTRACT_PROPERTY: { + AbstractProperty abstractProperty = (AbstractProperty)theEObject; + T result = caseAbstractProperty(abstractProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertiesPackage.PROPERTY: { + Property property = (Property)theEObject; + T result = caseProperty(property); + if (result == null) result = caseAbstractProperty(property); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertiesPackage.MODULE_PROPERTY: { + ModuleProperty moduleProperty = (ModuleProperty)theEObject; + T result = caseModuleProperty(moduleProperty); + if (result == null) result = caseAbstractProperty(moduleProperty); + if (result == null) result = caseModule(moduleProperty); + if (result == null) result = caseNamedEntity(moduleProperty); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertiesPackage.MODULE: { + Module module = (Module)theEObject; + T result = caseModule(module); + if (result == null) result = caseNamedEntity(module); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertiesPackage.MODULE_CONTAINER: { + ModuleContainer moduleContainer = (ModuleContainer)theEObject; + T result = caseModuleContainer(moduleContainer); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractProperty(AbstractProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProperty(Property object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Module Property'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Module Property'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModuleProperty(ModuleProperty object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Module'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Module'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModule(Module object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Module Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Module Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModuleContainer(ModuleContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //PropertiesSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServer.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServer.java new file mode 100644 index 0000000..853c2eb --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServer.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.sirius.manager.server; + +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +/** + * + * A representation of the model object 'Abstract Management Server'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getComponent Component}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServer() + * @model + * @generated + */ +public interface AbstractManagementServer extends SouthBoundApiWithProxy { + /** + * Returns the value of the 'Configuration' containment reference. + * + *

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

+ * + * @return the value of the 'Configuration' containment reference. + * @see #setConfiguration(AbstractManagementServerConfiguration) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServer_Configuration() + * @model containment="true" + * @generated + */ + AbstractManagementServerConfiguration getConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getConfiguration Configuration}' containment reference. + * + * + * @param value the new value of the 'Configuration' containment reference. + * @see #getConfiguration() + * @generated + */ + void setConfiguration(AbstractManagementServerConfiguration value); + + /** + * Returns the value of the 'Component' containment reference. + * + *

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

+ * + * @return the value of the 'Component' containment reference. + * @see #setComponent(Component) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServer_Component() + * @model containment="true" + * @generated + */ + Component getComponent(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getComponent Component}' containment reference. + * + * + * @param value the new value of the 'Component' containment reference. + * @see #getComponent() + * @generated + */ + void setComponent(Component value); + + /** + * + * + * @model unique="false" cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" pathUnique="false" startUnique="false" endUnique="false" optionUnique="false" relativeIntervalUnique="false" + * @generated + */ + EList getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval); + + /** + * + * + * @model unique="false" cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" pathUnique="false" metricsUnique="false" metricsMany="true" startUnique="false" endUnique="false" optionUnique="false" relativeIntervalUnique="false" + * @generated + */ + EList getValuesAll(JSONObject cx, String path, EList metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval); + + /** + * + * + * @model unique="false" cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" pathUnique="false" startUnique="false" endUnique="false" + * @generated + */ + EList getMessages(JSONObject cx, String path, Long start, Long end); + + /** + * + * + * @model unique="false" userNameUnique="false" actionUnique="false" resourcePathUnique="false" contextDataType="org.openecomp.ncomp.core.JsonObject" contextUnique="false" + * @generated + */ + LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context); + + /** + * + * + * @model unique="false" pathUnique="false" functionUnique="false" + * @generated + */ + EList evaluate(String path, Function function); + + /** + * + * + * @model pathUnique="false" functionUnique="false" + * @generated + */ + void update(String path, Function function); + +} // AbstractManagementServer diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServerConfiguration.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServerConfiguration.java new file mode 100644 index 0000000..347dacf --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/AbstractManagementServerConfiguration.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.sirius.manager.server; + +import org.openecomp.ncomp.core.alerts.AlertingTemplate; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.logs.LogMessageRule; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer; +import org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Abstract Management Server Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getRules Rules}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getMetricOptions Metric Options}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getTableTemplates Table Templates}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getAlertTemplates Alert Templates}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getFunctions Functions}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration() + * @model + * @generated + */ +public interface AbstractManagementServerConfiguration extends ModuleContainer { + /** + * Returns the value of the 'Rules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageRule}. + * + *

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

+ * + * @return the value of the 'Rules' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration_Rules() + * @model containment="true" + * @generated + */ + EList getRules(); + + /** + * Returns the value of the 'Metric Options' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.MetricValueOption}. + * + *

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

+ * + * @return the value of the 'Metric Options' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration_MetricOptions() + * @model containment="true" ordered="false" + * @generated + */ + EList getMetricOptions(); + + /** + * Returns the value of the 'Table Templates' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate}. + * + *

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

+ * + * @return the value of the 'Table Templates' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration_TableTemplates() + * @model containment="true" + * @generated + */ + EList getTableTemplates(); + + /** + * Returns the value of the 'Alert Templates' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.alerts.AlertingTemplate}. + * + *

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

+ * + * @return the value of the 'Alert Templates' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration_AlertTemplates() + * @model containment="true" ordered="false" + * @generated + */ + EList getAlertTemplates(); + + /** + * Returns the value of the 'Functions' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.Function}. + * + *

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

+ * + * @return the value of the 'Functions' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getAbstractManagementServerConfiguration_Functions() + * @model containment="true" ordered="false" + * @generated + */ + EList getFunctions(); + +} // AbstractManagementServerConfiguration diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/LoggerInfo.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/LoggerInfo.java new file mode 100644 index 0000000..20db441 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/LoggerInfo.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.sirius.manager.server; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Logger Info'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.LoggerInfo#getName Name}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getLoggerInfo() + * @model + * @generated + */ +public interface LoggerInfo extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getLoggerInfo_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.LoggerInfo#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // LoggerInfo diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ManagementInfo.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ManagementInfo.java new file mode 100644 index 0000000..768af20 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ManagementInfo.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.sirius.manager.server; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Management Info'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getIp Ip}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getMetrics Metrics}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getLogs Logs}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getProps Props}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getManagementInfo() + * @model + * @generated + */ +public interface ManagementInfo extends EObject { + /** + * Returns the value of the 'Ip' attribute. + * + *

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

+ * + * @return the value of the 'Ip' attribute. + * @see #setIp(String) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getManagementInfo_Ip() + * @model unique="false" + * @generated + */ + String getIp(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getIp Ip}' attribute. + * + * + * @param value the new value of the 'Ip' attribute. + * @see #getIp() + * @generated + */ + void setIp(String value); + + /** + * Returns the value of the 'Metrics' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.Metric}. + * + *

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

+ * + * @return the value of the 'Metrics' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getManagementInfo_Metrics() + * @model containment="true" + * @generated + */ + EList getMetrics(); + + /** + * Returns the value of the 'Logs' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessage}. + * + *

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

+ * + * @return the value of the 'Logs' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getManagementInfo_Logs() + * @model containment="true" + * @generated + */ + EList getLogs(); + + /** + * Returns the value of the 'Props' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.properties.AbstractProperty}. + * + *

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

+ * + * @return the value of the 'Props' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getManagementInfo_Props() + * @model containment="true" + * @generated + */ + EList getProps(); + +} // ManagementInfo diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/Module.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/Module.java new file mode 100644 index 0000000..7b9a990 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/Module.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.sirius.manager.server; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Module'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.Module#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.Module#getSubModules Sub Modules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getModule() + * @model + * @generated + */ +public interface Module extends NamedEntity { + /** + * Returns the value of the 'Version' attribute. + * + *

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

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getModule_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.Module#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Sub Modules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.server.Module}. + * + *

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

+ * + * @return the value of the 'Sub Modules' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getModule_SubModules() + * @model containment="true" + * @generated + */ + EList getSubModules(); + +} // Module diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ModuleContainer.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ModuleContainer.java new file mode 100644 index 0000000..32c7f09 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ModuleContainer.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.sirius.manager.server; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Module Container'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.ModuleContainer#getModules Modules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getModuleContainer() + * @model abstract="true" + * @generated + */ +public interface ModuleContainer extends EObject { + /** + * Returns the value of the 'Modules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.server.Module}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.Response#getStatus Status}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.Response#getMessage Message}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getResponse() + * @model + * @generated + */ +public interface Response extends EObject { + /** + * Returns the value of the 'Status' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.sirius.manager.server.ResponseStatus}. + * + *

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

+ * + * @return the value of the 'Status' attribute. + * @see org.openecomp.ncomp.sirius.manager.server.ResponseStatus + * @see #setStatus(ResponseStatus) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getResponse_Status() + * @model unique="false" + * @generated + */ + ResponseStatus getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.Response#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see org.openecomp.ncomp.sirius.manager.server.ResponseStatus + * @see #getStatus() + * @generated + */ + void setStatus(ResponseStatus value); + + /** + * Returns the value of the 'Message' attribute. + * + *

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

+ * + * @return the value of the 'Message' attribute. + * @see #setMessage(String) + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getResponse_Message() + * @model unique="false" + * @generated + */ + String getMessage(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.server.Response#getMessage Message}' attribute. + * + * + * @param value the new value of the 'Message' attribute. + * @see #getMessage() + * @generated + */ + void setMessage(String value); + +} // Response diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ResponseStatus.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ResponseStatus.java new file mode 100644 index 0000000..172641a --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ResponseStatus.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.sirius.manager.server; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Response Status', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getResponseStatus() + * @model + * @generated + */ +public enum ResponseStatus implements Enumerator { + /** + * The 'OK' literal object. + * + * + * @see #OK_VALUE + * @generated + * @ordered + */ + OK(0, "OK", "OK"), + + /** + * The 'WARN' literal object. + * + * + * @see #WARN_VALUE + * @generated + * @ordered + */ + WARN(0, "WARN", "WARN"), + + /** + * The 'ERROR' literal object. + * + * + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"); + + /** + * The 'OK' literal value. + * + *

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

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

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

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

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

+ * + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * An array of all the 'Response Status' enumerators. + * + * + * @generated + */ + private static final ResponseStatus[] VALUES_ARRAY = + new ResponseStatus[] { + OK, + WARN, + ERROR, + }; + + /** + * A public read-only list of all the 'Response Status' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Response Status' literal with the specified literal value. + * + * + * @generated + */ + public static ResponseStatus get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ResponseStatus result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Response Status' literal with the specified name. + * + * + * @generated + */ + public static ResponseStatus getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ResponseStatus result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Response Status' literal with the specified integer value. + * + * + * @generated + */ + public static ResponseStatus get(int value) { + switch (value) { + case OK_VALUE: return OK; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private ResponseStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //ResponseStatus diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerFactory.java new file mode 100644 index 0000000..cffc535 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerFactory.java @@ -0,0 +1,117 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage + * @generated + */ +public interface ServerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ServerFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.server.impl.ServerFactoryImpl.init(); + + /** + * Returns a new object of class 'South Bound Api With Proxy'. + * + * + * @return a new object of class 'South Bound Api With Proxy'. + * @generated + */ + SouthBoundApiWithProxy createSouthBoundApiWithProxy(); + + /** + * Returns a new object of class 'South Bound Api'. + * + * + * @return a new object of class 'South Bound Api'. + * @generated + */ + SouthBoundApi createSouthBoundApi(); + + /** + * Returns a new object of class 'Management Info'. + * + * + * @return a new object of class 'Management Info'. + * @generated + */ + ManagementInfo createManagementInfo(); + + /** + * Returns a new object of class 'Response'. + * + * + * @return a new object of class 'Response'. + * @generated + */ + Response createResponse(); + + /** + * Returns a new object of class 'Logger Info'. + * + * + * @return a new object of class 'Logger Info'. + * @generated + */ + LoggerInfo createLoggerInfo(); + + /** + * Returns a new object of class 'Abstract Management Server'. + * + * + * @return a new object of class 'Abstract Management Server'. + * @generated + */ + AbstractManagementServer createAbstractManagementServer(); + + /** + * Returns a new object of class 'Abstract Management Server Configuration'. + * + * + * @return a new object of class 'Abstract Management Server Configuration'. + * @generated + */ + AbstractManagementServerConfiguration createAbstractManagementServerConfiguration(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ServerPackage getServerPackage(); + +} //ServerFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerPackage.java new file mode 100644 index 0000000..8781f5b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/ServerPackage.java @@ -0,0 +1,1210 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server; + +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.server.ServerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager'" + * annotation="http://www.eclipse.org/emf/2011/Xcore GenModel='http://www.eclipse.org/emf/2002/GenModel' doc='http://openecomp.org/sirius/doc'" + * @generated + */ +public interface ServerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "server"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.server"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "server"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ServerPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl South Bound Api}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getSouthBoundApi() + * @generated + */ + int SOUTH_BOUND_API = 1; + + /** + * The number of structural features of the 'South Bound Api' class. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_FEATURE_COUNT = 0; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST = 0; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST = 1; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST = 2; + + /** + * The number of operations of the 'South Bound Api' class. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_OPERATION_COUNT = 3; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl South Bound Api With Proxy}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getSouthBoundApiWithProxy() + * @generated + */ + int SOUTH_BOUND_API_WITH_PROXY = 0; + + /** + * The number of structural features of the 'South Bound Api With Proxy' class. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT = SOUTH_BOUND_API_FEATURE_COUNT + 0; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY___LOGS__JSONOBJECT_ELIST = SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY___METRICS__JSONOBJECT_ELIST = SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY___PROPERTIES__JSONOBJECT_ELIST = SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST = SOUTH_BOUND_API_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'South Bound Api With Proxy' class. + * + * + * @generated + * @ordered + */ + int SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT = SOUTH_BOUND_API_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl Management Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getManagementInfo() + * @generated + */ + int MANAGEMENT_INFO = 2; + + /** + * The feature id for the 'Ip' attribute. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO__IP = 0; + + /** + * The feature id for the 'Metrics' containment reference list. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO__METRICS = 1; + + /** + * The feature id for the 'Logs' containment reference list. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO__LOGS = 2; + + /** + * The feature id for the 'Props' containment reference list. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO__PROPS = 3; + + /** + * The number of structural features of the 'Management Info' class. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Management Info' class. + * + * + * @generated + * @ordered + */ + int MANAGEMENT_INFO_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl Response}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getResponse() + * @generated + */ + int RESPONSE = 3; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int RESPONSE__STATUS = 0; + + /** + * The feature id for the 'Message' attribute. + * + * + * @generated + * @ordered + */ + int RESPONSE__MESSAGE = 1; + + /** + * The number of structural features of the 'Response' class. + * + * + * @generated + * @ordered + */ + int RESPONSE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Response' class. + * + * + * @generated + * @ordered + */ + int RESPONSE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.LoggerInfoImpl Logger Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.LoggerInfoImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getLoggerInfo() + * @generated + */ + int LOGGER_INFO = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOGGER_INFO__NAME = 0; + + /** + * The number of structural features of the 'Logger Info' class. + * + * + * @generated + * @ordered + */ + int LOGGER_INFO_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Logger Info' class. + * + * + * @generated + * @ordered + */ + int LOGGER_INFO_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl Abstract Management Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getAbstractManagementServer() + * @generated + */ + int ABSTRACT_MANAGEMENT_SERVER = 5; + + /** + * The feature id for the 'Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION = SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Component' containment reference. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER__COMPONENT = SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Abstract Management Server' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_FEATURE_COUNT = SOUTH_BOUND_API_WITH_PROXY_FEATURE_COUNT + 2; + + /** + * The operation id for the 'Logs' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___LOGS__JSONOBJECT_ELIST = SOUTH_BOUND_API_WITH_PROXY___LOGS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Metrics' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___METRICS__JSONOBJECT_ELIST = SOUTH_BOUND_API_WITH_PROXY___METRICS__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Properties' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___PROPERTIES__JSONOBJECT_ELIST = SOUTH_BOUND_API_WITH_PROXY___PROPERTIES__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Upload Info' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___UPLOAD_INFO__JSONOBJECT_ELIST = SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST; + + /** + * The operation id for the 'Get Values' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 0; + + /** + * The operation id for the 'Get Values All' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 1; + + /** + * The operation id for the 'Get Messages' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 2; + + /** + * The operation id for the 'Get Request Logger' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 3; + + /** + * The operation id for the 'Evaluate' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 4; + + /** + * The operation id for the 'Update' operation. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 5; + + /** + * The number of operations of the 'Abstract Management Server' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_OPERATION_COUNT = SOUTH_BOUND_API_WITH_PROXY_OPERATION_COUNT + 6; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl Abstract Management Server Configuration}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getAbstractManagementServerConfiguration() + * @generated + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION = 6; + + /** + * The feature id for the 'Modules' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__MODULES = PropertiesPackage.MODULE_CONTAINER__MODULES; + + /** + * The feature id for the 'Rules' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Metric Options' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Table Templates' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Alert Templates' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Functions' containment reference list. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Abstract Management Server Configuration' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION_FEATURE_COUNT = PropertiesPackage.MODULE_CONTAINER_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Abstract Management Server Configuration' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION_OPERATION_COUNT = PropertiesPackage.MODULE_CONTAINER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.server.ResponseStatus Response Status}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.ResponseStatus + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getResponseStatus() + * @generated + */ + int RESPONSE_STATUS = 7; + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * + * @return the meta object for class 'South Bound Api With Proxy'. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + EClass getSouthBoundApiWithProxy(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy#uploadInfo(org.json.JSONObject, org.eclipse.emf.common.util.EList) Upload Info}' operation. + * + * + * @return the meta object for the 'Upload Info' operation. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy#uploadInfo(org.json.JSONObject, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getSouthBoundApiWithProxy__UploadInfo__JSONObject_EList(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * + * @return the meta object for class 'South Bound Api'. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + EClass getSouthBoundApi(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#logs(org.json.JSONObject, org.eclipse.emf.common.util.EList) Logs}' operation. + * + * + * @return the meta object for the 'Logs' operation. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#logs(org.json.JSONObject, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getSouthBoundApi__Logs__JSONObject_EList(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#metrics(org.json.JSONObject, org.eclipse.emf.common.util.EList) Metrics}' operation. + * + * + * @return the meta object for the 'Metrics' operation. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#metrics(org.json.JSONObject, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getSouthBoundApi__Metrics__JSONObject_EList(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#properties(org.json.JSONObject, org.eclipse.emf.common.util.EList) Properties}' operation. + * + * + * @return the meta object for the 'Properties' operation. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi#properties(org.json.JSONObject, org.eclipse.emf.common.util.EList) + * @generated + */ + EOperation getSouthBoundApi__Properties__JSONObject_EList(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo Management Info}'. + * + * + * @return the meta object for class 'Management Info'. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo + * @generated + */ + EClass getManagementInfo(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getIp Ip}'. + * + * + * @return the meta object for the attribute 'Ip'. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getIp() + * @see #getManagementInfo() + * @generated + */ + EAttribute getManagementInfo_Ip(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getMetrics Metrics}'. + * + * + * @return the meta object for the containment reference list 'Metrics'. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getMetrics() + * @see #getManagementInfo() + * @generated + */ + EReference getManagementInfo_Metrics(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getLogs Logs}'. + * + * + * @return the meta object for the containment reference list 'Logs'. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getLogs() + * @see #getManagementInfo() + * @generated + */ + EReference getManagementInfo_Logs(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getProps Props}'. + * + * + * @return the meta object for the containment reference list 'Props'. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo#getProps() + * @see #getManagementInfo() + * @generated + */ + EReference getManagementInfo_Props(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.Response Response}'. + * + * + * @return the meta object for class 'Response'. + * @see org.openecomp.ncomp.sirius.manager.server.Response + * @generated + */ + EClass getResponse(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.server.Response#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.ncomp.sirius.manager.server.Response#getStatus() + * @see #getResponse() + * @generated + */ + EAttribute getResponse_Status(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.server.Response#getMessage Message}'. + * + * + * @return the meta object for the attribute 'Message'. + * @see org.openecomp.ncomp.sirius.manager.server.Response#getMessage() + * @see #getResponse() + * @generated + */ + EAttribute getResponse_Message(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.LoggerInfo Logger Info}'. + * + * + * @return the meta object for class 'Logger Info'. + * @see org.openecomp.ncomp.sirius.manager.server.LoggerInfo + * @generated + */ + EClass getLoggerInfo(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.server.LoggerInfo#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.server.LoggerInfo#getName() + * @see #getLoggerInfo() + * @generated + */ + EAttribute getLoggerInfo_Name(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * + * @return the meta object for class 'Abstract Management Server'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + EClass getAbstractManagementServer(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getConfiguration Configuration}'. + * + * + * @return the meta object for the containment reference 'Configuration'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getConfiguration() + * @see #getAbstractManagementServer() + * @generated + */ + EReference getAbstractManagementServer_Configuration(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getComponent Component}'. + * + * + * @return the meta object for the containment reference 'Component'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getComponent() + * @see #getAbstractManagementServer() + * @generated + */ + EReference getAbstractManagementServer_Component(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getValues(org.json.JSONObject, java.lang.String, java.lang.Long, java.lang.Long, org.openecomp.ncomp.core.metrics.MetricValueOption, boolean) Get Values}' operation. + * + * + * @return the meta object for the 'Get Values' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getValues(org.json.JSONObject, java.lang.String, java.lang.Long, java.lang.Long, org.openecomp.ncomp.core.metrics.MetricValueOption, boolean) + * @generated + */ + EOperation getAbstractManagementServer__GetValues__JSONObject_String_Long_Long_MetricValueOption_boolean(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getValuesAll(org.json.JSONObject, java.lang.String, org.eclipse.emf.common.util.EList, java.lang.Long, java.lang.Long, org.openecomp.ncomp.core.metrics.MetricValueOption, boolean) Get Values All}' operation. + * + * + * @return the meta object for the 'Get Values All' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getValuesAll(org.json.JSONObject, java.lang.String, org.eclipse.emf.common.util.EList, java.lang.Long, java.lang.Long, org.openecomp.ncomp.core.metrics.MetricValueOption, boolean) + * @generated + */ + EOperation getAbstractManagementServer__GetValuesAll__JSONObject_String_EList_Long_Long_MetricValueOption_boolean(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getMessages(org.json.JSONObject, java.lang.String, java.lang.Long, java.lang.Long) Get Messages}' operation. + * + * + * @return the meta object for the 'Get Messages' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getMessages(org.json.JSONObject, java.lang.String, java.lang.Long, java.lang.Long) + * @generated + */ + EOperation getAbstractManagementServer__GetMessages__JSONObject_String_Long_Long(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getRequestLogger(java.lang.String, java.lang.String, java.lang.String, org.json.JSONObject) Get Request Logger}' operation. + * + * + * @return the meta object for the 'Get Request Logger' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#getRequestLogger(java.lang.String, java.lang.String, java.lang.String, org.json.JSONObject) + * @generated + */ + EOperation getAbstractManagementServer__GetRequestLogger__String_String_String_JSONObject(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#evaluate(java.lang.String, org.openecomp.ncomp.core.function.Function) Evaluate}' operation. + * + * + * @return the meta object for the 'Evaluate' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#evaluate(java.lang.String, org.openecomp.ncomp.core.function.Function) + * @generated + */ + EOperation getAbstractManagementServer__Evaluate__String_Function(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#update(java.lang.String, org.openecomp.ncomp.core.function.Function) Update}' operation. + * + * + * @return the meta object for the 'Update' operation. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer#update(java.lang.String, org.openecomp.ncomp.core.function.Function) + * @generated + */ + EOperation getAbstractManagementServer__Update__String_Function(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration Abstract Management Server Configuration}'. + * + * + * @return the meta object for class 'Abstract Management Server Configuration'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration + * @generated + */ + EClass getAbstractManagementServerConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getRules Rules}'. + * + * + * @return the meta object for the containment reference list 'Rules'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getRules() + * @see #getAbstractManagementServerConfiguration() + * @generated + */ + EReference getAbstractManagementServerConfiguration_Rules(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getMetricOptions Metric Options}'. + * + * + * @return the meta object for the containment reference list 'Metric Options'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getMetricOptions() + * @see #getAbstractManagementServerConfiguration() + * @generated + */ + EReference getAbstractManagementServerConfiguration_MetricOptions(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getTableTemplates Table Templates}'. + * + * + * @return the meta object for the containment reference list 'Table Templates'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getTableTemplates() + * @see #getAbstractManagementServerConfiguration() + * @generated + */ + EReference getAbstractManagementServerConfiguration_TableTemplates(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getAlertTemplates Alert Templates}'. + * + * + * @return the meta object for the containment reference list 'Alert Templates'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getAlertTemplates() + * @see #getAbstractManagementServerConfiguration() + * @generated + */ + EReference getAbstractManagementServerConfiguration_AlertTemplates(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getFunctions Functions}'. + * + * + * @return the meta object for the containment reference list 'Functions'. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration#getFunctions() + * @see #getAbstractManagementServerConfiguration() + * @generated + */ + EReference getAbstractManagementServerConfiguration_Functions(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.sirius.manager.server.ResponseStatus Response Status}'. + * + * + * @return the meta object for enum 'Response Status'. + * @see org.openecomp.ncomp.sirius.manager.server.ResponseStatus + * @generated + */ + EEnum getResponseStatus(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ServerFactory getServerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl South Bound Api With Proxy}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiWithProxyImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getSouthBoundApiWithProxy() + * @generated + */ + EClass SOUTH_BOUND_API_WITH_PROXY = eINSTANCE.getSouthBoundApiWithProxy(); + + /** + * The meta object literal for the 'Upload Info' operation. + * + * + * @generated + */ + EOperation SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST = eINSTANCE.getSouthBoundApiWithProxy__UploadInfo__JSONObject_EList(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl South Bound Api}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.SouthBoundApiImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getSouthBoundApi() + * @generated + */ + EClass SOUTH_BOUND_API = eINSTANCE.getSouthBoundApi(); + + /** + * The meta object literal for the 'Logs' operation. + * + * + * @generated + */ + EOperation SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST = eINSTANCE.getSouthBoundApi__Logs__JSONObject_EList(); + + /** + * The meta object literal for the 'Metrics' operation. + * + * + * @generated + */ + EOperation SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST = eINSTANCE.getSouthBoundApi__Metrics__JSONObject_EList(); + + /** + * The meta object literal for the 'Properties' operation. + * + * + * @generated + */ + EOperation SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST = eINSTANCE.getSouthBoundApi__Properties__JSONObject_EList(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl Management Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getManagementInfo() + * @generated + */ + EClass MANAGEMENT_INFO = eINSTANCE.getManagementInfo(); + + /** + * The meta object literal for the 'Ip' attribute feature. + * + * + * @generated + */ + EAttribute MANAGEMENT_INFO__IP = eINSTANCE.getManagementInfo_Ip(); + + /** + * The meta object literal for the 'Metrics' containment reference list feature. + * + * + * @generated + */ + EReference MANAGEMENT_INFO__METRICS = eINSTANCE.getManagementInfo_Metrics(); + + /** + * The meta object literal for the 'Logs' containment reference list feature. + * + * + * @generated + */ + EReference MANAGEMENT_INFO__LOGS = eINSTANCE.getManagementInfo_Logs(); + + /** + * The meta object literal for the 'Props' containment reference list feature. + * + * + * @generated + */ + EReference MANAGEMENT_INFO__PROPS = eINSTANCE.getManagementInfo_Props(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl Response}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getResponse() + * @generated + */ + EClass RESPONSE = eINSTANCE.getResponse(); + + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute RESPONSE__STATUS = eINSTANCE.getResponse_Status(); + + /** + * The meta object literal for the 'Message' attribute feature. + * + * + * @generated + */ + EAttribute RESPONSE__MESSAGE = eINSTANCE.getResponse_Message(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.LoggerInfoImpl Logger Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.LoggerInfoImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getLoggerInfo() + * @generated + */ + EClass LOGGER_INFO = eINSTANCE.getLoggerInfo(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute LOGGER_INFO__NAME = eINSTANCE.getLoggerInfo_Name(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl Abstract Management Server}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getAbstractManagementServer() + * @generated + */ + EClass ABSTRACT_MANAGEMENT_SERVER = eINSTANCE.getAbstractManagementServer(); + + /** + * The meta object literal for the 'Configuration' containment reference feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION = eINSTANCE.getAbstractManagementServer_Configuration(); + + /** + * The meta object literal for the 'Component' containment reference feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER__COMPONENT = eINSTANCE.getAbstractManagementServer_Component(); + + /** + * The meta object literal for the 'Get Values' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN = eINSTANCE.getAbstractManagementServer__GetValues__JSONObject_String_Long_Long_MetricValueOption_boolean(); + + /** + * The meta object literal for the 'Get Values All' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN = eINSTANCE.getAbstractManagementServer__GetValuesAll__JSONObject_String_EList_Long_Long_MetricValueOption_boolean(); + + /** + * The meta object literal for the 'Get Messages' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG = eINSTANCE.getAbstractManagementServer__GetMessages__JSONObject_String_Long_Long(); + + /** + * The meta object literal for the 'Get Request Logger' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT = eINSTANCE.getAbstractManagementServer__GetRequestLogger__String_String_String_JSONObject(); + + /** + * The meta object literal for the 'Evaluate' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION = eINSTANCE.getAbstractManagementServer__Evaluate__String_Function(); + + /** + * The meta object literal for the 'Update' operation. + * + * + * @generated + */ + EOperation ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION = eINSTANCE.getAbstractManagementServer__Update__String_Function(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl Abstract Management Server Configuration}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getAbstractManagementServerConfiguration() + * @generated + */ + EClass ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION = eINSTANCE.getAbstractManagementServerConfiguration(); + + /** + * The meta object literal for the 'Rules' containment reference list feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES = eINSTANCE.getAbstractManagementServerConfiguration_Rules(); + + /** + * The meta object literal for the 'Metric Options' containment reference list feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS = eINSTANCE.getAbstractManagementServerConfiguration_MetricOptions(); + + /** + * The meta object literal for the 'Table Templates' containment reference list feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES = eINSTANCE.getAbstractManagementServerConfiguration_TableTemplates(); + + /** + * The meta object literal for the 'Alert Templates' containment reference list feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES = eINSTANCE.getAbstractManagementServerConfiguration_AlertTemplates(); + + /** + * The meta object literal for the 'Functions' containment reference list feature. + * + * + * @generated + */ + EReference ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS = eINSTANCE.getAbstractManagementServerConfiguration_Functions(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.server.ResponseStatus Response Status}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.server.ResponseStatus + * @see org.openecomp.ncomp.sirius.manager.server.impl.ServerPackageImpl#getResponseStatus() + * @generated + */ + EEnum RESPONSE_STATUS = eINSTANCE.getResponseStatus(); + + } + +} //ServerPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApi.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApi.java new file mode 100644 index 0000000..79b39d6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApi.java @@ -0,0 +1,75 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.json.JSONObject; + +/** + * + * A representation of the model object 'South Bound Api'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getSouthBoundApi() + * @model + * @generated + */ +public interface SouthBoundApi extends EObject { + /** + * + * + * @model cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" + * cxAnnotation="http://openecomp.org/sirius/doc description='This parameter is for internal use and is ignored if set by client.'" logsUnique="false" logsMany="true" + * logsAnnotation="http://openecomp.org/sirius/doc description='List of log message to inform the management system about.'" + * annotation="http://openecomp.org/sirius/doc description='This operation allows the clients to report log messages \r\n\tand overall state of the client'" + * @generated + */ + void logs(JSONObject cx, EList logs); + + /** + * + * + * @model cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" + * cxAnnotation="http://openecomp.org/sirius/doc description='This parameter is for internal use and is ignored if set by client.'" metricsUnique="false" metricsMany="true" + * annotation="http://openecomp.org/sirius/doc description='This operation allows the client VMs to report metrics \r\n\t\tand overall state of the VM'" + * @generated + */ + void metrics(JSONObject cx, EList metrics); + + /** + * + * + * @model cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" + * cxAnnotation="http://openecomp.org/sirius/doc description='This parameter is for internal use and is ignored if set by client.'" lUnique="false" lMany="true" + * annotation="http://openecomp.org/sirius/doc description='Used by the BSA Management Agent to report \r\n\tproperty key value pairs to the BSA Controller.'" + * @generated + */ + void properties(JSONObject cx, EList l); + +} // SouthBoundApi diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApiWithProxy.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApiWithProxy.java new file mode 100644 index 0000000..faa56b6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/SouthBoundApiWithProxy.java @@ -0,0 +1,48 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server; + +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +/** + * + * A representation of the model object 'South Bound Api With Proxy'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage#getSouthBoundApiWithProxy() + * @model + * @generated + */ +public interface SouthBoundApiWithProxy extends SouthBoundApi { + /** + * + * + * @model cxDataType="org.openecomp.ncomp.core.RemoteContext" cxUnique="false" infoUnique="false" infoMany="true" + * @generated + */ + void uploadInfo(JSONObject cx, EList info); + +} // SouthBoundApiWithProxy diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerConfigurationImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerConfigurationImpl.java new file mode 100644 index 0000000..894064c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerConfigurationImpl.java @@ -0,0 +1,315 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.core.alerts.AlertingTemplate; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.logs.LogMessageRule; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.sirius.manager.properties.impl.ModuleContainerImpl; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Abstract Management Server Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl#getRules Rules}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl#getMetricOptions Metric Options}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl#getTableTemplates Table Templates}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl#getAlertTemplates Alert Templates}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerConfigurationImpl#getFunctions Functions}
  • + *
+ *

+ * + * @generated + */ +public class AbstractManagementServerConfigurationImpl extends ModuleContainerImpl implements AbstractManagementServerConfiguration { + /** + * The cached value of the '{@link #getRules() Rules}' containment reference list. + * + * + * @see #getRules() + * @generated + * @ordered + */ + protected EList rules; + + /** + * The cached value of the '{@link #getMetricOptions() Metric Options}' containment reference list. + * + * + * @see #getMetricOptions() + * @generated + * @ordered + */ + protected EList metricOptions; + + /** + * The cached value of the '{@link #getTableTemplates() Table Templates}' containment reference list. + * + * + * @see #getTableTemplates() + * @generated + * @ordered + */ + protected EList tableTemplates; + + /** + * The cached value of the '{@link #getAlertTemplates() Alert Templates}' containment reference list. + * + * + * @see #getAlertTemplates() + * @generated + * @ordered + */ + protected EList alertTemplates; + + /** + * The cached value of the '{@link #getFunctions() Functions}' containment reference list. + * + * + * @see #getFunctions() + * @generated + * @ordered + */ + protected EList functions; + + /** + * + * + * @generated + */ + protected AbstractManagementServerConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getRules() { + if (rules == null) { + rules = new EObjectContainmentEList(LogMessageRule.class, this, ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES); + } + return rules; + } + + /** + * + * + * @generated + */ + public EList getMetricOptions() { + if (metricOptions == null) { + metricOptions = new EObjectContainmentEList(MetricValueOption.class, this, ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS); + } + return metricOptions; + } + + /** + * + * + * @generated + */ + public EList getTableTemplates() { + if (tableTemplates == null) { + tableTemplates = new EObjectContainmentEList(AbstractTableTemplate.class, this, ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES); + } + return tableTemplates; + } + + /** + * + * + * @generated + */ + public EList getAlertTemplates() { + if (alertTemplates == null) { + alertTemplates = new EObjectContainmentEList(AlertingTemplate.class, this, ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES); + } + return alertTemplates; + } + + /** + * + * + * @generated + */ + public EList getFunctions() { + if (functions == null) { + functions = new EObjectContainmentEList(Function.class, this, ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS); + } + return functions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES: + return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS: + return ((InternalEList)getMetricOptions()).basicRemove(otherEnd, msgs); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES: + return ((InternalEList)getTableTemplates()).basicRemove(otherEnd, msgs); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES: + return ((InternalEList)getAlertTemplates()).basicRemove(otherEnd, msgs); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS: + return ((InternalEList)getFunctions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES: + return getRules(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS: + return getMetricOptions(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES: + return getTableTemplates(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES: + return getAlertTemplates(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS: + return getFunctions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES: + getRules().clear(); + getRules().addAll((Collection)newValue); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS: + getMetricOptions().clear(); + getMetricOptions().addAll((Collection)newValue); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES: + getTableTemplates().clear(); + getTableTemplates().addAll((Collection)newValue); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES: + getAlertTemplates().clear(); + getAlertTemplates().addAll((Collection)newValue); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS: + getFunctions().clear(); + getFunctions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES: + getRules().clear(); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS: + getMetricOptions().clear(); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES: + getTableTemplates().clear(); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES: + getAlertTemplates().clear(); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS: + getFunctions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES: + return rules != null && !rules.isEmpty(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS: + return metricOptions != null && !metricOptions.isEmpty(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES: + return tableTemplates != null && !tableTemplates.isEmpty(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES: + return alertTemplates != null && !alertTemplates.isEmpty(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS: + return functions != null && !functions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //AbstractManagementServerConfigurationImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerImpl.java new file mode 100644 index 0000000..dfe4bca --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/AbstractManagementServerImpl.java @@ -0,0 +1,361 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import java.lang.reflect.InvocationTargetException; +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.json.JSONObject; + +/** + * + * An implementation of the model object 'Abstract Management Server'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl#getConfiguration Configuration}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.AbstractManagementServerImpl#getComponent Component}
  • + *
+ *

+ * + * @generated + */ +public class AbstractManagementServerImpl extends SouthBoundApiWithProxyImpl implements AbstractManagementServer { + /** + * The cached value of the '{@link #getConfiguration() Configuration}' containment reference. + * + * + * @see #getConfiguration() + * @generated + * @ordered + */ + protected AbstractManagementServerConfiguration configuration; + + /** + * The cached value of the '{@link #getComponent() Component}' containment reference. + * + * + * @see #getComponent() + * @generated + * @ordered + */ + protected Component component; + + /** + * + * + * @generated + */ + protected AbstractManagementServerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.ABSTRACT_MANAGEMENT_SERVER; + } + + /** + * + * + * @generated + */ + public AbstractManagementServerConfiguration getConfiguration() { + return configuration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetConfiguration(AbstractManagementServerConfiguration newConfiguration, NotificationChain msgs) { + AbstractManagementServerConfiguration oldConfiguration = configuration; + configuration = newConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION, oldConfiguration, newConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setConfiguration(AbstractManagementServerConfiguration newConfiguration) { + if (newConfiguration != configuration) { + NotificationChain msgs = null; + if (configuration != null) + msgs = ((InternalEObject)configuration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION, null, msgs); + if (newConfiguration != null) + msgs = ((InternalEObject)newConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION, null, msgs); + msgs = basicSetConfiguration(newConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION, newConfiguration, newConfiguration)); + } + + /** + * + * + * @generated + */ + public Component getComponent() { + return component; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetComponent(Component newComponent, NotificationChain msgs) { + Component oldComponent = component; + component = newComponent; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT, oldComponent, newComponent); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setComponent(Component newComponent) { + if (newComponent != component) { + NotificationChain msgs = null; + if (component != null) + msgs = ((InternalEObject)component).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT, null, msgs); + if (newComponent != null) + msgs = ((InternalEObject)newComponent).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT, null, msgs); + msgs = basicSetComponent(newComponent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT, newComponent, newComponent)); + } + + /** + * + * + * @generated + */ + public EList getValues(JSONObject cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getValuesAll(JSONObject cx, String path, EList metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList getMessages(JSONObject cx, String path, Long start, Long end) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public EList evaluate(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void update(String path, Function function) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: + return basicSetConfiguration(null, msgs); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: + return basicSetComponent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: + return getConfiguration(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: + return getComponent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)newValue); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: + setComponent((Component)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: + setConfiguration((AbstractManagementServerConfiguration)null); + return; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: + setComponent((Component)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION: + return configuration != null; + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER__COMPONENT: + return component != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValues((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3), (MetricValueOption)arguments.get(4), (Boolean)arguments.get(5)); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN: + return getValuesAll((JSONObject)arguments.get(0), (String)arguments.get(1), (EList)arguments.get(2), (Long)arguments.get(3), (Long)arguments.get(4), (MetricValueOption)arguments.get(5), (Boolean)arguments.get(6)); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG: + return getMessages((JSONObject)arguments.get(0), (String)arguments.get(1), (Long)arguments.get(2), (Long)arguments.get(3)); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT: + return getRequestLogger((String)arguments.get(0), (String)arguments.get(1), (String)arguments.get(2), (JSONObject)arguments.get(3)); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION: + return evaluate((String)arguments.get(0), (Function)arguments.get(1)); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION: + update((String)arguments.get(0), (Function)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //AbstractManagementServerImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/LoggerInfoImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/LoggerInfoImpl.java new file mode 100644 index 0000000..a391e5a --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/LoggerInfoImpl.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.sirius.manager.server.impl; + +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Logger Info'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.LoggerInfoImpl#getName Name}
  • + *
+ *

+ * + * @generated + */ +public class LoggerInfoImpl extends MinimalEObjectImpl.Container implements LoggerInfo { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected LoggerInfoImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.LOGGER_INFO; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.LOGGER_INFO__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.LOGGER_INFO__NAME: + return getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.LOGGER_INFO__NAME: + setName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.LOGGER_INFO__NAME: + setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.LOGGER_INFO__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} //LoggerInfoImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ManagementInfoImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ManagementInfoImpl.java new file mode 100644 index 0000000..741d5d7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ManagementInfoImpl.java @@ -0,0 +1,311 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Management Info'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl#getIp Ip}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl#getMetrics Metrics}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl#getLogs Logs}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ManagementInfoImpl#getProps Props}
  • + *
+ *

+ * + * @generated + */ +public class ManagementInfoImpl extends MinimalEObjectImpl.Container implements ManagementInfo { + /** + * The default value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + protected static final String IP_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIp() Ip}' attribute. + * + * + * @see #getIp() + * @generated + * @ordered + */ + protected String ip = IP_EDEFAULT; + + /** + * The cached value of the '{@link #getMetrics() Metrics}' containment reference list. + * + * + * @see #getMetrics() + * @generated + * @ordered + */ + protected EList metrics; + + /** + * The cached value of the '{@link #getLogs() Logs}' containment reference list. + * + * + * @see #getLogs() + * @generated + * @ordered + */ + protected EList logs; + + /** + * The cached value of the '{@link #getProps() Props}' containment reference list. + * + * + * @see #getProps() + * @generated + * @ordered + */ + protected EList props; + + /** + * + * + * @generated + */ + protected ManagementInfoImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.MANAGEMENT_INFO; + } + + /** + * + * + * @generated + */ + public String getIp() { + return ip; + } + + /** + * + * + * @generated + */ + public void setIp(String newIp) { + String oldIp = ip; + ip = newIp; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.MANAGEMENT_INFO__IP, oldIp, ip)); + } + + /** + * + * + * @generated + */ + public EList getMetrics() { + if (metrics == null) { + metrics = new EObjectContainmentEList(Metric.class, this, ServerPackage.MANAGEMENT_INFO__METRICS); + } + return metrics; + } + + /** + * + * + * @generated + */ + public EList getLogs() { + if (logs == null) { + logs = new EObjectContainmentEList(LogMessage.class, this, ServerPackage.MANAGEMENT_INFO__LOGS); + } + return logs; + } + + /** + * + * + * @generated + */ + public EList getProps() { + if (props == null) { + props = new EObjectContainmentEList(AbstractProperty.class, this, ServerPackage.MANAGEMENT_INFO__PROPS); + } + return props; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ServerPackage.MANAGEMENT_INFO__METRICS: + return ((InternalEList)getMetrics()).basicRemove(otherEnd, msgs); + case ServerPackage.MANAGEMENT_INFO__LOGS: + return ((InternalEList)getLogs()).basicRemove(otherEnd, msgs); + case ServerPackage.MANAGEMENT_INFO__PROPS: + return ((InternalEList)getProps()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.MANAGEMENT_INFO__IP: + return getIp(); + case ServerPackage.MANAGEMENT_INFO__METRICS: + return getMetrics(); + case ServerPackage.MANAGEMENT_INFO__LOGS: + return getLogs(); + case ServerPackage.MANAGEMENT_INFO__PROPS: + return getProps(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.MANAGEMENT_INFO__IP: + setIp((String)newValue); + return; + case ServerPackage.MANAGEMENT_INFO__METRICS: + getMetrics().clear(); + getMetrics().addAll((Collection)newValue); + return; + case ServerPackage.MANAGEMENT_INFO__LOGS: + getLogs().clear(); + getLogs().addAll((Collection)newValue); + return; + case ServerPackage.MANAGEMENT_INFO__PROPS: + getProps().clear(); + getProps().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.MANAGEMENT_INFO__IP: + setIp(IP_EDEFAULT); + return; + case ServerPackage.MANAGEMENT_INFO__METRICS: + getMetrics().clear(); + return; + case ServerPackage.MANAGEMENT_INFO__LOGS: + getLogs().clear(); + return; + case ServerPackage.MANAGEMENT_INFO__PROPS: + getProps().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.MANAGEMENT_INFO__IP: + return IP_EDEFAULT == null ? ip != null : !IP_EDEFAULT.equals(ip); + case ServerPackage.MANAGEMENT_INFO__METRICS: + return metrics != null && !metrics.isEmpty(); + case ServerPackage.MANAGEMENT_INFO__LOGS: + return logs != null && !logs.isEmpty(); + case ServerPackage.MANAGEMENT_INFO__PROPS: + return props != null && !props.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ip: "); + result.append(ip); + result.append(')'); + return result.toString(); + } + +} //ManagementInfoImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ResponseImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ResponseImpl.java new file mode 100644 index 0000000..19d2d1f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ResponseImpl.java @@ -0,0 +1,239 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.sirius.manager.server.Response; +import org.openecomp.ncomp.sirius.manager.server.ResponseStatus; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Response'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl#getStatus Status}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.server.impl.ResponseImpl#getMessage Message}
  • + *
+ *

+ * + * @generated + */ +public class ResponseImpl extends MinimalEObjectImpl.Container implements Response { + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final ResponseStatus STATUS_EDEFAULT = ResponseStatus.OK; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected ResponseStatus status = STATUS_EDEFAULT; + + /** + * The default value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected static final String MESSAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected String message = MESSAGE_EDEFAULT; + + /** + * + * + * @generated + */ + protected ResponseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.RESPONSE; + } + + /** + * + * + * @generated + */ + public ResponseStatus getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(ResponseStatus newStatus) { + ResponseStatus oldStatus = status; + status = newStatus == null ? STATUS_EDEFAULT : newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.RESPONSE__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + public String getMessage() { + return message; + } + + /** + * + * + * @generated + */ + public void setMessage(String newMessage) { + String oldMessage = message; + message = newMessage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ServerPackage.RESPONSE__MESSAGE, oldMessage, message)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ServerPackage.RESPONSE__STATUS: + return getStatus(); + case ServerPackage.RESPONSE__MESSAGE: + return getMessage(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ServerPackage.RESPONSE__STATUS: + setStatus((ResponseStatus)newValue); + return; + case ServerPackage.RESPONSE__MESSAGE: + setMessage((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ServerPackage.RESPONSE__STATUS: + setStatus(STATUS_EDEFAULT); + return; + case ServerPackage.RESPONSE__MESSAGE: + setMessage(MESSAGE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ServerPackage.RESPONSE__STATUS: + return status != STATUS_EDEFAULT; + case ServerPackage.RESPONSE__MESSAGE: + return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (status: "); + result.append(status); + result.append(", message: "); + result.append(message); + result.append(')'); + return result.toString(); + } + +} //ResponseImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerFactoryImpl.java new file mode 100644 index 0000000..74f35ce --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerFactoryImpl.java @@ -0,0 +1,230 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.sirius.manager.server.*; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ServerFactoryImpl extends EFactoryImpl implements ServerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ServerFactory init() { + try { + ServerFactory theServerFactory = (ServerFactory)EPackage.Registry.INSTANCE.getEFactory(ServerPackage.eNS_URI); + if (theServerFactory != null) { + return theServerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ServerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ServerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ServerPackage.SOUTH_BOUND_API_WITH_PROXY: return createSouthBoundApiWithProxy(); + case ServerPackage.SOUTH_BOUND_API: return createSouthBoundApi(); + case ServerPackage.MANAGEMENT_INFO: return createManagementInfo(); + case ServerPackage.RESPONSE: return createResponse(); + case ServerPackage.LOGGER_INFO: return createLoggerInfo(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER: return createAbstractManagementServer(); + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION: return createAbstractManagementServerConfiguration(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ServerPackage.RESPONSE_STATUS: + return createResponseStatusFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ServerPackage.RESPONSE_STATUS: + return convertResponseStatusToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SouthBoundApiWithProxy createSouthBoundApiWithProxy() { + SouthBoundApiWithProxyImpl southBoundApiWithProxy = new SouthBoundApiWithProxyImpl(); + return southBoundApiWithProxy; + } + + /** + * + * + * @generated + */ + public SouthBoundApi createSouthBoundApi() { + SouthBoundApiImpl southBoundApi = new SouthBoundApiImpl(); + return southBoundApi; + } + + /** + * + * + * @generated + */ + public ManagementInfo createManagementInfo() { + ManagementInfoImpl managementInfo = new ManagementInfoImpl(); + return managementInfo; + } + + /** + * + * + * @generated + */ + public Response createResponse() { + ResponseImpl response = new ResponseImpl(); + return response; + } + + /** + * + * + * @generated + */ + public LoggerInfo createLoggerInfo() { + LoggerInfoImpl loggerInfo = new LoggerInfoImpl(); + return loggerInfo; + } + + /** + * + * + * @generated + */ + public AbstractManagementServer createAbstractManagementServer() { + AbstractManagementServerImpl abstractManagementServer = new AbstractManagementServerImpl(); + return abstractManagementServer; + } + + /** + * + * + * @generated + */ + public AbstractManagementServerConfiguration createAbstractManagementServerConfiguration() { + AbstractManagementServerConfigurationImpl abstractManagementServerConfiguration = new AbstractManagementServerConfigurationImpl(); + return abstractManagementServerConfiguration; + } + + /** + * + * + * @generated + */ + public ResponseStatus createResponseStatusFromString(EDataType eDataType, String initialValue) { + ResponseStatus result = ResponseStatus.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertResponseStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ServerPackage getServerPackage() { + return (ServerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ServerPackage getPackage() { + return ServerPackage.eINSTANCE; + } + +} //ServerFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerPackageImpl.java new file mode 100644 index 0000000..a6a18b1 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/ServerPackageImpl.java @@ -0,0 +1,751 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.component.ComponentPackage; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.logs.LogsPackage; +import org.openecomp.ncomp.core.metrics.MetricsPackage; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesPackage; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.Response; +import org.openecomp.ncomp.sirius.manager.server.ResponseStatus; +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ServerPackageImpl extends EPackageImpl implements ServerPackage { + /** + * + * + * @generated + */ + private EClass southBoundApiWithProxyEClass = null; + + /** + * + * + * @generated + */ + private EClass southBoundApiEClass = null; + + /** + * + * + * @generated + */ + private EClass managementInfoEClass = null; + + /** + * + * + * @generated + */ + private EClass responseEClass = null; + + /** + * + * + * @generated + */ + private EClass loggerInfoEClass = null; + + /** + * + * + * @generated + */ + private EClass abstractManagementServerEClass = null; + + /** + * + * + * @generated + */ + private EClass abstractManagementServerConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EEnum responseStatusEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link ServerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ServerPackage init() { + if (isInited) return (ServerPackage)EPackage.Registry.INSTANCE.getEPackage(ServerPackage.eNS_URI); + + // Obtain or create and register package + ServerPackageImpl theServerPackage = (ServerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ServerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ServerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + AlertsPackage.eINSTANCE.eClass(); + PropertiesPackage.eINSTANCE.eClass(); + TableTemplatePackage.eINSTANCE.eClass(); + ComponentPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theServerPackage.createPackageContents(); + + // Initialize created meta-data + theServerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theServerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ServerPackage.eNS_URI, theServerPackage); + return theServerPackage; + } + + /** + * + * + * @generated + */ + public EClass getSouthBoundApiWithProxy() { + return southBoundApiWithProxyEClass; + } + + /** + * + * + * @generated + */ + public EOperation getSouthBoundApiWithProxy__UploadInfo__JSONObject_EList() { + return southBoundApiWithProxyEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSouthBoundApi() { + return southBoundApiEClass; + } + + /** + * + * + * @generated + */ + public EOperation getSouthBoundApi__Logs__JSONObject_EList() { + return southBoundApiEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getSouthBoundApi__Metrics__JSONObject_EList() { + return southBoundApiEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getSouthBoundApi__Properties__JSONObject_EList() { + return southBoundApiEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EClass getManagementInfo() { + return managementInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getManagementInfo_Ip() { + return (EAttribute)managementInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getManagementInfo_Metrics() { + return (EReference)managementInfoEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getManagementInfo_Logs() { + return (EReference)managementInfoEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getManagementInfo_Props() { + return (EReference)managementInfoEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getResponse() { + return responseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getResponse_Status() { + return (EAttribute)responseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getResponse_Message() { + return (EAttribute)responseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getLoggerInfo() { + return loggerInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLoggerInfo_Name() { + return (EAttribute)loggerInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getAbstractManagementServer() { + return abstractManagementServerEClass; + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServer_Configuration() { + return (EReference)abstractManagementServerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServer_Component() { + return (EReference)abstractManagementServerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__GetValues__JSONObject_String_Long_Long_MetricValueOption_boolean() { + return abstractManagementServerEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__GetValuesAll__JSONObject_String_EList_Long_Long_MetricValueOption_boolean() { + return abstractManagementServerEClass.getEOperations().get(1); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__GetMessages__JSONObject_String_Long_Long() { + return abstractManagementServerEClass.getEOperations().get(2); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__GetRequestLogger__String_String_String_JSONObject() { + return abstractManagementServerEClass.getEOperations().get(3); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__Evaluate__String_Function() { + return abstractManagementServerEClass.getEOperations().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getAbstractManagementServer__Update__String_Function() { + return abstractManagementServerEClass.getEOperations().get(5); + } + + /** + * + * + * @generated + */ + public EClass getAbstractManagementServerConfiguration() { + return abstractManagementServerConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServerConfiguration_Rules() { + return (EReference)abstractManagementServerConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServerConfiguration_MetricOptions() { + return (EReference)abstractManagementServerConfigurationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServerConfiguration_TableTemplates() { + return (EReference)abstractManagementServerConfigurationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServerConfiguration_AlertTemplates() { + return (EReference)abstractManagementServerConfigurationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getAbstractManagementServerConfiguration_Functions() { + return (EReference)abstractManagementServerConfigurationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EEnum getResponseStatus() { + return responseStatusEEnum; + } + + /** + * + * + * @generated + */ + public ServerFactory getServerFactory() { + return (ServerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + southBoundApiWithProxyEClass = createEClass(SOUTH_BOUND_API_WITH_PROXY); + createEOperation(southBoundApiWithProxyEClass, SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST); + + southBoundApiEClass = createEClass(SOUTH_BOUND_API); + createEOperation(southBoundApiEClass, SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST); + createEOperation(southBoundApiEClass, SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST); + createEOperation(southBoundApiEClass, SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST); + + managementInfoEClass = createEClass(MANAGEMENT_INFO); + createEAttribute(managementInfoEClass, MANAGEMENT_INFO__IP); + createEReference(managementInfoEClass, MANAGEMENT_INFO__METRICS); + createEReference(managementInfoEClass, MANAGEMENT_INFO__LOGS); + createEReference(managementInfoEClass, MANAGEMENT_INFO__PROPS); + + responseEClass = createEClass(RESPONSE); + createEAttribute(responseEClass, RESPONSE__STATUS); + createEAttribute(responseEClass, RESPONSE__MESSAGE); + + loggerInfoEClass = createEClass(LOGGER_INFO); + createEAttribute(loggerInfoEClass, LOGGER_INFO__NAME); + + abstractManagementServerEClass = createEClass(ABSTRACT_MANAGEMENT_SERVER); + createEReference(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER__CONFIGURATION); + createEReference(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER__COMPONENT); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___GET_VALUES__JSONOBJECT_STRING_LONG_LONG_METRICVALUEOPTION_BOOLEAN); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___GET_VALUES_ALL__JSONOBJECT_STRING_ELIST_LONG_LONG_METRICVALUEOPTION_BOOLEAN); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___GET_MESSAGES__JSONOBJECT_STRING_LONG_LONG); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___GET_REQUEST_LOGGER__STRING_STRING_STRING_JSONOBJECT); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___EVALUATE__STRING_FUNCTION); + createEOperation(abstractManagementServerEClass, ABSTRACT_MANAGEMENT_SERVER___UPDATE__STRING_FUNCTION); + + abstractManagementServerConfigurationEClass = createEClass(ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION); + createEReference(abstractManagementServerConfigurationEClass, ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__RULES); + createEReference(abstractManagementServerConfigurationEClass, ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__METRIC_OPTIONS); + createEReference(abstractManagementServerConfigurationEClass, ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__TABLE_TEMPLATES); + createEReference(abstractManagementServerConfigurationEClass, ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__ALERT_TEMPLATES); + createEReference(abstractManagementServerConfigurationEClass, ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION__FUNCTIONS); + + // Create enums + responseStatusEEnum = createEEnum(RESPONSE_STATUS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + LogsPackage theLogsPackage = (LogsPackage)EPackage.Registry.INSTANCE.getEPackage(LogsPackage.eNS_URI); + MetricsPackage theMetricsPackage = (MetricsPackage)EPackage.Registry.INSTANCE.getEPackage(MetricsPackage.eNS_URI); + PropertiesPackage thePropertiesPackage = (PropertiesPackage)EPackage.Registry.INSTANCE.getEPackage(PropertiesPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + ComponentPackage theComponentPackage = (ComponentPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentPackage.eNS_URI); + FunctionPackage theFunctionPackage = (FunctionPackage)EPackage.Registry.INSTANCE.getEPackage(FunctionPackage.eNS_URI); + TableTemplatePackage theTableTemplatePackage = (TableTemplatePackage)EPackage.Registry.INSTANCE.getEPackage(TableTemplatePackage.eNS_URI); + AlertsPackage theAlertsPackage = (AlertsPackage)EPackage.Registry.INSTANCE.getEPackage(AlertsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + southBoundApiWithProxyEClass.getESuperTypes().add(this.getSouthBoundApi()); + abstractManagementServerEClass.getESuperTypes().add(this.getSouthBoundApiWithProxy()); + abstractManagementServerConfigurationEClass.getESuperTypes().add(thePropertiesPackage.getModuleContainer()); + + // Initialize classes, features, and operations; add parameters + initEClass(southBoundApiWithProxyEClass, SouthBoundApiWithProxy.class, "SouthBoundApiWithProxy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + EOperation op = initEOperation(getSouthBoundApiWithProxy__UploadInfo__JSONObject_EList(), null, "uploadInfo", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getManagementInfo(), "info", 0, -1, !IS_UNIQUE, IS_ORDERED); + + initEClass(southBoundApiEClass, SouthBoundApi.class, "SouthBoundApi", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + op = initEOperation(getSouthBoundApi__Logs__JSONObject_EList(), null, "logs", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theLogsPackage.getLogMessage(), "logs", 0, -1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getSouthBoundApi__Metrics__JSONObject_EList(), null, "metrics", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theMetricsPackage.getMetric(), "metrics", 0, -1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getSouthBoundApi__Properties__JSONObject_EList(), null, "properties", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, thePropertiesPackage.getAbstractProperty(), "l", 0, -1, !IS_UNIQUE, IS_ORDERED); + + initEClass(managementInfoEClass, ManagementInfo.class, "ManagementInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getManagementInfo_Ip(), theEcorePackage.getEString(), "ip", null, 0, 1, ManagementInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getManagementInfo_Metrics(), theMetricsPackage.getMetric(), null, "metrics", null, 0, -1, ManagementInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getManagementInfo_Logs(), theLogsPackage.getLogMessage(), null, "logs", null, 0, -1, ManagementInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getManagementInfo_Props(), thePropertiesPackage.getAbstractProperty(), null, "props", null, 0, -1, ManagementInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(responseEClass, Response.class, "Response", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getResponse_Status(), this.getResponseStatus(), "status", null, 0, 1, Response.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getResponse_Message(), theEcorePackage.getEString(), "message", null, 0, 1, Response.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(loggerInfoEClass, LoggerInfo.class, "LoggerInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLoggerInfo_Name(), theEcorePackage.getEString(), "name", null, 0, 1, LoggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(abstractManagementServerEClass, AbstractManagementServer.class, "AbstractManagementServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractManagementServer_Configuration(), this.getAbstractManagementServerConfiguration(), null, "configuration", null, 0, 1, AbstractManagementServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractManagementServer_Component(), theComponentPackage.getComponent(), null, "component", null, 0, 1, AbstractManagementServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__GetValues__JSONObject_String_Long_Long_MetricValueOption_boolean(), theMetricsPackage.getDoubleMetric(), "getValues", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theMetricsPackage.getMetricValueOption(), "option", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEBoolean(), "relativeInterval", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__GetValuesAll__JSONObject_String_EList_Long_Long_MetricValueOption_boolean(), theMetricsPackage.getDoubleMetric(), "getValuesAll", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "metrics", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theMetricsPackage.getMetricValueOption(), "option", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEBoolean(), "relativeInterval", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__GetMessages__JSONObject_String_Long_Long(), theLogsPackage.getLogMessage(), "getMessages", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getRemoteContext(), "cx", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "start", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getELongObject(), "end", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__GetRequestLogger__String_String_String_JSONObject(), this.getLoggerInfo(), "getRequestLogger", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "userName", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "action", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "resourcePath", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theCorePackage.getJsonObject(), "context", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__Evaluate__String_Function(), theFunctionPackage.getValuePair(), "evaluate", 0, -1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theFunctionPackage.getFunction(), "function", 0, 1, !IS_UNIQUE, IS_ORDERED); + + op = initEOperation(getAbstractManagementServer__Update__String_Function(), null, "update", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theEcorePackage.getEString(), "path", 0, 1, !IS_UNIQUE, IS_ORDERED); + addEParameter(op, theFunctionPackage.getFunction(), "function", 0, 1, !IS_UNIQUE, IS_ORDERED); + + initEClass(abstractManagementServerConfigurationEClass, AbstractManagementServerConfiguration.class, "AbstractManagementServerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAbstractManagementServerConfiguration_Rules(), theLogsPackage.getLogMessageRule(), null, "rules", null, 0, -1, AbstractManagementServerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractManagementServerConfiguration_MetricOptions(), theMetricsPackage.getMetricValueOption(), null, "metricOptions", null, 0, -1, AbstractManagementServerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getAbstractManagementServerConfiguration_TableTemplates(), theTableTemplatePackage.getAbstractTableTemplate(), null, "tableTemplates", null, 0, -1, AbstractManagementServerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAbstractManagementServerConfiguration_AlertTemplates(), theAlertsPackage.getAlertingTemplate(), null, "alertTemplates", null, 0, -1, AbstractManagementServerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getAbstractManagementServerConfiguration_Functions(), theFunctionPackage.getFunction(), null, "functions", null, 0, -1, AbstractManagementServerConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(responseStatusEEnum, ResponseStatus.class, "ResponseStatus"); + addEEnumLiteral(responseStatusEEnum, ResponseStatus.OK); + addEEnumLiteral(responseStatusEEnum, ResponseStatus.WARN); + addEEnumLiteral(responseStatusEEnum, ResponseStatus.ERROR); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org/sirius/doc + createDocAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "GenModel", "http://www.eclipse.org/emf/2002/GenModel", + "doc", "http://openecomp.org/sirius/doc" + }); + } + + /** + * Initializes the annotations for http://openecomp.org/sirius/doc. + * + * + * @generated + */ + protected void createDocAnnotations() { + String source = "http://openecomp.org/sirius/doc"; + addAnnotation + (getSouthBoundApi__Logs__JSONObject_EList(), + source, + new String[] { + "description", "This operation allows the clients to report log messages \r\n\tand overall state of the client" + }); + addAnnotation + ((getSouthBoundApi__Logs__JSONObject_EList()).getEParameters().get(0), + source, + new String[] { + "description", "This parameter is for internal use and is ignored if set by client." + }); + addAnnotation + ((getSouthBoundApi__Logs__JSONObject_EList()).getEParameters().get(1), + source, + new String[] { + "description", "List of log message to inform the management system about." + }); + addAnnotation + (getSouthBoundApi__Metrics__JSONObject_EList(), + source, + new String[] { + "description", "This operation allows the client VMs to report metrics \r\n\t\tand overall state of the VM" + }); + addAnnotation + ((getSouthBoundApi__Metrics__JSONObject_EList()).getEParameters().get(0), + source, + new String[] { + "description", "This parameter is for internal use and is ignored if set by client." + }); + addAnnotation + (getSouthBoundApi__Properties__JSONObject_EList(), + source, + new String[] { + "description", "Used by the BSA Management Agent to report \r\n\tproperty key value pairs to the BSA Controller." + }); + addAnnotation + ((getSouthBoundApi__Properties__JSONObject_EList()).getEParameters().get(0), + source, + new String[] { + "description", "This parameter is for internal use and is ignored if set by client." + }); + } + +} //ServerPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiImpl.java new file mode 100644 index 0000000..6857ca0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiImpl.java @@ -0,0 +1,121 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.impl; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.json.JSONObject; + +/** + * + * An implementation of the model object 'South Bound Api'. + * + *

+ *

+ * + * @generated + */ +public class SouthBoundApiImpl extends MinimalEObjectImpl.Container implements SouthBoundApi { + /** + * + * + * @generated + */ + protected SouthBoundApiImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.SOUTH_BOUND_API; + } + + /** + * + * + * @generated + */ + public void logs(JSONObject cx, EList logs) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void metrics(JSONObject cx, EList metrics) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void properties(JSONObject cx, EList l) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ServerPackage.SOUTH_BOUND_API___LOGS__JSONOBJECT_ELIST: + logs((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + case ServerPackage.SOUTH_BOUND_API___METRICS__JSONOBJECT_ELIST: + metrics((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + case ServerPackage.SOUTH_BOUND_API___PROPERTIES__JSONOBJECT_ELIST: + properties((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //SouthBoundApiImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiWithProxyImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiWithProxyImpl.java new file mode 100644 index 0000000..373f971 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/impl/SouthBoundApiWithProxyImpl.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.sirius.manager.server.impl; + +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerPackage; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.json.JSONObject; + +/** + * + * An implementation of the model object 'South Bound Api With Proxy'. + * + *

+ *

+ * + * @generated + */ +public class SouthBoundApiWithProxyImpl extends SouthBoundApiImpl implements SouthBoundApiWithProxy { + /** + * + * + * @generated + */ + protected SouthBoundApiWithProxyImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ServerPackage.Literals.SOUTH_BOUND_API_WITH_PROXY; + } + + /** + * + * + * @generated + */ + public void uploadInfo(JSONObject cx, EList info) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ServerPackage.SOUTH_BOUND_API_WITH_PROXY___UPLOAD_INFO__JSONOBJECT_ELIST: + uploadInfo((JSONObject)arguments.get(0), (EList)arguments.get(1)); + return null; + } + return super.eInvoke(operationID, arguments); + } + +} //SouthBoundApiWithProxyImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerAdapterFactory.java new file mode 100644 index 0000000..a40f840 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerAdapterFactory.java @@ -0,0 +1,265 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.server.util; + +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer; +import org.openecomp.ncomp.sirius.manager.server.*; +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage + * @generated + */ +public class ServerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ServerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ServerAdapterFactory() { + if (modelPackage == null) { + modelPackage = ServerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ServerSwitch modelSwitch = + new ServerSwitch() { + @Override + public Adapter caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return createSouthBoundApiWithProxyAdapter(); + } + @Override + public Adapter caseSouthBoundApi(SouthBoundApi object) { + return createSouthBoundApiAdapter(); + } + @Override + public Adapter caseManagementInfo(ManagementInfo object) { + return createManagementInfoAdapter(); + } + @Override + public Adapter caseResponse(Response object) { + return createResponseAdapter(); + } + @Override + public Adapter caseLoggerInfo(LoggerInfo object) { + return createLoggerInfoAdapter(); + } + @Override + public Adapter caseAbstractManagementServer(AbstractManagementServer object) { + return createAbstractManagementServerAdapter(); + } + @Override + public Adapter caseAbstractManagementServerConfiguration(AbstractManagementServerConfiguration object) { + return createAbstractManagementServerConfigurationAdapter(); + } + @Override + public Adapter caseModuleContainer(ModuleContainer object) { + return createModuleContainerAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy South Bound Api With Proxy}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApiWithProxy + * @generated + */ + public Adapter createSouthBoundApiWithProxyAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.SouthBoundApi South Bound Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.SouthBoundApi + * @generated + */ + public Adapter createSouthBoundApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.ManagementInfo Management Info}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.ManagementInfo + * @generated + */ + public Adapter createManagementInfoAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.Response Response}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.Response + * @generated + */ + public Adapter createResponseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.properties.ModuleContainer Module Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.properties.ModuleContainer + * @generated + */ + public Adapter createModuleContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.LoggerInfo Logger Info}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.LoggerInfo + * @generated + */ + public Adapter createLoggerInfoAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer Abstract Management Server}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer + * @generated + */ + public Adapter createAbstractManagementServerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration Abstract Management Server Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.server.AbstractManagementServerConfiguration + * @generated + */ + public Adapter createAbstractManagementServerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ServerAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerSwitch.java new file mode 100644 index 0000000..73c7c80 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/server/util/ServerSwitch.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.sirius.manager.server.util; + +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer; +import org.openecomp.ncomp.sirius.manager.server.*; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.server.ServerPackage + * @generated + */ +public class ServerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ServerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ServerSwitch() { + if (modelPackage == null) { + modelPackage = ServerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ServerPackage.SOUTH_BOUND_API_WITH_PROXY: { + SouthBoundApiWithProxy southBoundApiWithProxy = (SouthBoundApiWithProxy)theEObject; + T result = caseSouthBoundApiWithProxy(southBoundApiWithProxy); + if (result == null) result = caseSouthBoundApi(southBoundApiWithProxy); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.SOUTH_BOUND_API: { + SouthBoundApi southBoundApi = (SouthBoundApi)theEObject; + T result = caseSouthBoundApi(southBoundApi); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.MANAGEMENT_INFO: { + ManagementInfo managementInfo = (ManagementInfo)theEObject; + T result = caseManagementInfo(managementInfo); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.RESPONSE: { + Response response = (Response)theEObject; + T result = caseResponse(response); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.LOGGER_INFO: { + LoggerInfo loggerInfo = (LoggerInfo)theEObject; + T result = caseLoggerInfo(loggerInfo); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER: { + AbstractManagementServer abstractManagementServer = (AbstractManagementServer)theEObject; + T result = caseAbstractManagementServer(abstractManagementServer); + if (result == null) result = caseSouthBoundApiWithProxy(abstractManagementServer); + if (result == null) result = caseSouthBoundApi(abstractManagementServer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ServerPackage.ABSTRACT_MANAGEMENT_SERVER_CONFIGURATION: { + AbstractManagementServerConfiguration abstractManagementServerConfiguration = (AbstractManagementServerConfiguration)theEObject; + T result = caseAbstractManagementServerConfiguration(abstractManagementServerConfiguration); + if (result == null) result = caseModuleContainer(abstractManagementServerConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api With Proxy'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApiWithProxy(SouthBoundApiWithProxy object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'South Bound Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'South Bound Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSouthBoundApi(SouthBoundApi object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Management Info'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Management Info'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseManagementInfo(ManagementInfo object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Response'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Response'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseResponse(Response object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Module Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Module Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModuleContainer(ModuleContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Logger Info'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Logger Info'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLoggerInfo(LoggerInfo object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServer(AbstractManagementServer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Management Server Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Management Server Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractManagementServerConfiguration(AbstractManagementServerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ServerSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerCollectionFormat.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerCollectionFormat.java new file mode 100644 index 0000000..dc4ecef --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerCollectionFormat.java @@ -0,0 +1,300 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Collection Format', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerCollectionFormat() + * @model + * @generated + */ +public enum SwaggerCollectionFormat implements Enumerator { + /** + * The 'Csv' literal object. + * + * + * @see #CSV_VALUE + * @generated + * @ordered + */ + CSV(0, "csv", "csv"), + + /** + * The 'Ssv' literal object. + * + * + * @see #SSV_VALUE + * @generated + * @ordered + */ + SSV(0, "ssv", "ssv"), /** + * The 'Tsv' literal object. + * + * + * @see #TSV_VALUE + * @generated + * @ordered + */ + TSV(0, "tsv", "tsv"), /** + * The 'Pipes' literal object. + * + * + * @see #PIPES_VALUE + * @generated + * @ordered + */ + PIPES(0, "pipes", "pipes"), /** + * The 'Multi' literal object. + * + * + * @see #MULTI_VALUE + * @generated + * @ordered + */ + MULTI(0, "multi", "multi"); + + /** + * The 'Csv' literal value. + * + *

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

+ * + * @see #CSV + * @model name="csv" + * @generated + * @ordered + */ + public static final int CSV_VALUE = 0; + + /** + * The 'Ssv' literal value. + * + *

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

+ * + * @see #SSV + * @model name="ssv" + * @generated + * @ordered + */ + public static final int SSV_VALUE = 0; + + /** + * The 'Tsv' literal value. + * + *

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

+ * + * @see #TSV + * @model name="tsv" + * @generated + * @ordered + */ + public static final int TSV_VALUE = 0; + + /** + * The 'Pipes' literal value. + * + *

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

+ * + * @see #PIPES + * @model name="pipes" + * @generated + * @ordered + */ + public static final int PIPES_VALUE = 0; + + /** + * The 'Multi' literal value. + * + *

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

+ * + * @see #MULTI + * @model name="multi" + * @generated + * @ordered + */ + public static final int MULTI_VALUE = 0; + + /** + * An array of all the 'Collection Format' enumerators. + * + * + * @generated + */ + private static final SwaggerCollectionFormat[] VALUES_ARRAY = + new SwaggerCollectionFormat[] { + CSV, + SSV, + TSV, + PIPES, + MULTI, + }; + + /** + * A public read-only list of all the 'Collection Format' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Collection Format' literal with the specified literal value. + * + * + * @generated + */ + public static SwaggerCollectionFormat get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SwaggerCollectionFormat result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Collection Format' literal with the specified name. + * + * + * @generated + */ + public static SwaggerCollectionFormat getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SwaggerCollectionFormat result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Collection Format' literal with the specified integer value. + * + * + * @generated + */ + public static SwaggerCollectionFormat get(int value) { + switch (value) { + case CSV_VALUE: return CSV; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private SwaggerCollectionFormat(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //SwaggerCollectionFormat diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerContact.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerContact.java new file mode 100644 index 0000000..f2c16cc --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerContact.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Contact'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact#getEmail Email}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerContact() + * @model + * @generated + */ +public interface SwaggerContact extends EObject { + /** + * Returns the value of the 'Email' attribute. + * + *

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

+ * + * @return the value of the 'Email' attribute. + * @see #setEmail(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerContact_Email() + * @model unique="false" + * @generated + */ + String getEmail(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact#getEmail Email}' attribute. + * + * + * @param value the new value of the 'Email' attribute. + * @see #getEmail() + * @generated + */ + void setEmail(String value); + +} // SwaggerContact diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerDefinition.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerDefinition.java new file mode 100644 index 0000000..2c5cd78 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerDefinition.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.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Definition'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerDefinition() + * @model + * @generated + */ +public interface SwaggerDefinition extends NamedEntity, SwaggerObjectType { +} // SwaggerDefinition diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerEnumObjectType.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerEnumObjectType.java new file mode 100644 index 0000000..c2d134d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerEnumObjectType.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.sirius.manager.swagger; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Enum Object Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType#getEnum Enum}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerEnumObjectType() + * @model + * @generated + */ +public interface SwaggerEnumObjectType extends SwaggerSimpleObjectType { + /** + * Returns the value of the 'Enum' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Enum' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerEnumObjectType_Enum() + * @model unique="false" + * @generated + */ + EList getEnum(); + +} // SwaggerEnumObjectType diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerExternalDocumentation.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerExternalDocumentation.java new file mode 100644 index 0000000..ac98fa0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerExternalDocumentation.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Document'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getUrl Url}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerExternalDocumentation() + * @model + * @generated + */ +public interface SwaggerExternalDocumentation extends EObject { + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerExternalDocumentation_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Url' attribute. + * + *

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

+ * + * @return the value of the 'Url' attribute. + * @see #setUrl(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerExternalDocumentation_Url() + * @model unique="false" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getUrl Url}' attribute. + * + * + * @param value the new value of the 'Url' attribute. + * @see #getUrl() + * @generated + */ + void setUrl(String value); + +} // SwaggerDocument diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerFactory.java new file mode 100644 index 0000000..14826cf --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerFactory.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage + * @generated + */ +public interface SwaggerFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + SwaggerFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerFactoryImpl.init(); + + /** + * Returns a new object of class 'Model'. + * + * + * @return a new object of class 'Model'. + * @generated + */ + SwaggerModel createSwaggerModel(); + + /** + * Returns a new object of class 'Info'. + * + * + * @return a new object of class 'Info'. + * @generated + */ + SwaggerInfo createSwaggerInfo(); + + /** + * Returns a new object of class 'Contact'. + * + * + * @return a new object of class 'Contact'. + * @generated + */ + SwaggerContact createSwaggerContact(); + + /** + * Returns a new object of class 'License'. + * + * + * @return a new object of class 'License'. + * @generated + */ + SwaggerLicense createSwaggerLicense(); + + /** + * Returns a new object of class 'Tag'. + * + * + * @return a new object of class 'Tag'. + * @generated + */ + SwaggerTag createSwaggerTag(); + + /** + * Returns a new object of class 'External Documentation'. + * + * + * @return a new object of class 'External Documentation'. + * @generated + */ + SwaggerExternalDocumentation createSwaggerExternalDocumentation(); + + /** + * Returns a new object of class 'Path'. + * + * + * @return a new object of class 'Path'. + * @generated + */ + SwaggerPath createSwaggerPath(); + + /** + * Returns a new object of class 'Operation'. + * + * + * @return a new object of class 'Operation'. + * @generated + */ + SwaggerOperation createSwaggerOperation(); + + /** + * Returns a new object of class 'Parameter'. + * + * + * @return a new object of class 'Parameter'. + * @generated + */ + SwaggerParameter createSwaggerParameter(); + + /** + * Returns a new object of class 'Response'. + * + * + * @return a new object of class 'Response'. + * @generated + */ + SwaggerResponse createSwaggerResponse(); + + /** + * Returns a new object of class 'Security Object'. + * + * + * @return a new object of class 'Security Object'. + * @generated + */ + SwaggerSecurityObject createSwaggerSecurityObject(); + + /** + * Returns a new object of class 'Security'. + * + * + * @return a new object of class 'Security'. + * @generated + */ + SwaggerSecurity createSwaggerSecurity(); + + /** + * Returns a new object of class 'Security Definition'. + * + * + * @return a new object of class 'Security Definition'. + * @generated + */ + SwaggerSecurityDefinition createSwaggerSecurityDefinition(); + + /** + * Returns a new object of class 'Security Definition Scope'. + * + * + * @return a new object of class 'Security Definition Scope'. + * @generated + */ + SwaggerSecurityDefinitionScope createSwaggerSecurityDefinitionScope(); + + /** + * Returns a new object of class 'Object Type'. + * + * + * @return a new object of class 'Object Type'. + * @generated + */ + SwaggerObjectType createSwaggerObjectType(); + + /** + * Returns a new object of class 'Reference Object Type'. + * + * + * @return a new object of class 'Reference Object Type'. + * @generated + */ + SwaggerReferenceObjectType createSwaggerReferenceObjectType(); + + /** + * Returns a new object of class 'Named Object Type'. + * + * + * @return a new object of class 'Named Object Type'. + * @generated + */ + SwaggerNamedObjectType createSwaggerNamedObjectType(); + + /** + * Returns a new object of class 'Object Class Definition'. + * + * + * @return a new object of class 'Object Class Definition'. + * @generated + */ + SwaggerObjectClassDefinition createSwaggerObjectClassDefinition(); + + /** + * Returns a new object of class 'Simple Object Type'. + * + * + * @return a new object of class 'Simple Object Type'. + * @generated + */ + SwaggerSimpleObjectType createSwaggerSimpleObjectType(); + + /** + * Returns a new object of class 'Xml'. + * + * + * @return a new object of class 'Xml'. + * @generated + */ + SwaggerXml createSwaggerXml(); + + /** + * Returns a new object of class 'Enum Object Type'. + * + * + * @return a new object of class 'Enum Object Type'. + * @generated + */ + SwaggerEnumObjectType createSwaggerEnumObjectType(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + SwaggerPackage getSwaggerPackage(); + +} //SwaggerFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerInfo.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerInfo.java new file mode 100644 index 0000000..71b4ba7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerInfo.java @@ -0,0 +1,206 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Info'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTermsOfService Terms Of Service}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getContact Contact}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getLicense License}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo() + * @model + * @generated + */ +public interface SwaggerInfo extends EObject { + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Version' attribute. + * + *

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

+ * + * @return the value of the 'Version' attribute. + * @see #setVersion(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_Version() + * @model unique="false" + * @generated + */ + String getVersion(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getVersion Version}' attribute. + * + * + * @param value the new value of the 'Version' attribute. + * @see #getVersion() + * @generated + */ + void setVersion(String value); + + /** + * Returns the value of the 'Title' attribute. + * + *

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

+ * + * @return the value of the 'Title' attribute. + * @see #setTitle(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_Title() + * @model unique="false" + * @generated + */ + String getTitle(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTitle Title}' attribute. + * + * + * @param value the new value of the 'Title' attribute. + * @see #getTitle() + * @generated + */ + void setTitle(String value); + + /** + * Returns the value of the 'Terms Of Service' attribute. + * + *

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

+ * + * @return the value of the 'Terms Of Service' attribute. + * @see #setTermsOfService(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_TermsOfService() + * @model unique="false" + * @generated + */ + String getTermsOfService(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTermsOfService Terms Of Service}' attribute. + * + * + * @param value the new value of the 'Terms Of Service' attribute. + * @see #getTermsOfService() + * @generated + */ + void setTermsOfService(String value); + + /** + * Returns the value of the 'Contact' containment reference. + * + *

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

+ * + * @return the value of the 'Contact' containment reference. + * @see #setContact(SwaggerContact) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_Contact() + * @model containment="true" + * @generated + */ + SwaggerContact getContact(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getContact Contact}' containment reference. + * + * + * @param value the new value of the 'Contact' containment reference. + * @see #getContact() + * @generated + */ + void setContact(SwaggerContact value); + + /** + * Returns the value of the 'License' containment reference. + * + *

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

+ * + * @return the value of the 'License' containment reference. + * @see #setLicense(SwaggerLicense) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerInfo_License() + * @model containment="true" + * @generated + */ + SwaggerLicense getLicense(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getLicense License}' containment reference. + * + * + * @param value the new value of the 'License' containment reference. + * @see #getLicense() + * @generated + */ + void setLicense(SwaggerLicense value); + +} // SwaggerInfo diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerLicense.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerLicense.java new file mode 100644 index 0000000..afa85f7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerLicense.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'License'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getUrl Url}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerLicense() + * @model + * @generated + */ +public interface SwaggerLicense extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerLicense_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Url' attribute. + * + *

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

+ * + * @return the value of the 'Url' attribute. + * @see #setUrl(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerLicense_Url() + * @model unique="false" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getUrl Url}' attribute. + * + * + * @param value the new value of the 'Url' attribute. + * @see #getUrl() + * @generated + */ + void setUrl(String value); + +} // SwaggerLicense diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerModel.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerModel.java new file mode 100644 index 0000000..48a3d3c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerModel.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.sirius.manager.swagger; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Model'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSwagger Swagger}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getInfo Info}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getHost Host}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getBasePath Base Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getTags Tags}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSchemes Schemes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getPaths Paths}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getDefinitions Definitions}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getExternalDocs External Docs}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSecurityDefinitions Security Definitions}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel() + * @model + * @generated + */ +public interface SwaggerModel extends EObject { + /** + * Returns the value of the 'Swagger' attribute. + * The default value is "2.0". + * + *

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

+ * + * @return the value of the 'Swagger' attribute. + * @see #setSwagger(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Swagger() + * @model default="2.0" unique="false" + * @generated + */ + String getSwagger(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSwagger Swagger}' attribute. + * + * + * @param value the new value of the 'Swagger' attribute. + * @see #getSwagger() + * @generated + */ + void setSwagger(String value); + + /** + * Returns the value of the 'Info' containment reference. + * + *

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

+ * + * @return the value of the 'Info' containment reference. + * @see #setInfo(SwaggerInfo) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Info() + * @model containment="true" + * @generated + */ + SwaggerInfo getInfo(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getInfo Info}' containment reference. + * + * + * @param value the new value of the 'Info' containment reference. + * @see #getInfo() + * @generated + */ + void setInfo(SwaggerInfo value); + + /** + * Returns the value of the 'Host' attribute. + * + *

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

+ * + * @return the value of the 'Host' attribute. + * @see #setHost(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Host() + * @model unique="false" + * @generated + */ + String getHost(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getHost Host}' attribute. + * + * + * @param value the new value of the 'Host' attribute. + * @see #getHost() + * @generated + */ + void setHost(String value); + + /** + * Returns the value of the 'Base Path' attribute. + * + *

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

+ * + * @return the value of the 'Base Path' attribute. + * @see #setBasePath(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_BasePath() + * @model unique="false" + * @generated + */ + String getBasePath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getBasePath Base Path}' attribute. + * + * + * @param value the new value of the 'Base Path' attribute. + * @see #getBasePath() + * @generated + */ + void setBasePath(String value); + + /** + * Returns the value of the 'Tags' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag}. + * + *

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

+ * + * @return the value of the 'Tags' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Tags() + * @model containment="true" + * @generated + */ + EList getTags(); + + /** + * Returns the value of the 'Schemes' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Schemes' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Schemes() + * @model unique="false" + * @generated + */ + EList getSchemes(); + + /** + * Returns the value of the 'Paths' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath}. + * + *

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

+ * + * @return the value of the 'Paths' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Paths() + * @model containment="true" + * @generated + */ + EList getPaths(); + + /** + * Returns the value of the 'Definitions' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType}. + * + *

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

+ * + * @return the value of the 'Definitions' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_Definitions() + * @model containment="true" + * @generated + */ + EList getDefinitions(); + + /** + * Returns the value of the 'External Docs' containment reference. + * + *

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

+ * + * @return the value of the 'External Docs' containment reference. + * @see #setExternalDocs(SwaggerExternalDocumentation) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerModel_ExternalDocs() + * @model containment="true" + * @generated + */ + SwaggerExternalDocumentation getExternalDocs(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getExternalDocs External Docs}' containment reference. + * + * + * @param value the new value of the 'External Docs' containment reference. + * @see #getExternalDocs() + * @generated + */ + void setExternalDocs(SwaggerExternalDocumentation value); + + /** + * Returns the value of the 'Security Definitions' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDefault Default}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getXml Xml}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerNamedObjectType() + * @model + * @generated + */ +public interface SwaggerNamedObjectType extends NamedEntity, SwaggerObjectType { + /** + * Returns the value of the 'Type' attribute. + * + *

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

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerNamedObjectType_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Default' attribute. + * + *

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

+ * + * @return the value of the 'Default' attribute. + * @see #setDefault(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerNamedObjectType_Default() + * @model unique="false" + * @generated + */ + String getDefault(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDefault Default}' attribute. + * + * + * @param value the new value of the 'Default' attribute. + * @see #getDefault() + * @generated + */ + void setDefault(String value); + + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerNamedObjectType_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Xml' containment reference. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAllOf All Of}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getProperties Properties}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAdditionalProperties Additional Properties}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectClassDefinition() + * @model + * @generated + */ +public interface SwaggerObjectClassDefinition extends SwaggerNamedObjectType { + /** + * Returns the value of the 'Required' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Required' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectClassDefinition_Required() + * @model unique="false" + * @generated + */ + EList getRequired(); + + /** + * Returns the value of the 'All Of' reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType}. + * + *

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

+ * + * @return the value of the 'All Of' reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectClassDefinition_AllOf() + * @model + * @generated + */ + EList getAllOf(); + + /** + * Returns the value of the 'Properties' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType}. + * + *

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

+ * + * @return the value of the 'Properties' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectClassDefinition_Properties() + * @model containment="true" + * @generated + */ + EList getProperties(); + + /** + * Returns the value of the 'Additional Properties' containment reference. + * + *

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

+ * + * @return the value of the 'Additional Properties' containment reference. + * @see #setAdditionalProperties(SwaggerObjectType) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectClassDefinition_AdditionalProperties() + * @model containment="true" + * @generated + */ + SwaggerObjectType getAdditionalProperties(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAdditionalProperties Additional Properties}' containment reference. + * + * + * @param value the new value of the 'Additional Properties' containment reference. + * @see #getAdditionalProperties() + * @generated + */ + void setAdditionalProperties(SwaggerObjectType value); + +} // SwaggerObjectClassDefinition diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectType.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectType.java new file mode 100644 index 0000000..f0c32f8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectType.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Object Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType#isMany Many}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectType() + * @model + * @generated + */ +public interface SwaggerObjectType extends EObject { + + /** + * Returns the value of the 'Many' attribute. + * The default value is "false". + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectTypeDefinition#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectTypeDefinition#getDefault Default}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectTypeDefinition() + * @model + * @generated + */ +public interface SwaggerObjectTypeDefinition extends NamedEntity, SwaggerObjectType { + /** + * Returns the value of the 'Type' attribute. + * + *

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

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectTypeDefinition_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectTypeDefinition#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Default' attribute. + * + *

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

+ * + * @return the value of the 'Default' attribute. + * @see #setDefault(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectTypeDefinition_Default() + * @model unique="false" + * @generated + */ + String getDefault(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectTypeDefinition#getDefault Default}' attribute. + * + * + * @param value the new value of the 'Default' attribute. + * @see #getDefault() + * @generated + */ + void setDefault(String value); + +} // SwaggerObjectTypeDefinition diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectTypeReference.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectTypeReference.java new file mode 100644 index 0000000..03c9149 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerObjectTypeReference.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.sirius.manager.swagger; + + +/** + * + * A representation of the model object 'Object Type Reference'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectTypeReference#getReference Reference}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerObjectTypeReference() + * @model + * @generated + */ +public interface SwaggerObjectTypeReference extends SwaggerObjectType { + /** + * Returns the value of the 'Reference' reference. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getTags Tags}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSummary Summary}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getOperationId Operation Id}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getConsumes Consumes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getProduces Produces}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getParameters Parameters}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getResponses Responses}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSecurity Security}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#isDeprecated Deprecated}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation() + * @model + * @generated + */ +public interface SwaggerOperation extends NamedEntity { + /** + * Returns the value of the 'Tags' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Tags' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Tags() + * @model unique="false" + * @generated + */ + EList getTags(); + + /** + * Returns the value of the 'Summary' attribute. + * + *

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

+ * + * @return the value of the 'Summary' attribute. + * @see #setSummary(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Summary() + * @model unique="false" + * @generated + */ + String getSummary(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSummary Summary}' attribute. + * + * + * @param value the new value of the 'Summary' attribute. + * @see #getSummary() + * @generated + */ + void setSummary(String value); + + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Operation Id' attribute. + * + *

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

+ * + * @return the value of the 'Operation Id' attribute. + * @see #setOperationId(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_OperationId() + * @model unique="false" + * @generated + */ + String getOperationId(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getOperationId Operation Id}' attribute. + * + * + * @param value the new value of the 'Operation Id' attribute. + * @see #getOperationId() + * @generated + */ + void setOperationId(String value); + + /** + * Returns the value of the 'Consumes' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Consumes' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Consumes() + * @model unique="false" + * @generated + */ + EList getConsumes(); + + /** + * Returns the value of the 'Produces' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Produces' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Produces() + * @model unique="false" + * @generated + */ + EList getProduces(); + + /** + * Returns the value of the 'Parameters' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter}. + * + *

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

+ * + * @return the value of the 'Parameters' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Parameters() + * @model containment="true" + * @generated + */ + EList getParameters(); + + /** + * Returns the value of the 'Responses' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse}. + * + *

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

+ * + * @return the value of the 'Responses' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Responses() + * @model containment="true" + * @generated + */ + EList getResponses(); + + /** + * Returns the value of the 'Security' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject}. + * + *

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

+ * + * @return the value of the 'Security' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Security() + * @model containment="true" + * @generated + */ + EList getSecurity(); + + /** + * Returns the value of the 'Deprecated' attribute. + * The default value is "false". + * + *

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

+ * + * @return the value of the 'Deprecated' attribute. + * @see #setDeprecated(boolean) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerOperation_Deprecated() + * @model default="false" unique="false" + * @generated + */ + boolean isDeprecated(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#isDeprecated Deprecated}' attribute. + * + * + * @param value the new value of the 'Deprecated' attribute. + * @see #isDeprecated() + * @generated + */ + void setDeprecated(boolean value); + +} // SwaggerOperation diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPackage.java new file mode 100644 index 0000000..03619b2 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPackage.java @@ -0,0 +1,3767 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager'" + * annotation="http://www.eclipse.org/emf/2011/Xcore swagger='http://openecomp.org/ncomp/swagger'" + * @generated + */ +public interface SwaggerPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "swagger"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.swagger"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "swagger"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + SwaggerPackage eINSTANCE = org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl Model}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerModel() + * @generated + */ + int SWAGGER_MODEL = 0; + + /** + * The feature id for the 'Swagger' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__SWAGGER = 0; + + /** + * The feature id for the 'Info' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__INFO = 1; + + /** + * The feature id for the 'Host' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__HOST = 2; + + /** + * The feature id for the 'Base Path' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__BASE_PATH = 3; + + /** + * The feature id for the 'Tags' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__TAGS = 4; + + /** + * The feature id for the 'Schemes' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__SCHEMES = 5; + + /** + * The feature id for the 'Paths' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__PATHS = 6; + + /** + * The feature id for the 'Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__DEFINITIONS = 7; + + /** + * The feature id for the 'External Docs' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__EXTERNAL_DOCS = 8; + + /** + * The feature id for the 'Security Definitions' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL__SECURITY_DEFINITIONS = 9; + + /** + * The number of structural features of the 'Model' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL_FEATURE_COUNT = 10; + + /** + * The number of operations of the 'Model' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_MODEL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerInfo() + * @generated + */ + int SWAGGER_INFO = 1; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__DESCRIPTION = 0; + + /** + * The feature id for the 'Version' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__VERSION = 1; + + /** + * The feature id for the 'Title' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__TITLE = 2; + + /** + * The feature id for the 'Terms Of Service' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__TERMS_OF_SERVICE = 3; + + /** + * The feature id for the 'Contact' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__CONTACT = 4; + + /** + * The feature id for the 'License' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO__LICENSE = 5; + + /** + * The number of structural features of the 'Info' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO_FEATURE_COUNT = 6; + + /** + * The number of operations of the 'Info' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_INFO_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerContactImpl Contact}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerContactImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerContact() + * @generated + */ + int SWAGGER_CONTACT = 2; + + /** + * The feature id for the 'Email' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_CONTACT__EMAIL = 0; + + /** + * The number of structural features of the 'Contact' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_CONTACT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Contact' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_CONTACT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl License}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerLicense() + * @generated + */ + int SWAGGER_LICENSE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_LICENSE__NAME = 0; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_LICENSE__URL = 1; + + /** + * The number of structural features of the 'License' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_LICENSE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'License' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_LICENSE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl Tag}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerTag() + * @generated + */ + int SWAGGER_TAG = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_TAG__NAME = 0; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_TAG__DESCRIPTION = 1; + + /** + * The feature id for the 'External Docs' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_TAG__EXTERNAL_DOCS = 2; + + /** + * The number of structural features of the 'Tag' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_TAG_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Tag' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_TAG_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl External Documentation}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerExternalDocumentation() + * @generated + */ + int SWAGGER_EXTERNAL_DOCUMENTATION = 5; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION = 0; + + /** + * The feature id for the 'Url' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_EXTERNAL_DOCUMENTATION__URL = 1; + + /** + * The number of structural features of the 'External Documentation' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_EXTERNAL_DOCUMENTATION_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'External Documentation' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_EXTERNAL_DOCUMENTATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPathImpl Path}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPathImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerPath() + * @generated + */ + int SWAGGER_PATH = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Methods' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH__METHODS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Path' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Path' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_PATH_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl Operation}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerOperation() + * @generated + */ + int SWAGGER_OPERATION = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Tags' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__TAGS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Summary' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__SUMMARY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Operation Id' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__OPERATION_ID = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Consumes' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__CONSUMES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Produces' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__PRODUCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Parameters' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__PARAMETERS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'Responses' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__RESPONSES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Security' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__SECURITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Deprecated' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION__DEPRECATED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Operation' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The number of operations of the 'Operation' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OPERATION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl Parameter}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerParameter() + * @generated + */ + int SWAGGER_PARAMETER = 8; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl Response}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerResponse() + * @generated + */ + int SWAGGER_RESPONSE = 9; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityImpl Security}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurity() + * @generated + */ + int SWAGGER_SECURITY = 11; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectTypeImpl Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerObjectType() + * @generated + */ + int SWAGGER_OBJECT_TYPE = 14; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl Reference Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerReferenceObjectType() + * @generated + */ + int SWAGGER_REFERENCE_OBJECT_TYPE = 15; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl Named Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerNamedObjectType() + * @generated + */ + int SWAGGER_NAMED_OBJECT_TYPE = 16; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'In' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__IN = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Type' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Parameter' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Parameter' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_PARAMETER_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Schema' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__SCHEMA = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Headers' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE__HEADERS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Response' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Response' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_RESPONSE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityObjectImpl Security Object}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityObjectImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityObject() + * @generated + */ + int SWAGGER_SECURITY_OBJECT = 10; + + /** + * The feature id for the 'List' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_OBJECT__LIST = 0; + + /** + * The number of structural features of the 'Security Object' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_OBJECT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Security Object' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_OBJECT_OPERATION_COUNT = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Roles' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY__ROLES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Security' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Security' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl Security Definition}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityDefinition() + * @generated + */ + int SWAGGER_SECURITY_DEFINITION = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Authorization Url' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Flow' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__FLOW = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'In' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION__IN = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Security Definition' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Security Definition' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionScopeImpl Security Definition Scope}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionScopeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityDefinitionScope() + * @generated + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Security Definition Scope' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Security Definition Scope' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SECURITY_DEFINITION_SCOPE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_TYPE__MANY = 0; + + /** + * The number of structural features of the 'Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_TYPE_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_TYPE_OPERATION_COUNT = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__MANY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__TYPE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Default' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__DEFAULT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Xml' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE__XML = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Named Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Named Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_NAMED_OBJECT_TYPE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__NAME = SWAGGER_NAMED_OBJECT_TYPE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__LAST_POLLED = SWAGGER_NAMED_OBJECT_TYPE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__LAST_CHANGED = SWAGGER_NAMED_OBJECT_TYPE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__CREATED = SWAGGER_NAMED_OBJECT_TYPE__CREATED; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__MANY = SWAGGER_NAMED_OBJECT_TYPE__MANY; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__TYPE = SWAGGER_NAMED_OBJECT_TYPE__TYPE; + + /** + * The feature id for the 'Default' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__DEFAULT = SWAGGER_NAMED_OBJECT_TYPE__DEFAULT; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__DESCRIPTION = SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION; + + /** + * The feature id for the 'Xml' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__XML = SWAGGER_NAMED_OBJECT_TYPE__XML; + + /** + * The feature id for the 'Required' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Reference' reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Reference Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE_FEATURE_COUNT = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Reference Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_REFERENCE_OBJECT_TYPE_OPERATION_COUNT = SWAGGER_NAMED_OBJECT_TYPE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl Object Class Definition}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerObjectClassDefinition() + * @generated + */ + int SWAGGER_OBJECT_CLASS_DEFINITION = 17; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__NAME = SWAGGER_NAMED_OBJECT_TYPE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__LAST_POLLED = SWAGGER_NAMED_OBJECT_TYPE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__LAST_CHANGED = SWAGGER_NAMED_OBJECT_TYPE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__CREATED = SWAGGER_NAMED_OBJECT_TYPE__CREATED; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__MANY = SWAGGER_NAMED_OBJECT_TYPE__MANY; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__TYPE = SWAGGER_NAMED_OBJECT_TYPE__TYPE; + + /** + * The feature id for the 'Default' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__DEFAULT = SWAGGER_NAMED_OBJECT_TYPE__DEFAULT; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__DESCRIPTION = SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION; + + /** + * The feature id for the 'Xml' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__XML = SWAGGER_NAMED_OBJECT_TYPE__XML; + + /** + * The feature id for the 'Required' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'All Of' reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Properties' containment reference list. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Additional Properties' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 3; + + /** + * The number of structural features of the 'Object Class Definition' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION_FEATURE_COUNT = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 4; + + /** + * The number of operations of the 'Object Class Definition' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_OBJECT_CLASS_DEFINITION_OPERATION_COUNT = SWAGGER_NAMED_OBJECT_TYPE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl Simple Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSimpleObjectType() + * @generated + */ + int SWAGGER_SIMPLE_OBJECT_TYPE = 18; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__NAME = SWAGGER_NAMED_OBJECT_TYPE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__LAST_POLLED = SWAGGER_NAMED_OBJECT_TYPE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__LAST_CHANGED = SWAGGER_NAMED_OBJECT_TYPE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__CREATED = SWAGGER_NAMED_OBJECT_TYPE__CREATED; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__MANY = SWAGGER_NAMED_OBJECT_TYPE__MANY; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__TYPE = SWAGGER_NAMED_OBJECT_TYPE__TYPE; + + /** + * The feature id for the 'Default' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__DEFAULT = SWAGGER_NAMED_OBJECT_TYPE__DEFAULT; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__DESCRIPTION = SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION; + + /** + * The feature id for the 'Xml' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__XML = SWAGGER_NAMED_OBJECT_TYPE__XML; + + /** + * The feature id for the 'Required' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Format' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Minimum' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Maximum' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Pattern' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Example' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Collection Format' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Simple Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE_FEATURE_COUNT = SWAGGER_NAMED_OBJECT_TYPE_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Simple Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_SIMPLE_OBJECT_TYPE_OPERATION_COUNT = SWAGGER_NAMED_OBJECT_TYPE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl Xml}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerXml() + * @generated + */ + int SWAGGER_XML = 19; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_XML__NAME = 0; + + /** + * The feature id for the 'Wrapped' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_XML__WRAPPED = 1; + + /** + * The number of structural features of the 'Xml' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_XML_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Xml' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_XML_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerEnumObjectTypeImpl Enum Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerEnumObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerEnumObjectType() + * @generated + */ + int SWAGGER_ENUM_OBJECT_TYPE = 20; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__NAME = SWAGGER_SIMPLE_OBJECT_TYPE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__LAST_POLLED = SWAGGER_SIMPLE_OBJECT_TYPE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__LAST_CHANGED = SWAGGER_SIMPLE_OBJECT_TYPE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__CREATED = SWAGGER_SIMPLE_OBJECT_TYPE__CREATED; + + /** + * The feature id for the 'Many' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__MANY = SWAGGER_SIMPLE_OBJECT_TYPE__MANY; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__TYPE = SWAGGER_SIMPLE_OBJECT_TYPE__TYPE; + + /** + * The feature id for the 'Default' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__DEFAULT = SWAGGER_SIMPLE_OBJECT_TYPE__DEFAULT; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__DESCRIPTION = SWAGGER_SIMPLE_OBJECT_TYPE__DESCRIPTION; + + /** + * The feature id for the 'Xml' containment reference. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__XML = SWAGGER_SIMPLE_OBJECT_TYPE__XML; + + /** + * The feature id for the 'Required' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__REQUIRED = SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED; + + /** + * The feature id for the 'Format' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__FORMAT = SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT; + + /** + * The feature id for the 'Minimum' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__MINIMUM = SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM; + + /** + * The feature id for the 'Maximum' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__MAXIMUM = SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM; + + /** + * The feature id for the 'Pattern' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__PATTERN = SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN; + + /** + * The feature id for the 'Example' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__EXAMPLE = SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE; + + /** + * The feature id for the 'Collection Format' attribute. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__COLLECTION_FORMAT = SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT; + + /** + * The feature id for the 'Enum' attribute list. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE__ENUM = SWAGGER_SIMPLE_OBJECT_TYPE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Enum Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE_FEATURE_COUNT = SWAGGER_SIMPLE_OBJECT_TYPE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Enum Object Type' class. + * + * + * @generated + * @ordered + */ + int SWAGGER_ENUM_OBJECT_TYPE_OPERATION_COUNT = SWAGGER_SIMPLE_OBJECT_TYPE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType Parameter Type}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerParameterType() + * @generated + */ + int SWAGGER_PARAMETER_TYPE = 21; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat Collection Format}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerCollectionFormat() + * @generated + */ + int SWAGGER_COLLECTION_FORMAT = 22; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel Model}'. + * + * + * @return the meta object for class 'Model'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel + * @generated + */ + EClass getSwaggerModel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSwagger Swagger}'. + * + * + * @return the meta object for the attribute 'Swagger'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSwagger() + * @see #getSwaggerModel() + * @generated + */ + EAttribute getSwaggerModel_Swagger(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getInfo Info}'. + * + * + * @return the meta object for the containment reference 'Info'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getInfo() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_Info(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getHost Host}'. + * + * + * @return the meta object for the attribute 'Host'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getHost() + * @see #getSwaggerModel() + * @generated + */ + EAttribute getSwaggerModel_Host(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getBasePath Base Path}'. + * + * + * @return the meta object for the attribute 'Base Path'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getBasePath() + * @see #getSwaggerModel() + * @generated + */ + EAttribute getSwaggerModel_BasePath(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getTags Tags}'. + * + * + * @return the meta object for the containment reference list 'Tags'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getTags() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_Tags(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSchemes Schemes}'. + * + * + * @return the meta object for the attribute list 'Schemes'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSchemes() + * @see #getSwaggerModel() + * @generated + */ + EAttribute getSwaggerModel_Schemes(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getPaths Paths}'. + * + * + * @return the meta object for the containment reference list 'Paths'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getPaths() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_Paths(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getDefinitions Definitions}'. + * + * + * @return the meta object for the containment reference list 'Definitions'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getDefinitions() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_Definitions(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getExternalDocs External Docs}'. + * + * + * @return the meta object for the containment reference 'External Docs'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getExternalDocs() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_ExternalDocs(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSecurityDefinitions Security Definitions}'. + * + * + * @return the meta object for the containment reference list 'Security Definitions'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel#getSecurityDefinitions() + * @see #getSwaggerModel() + * @generated + */ + EReference getSwaggerModel_SecurityDefinitions(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo Info}'. + * + * + * @return the meta object for class 'Info'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo + * @generated + */ + EClass getSwaggerInfo(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getDescription() + * @see #getSwaggerInfo() + * @generated + */ + EAttribute getSwaggerInfo_Description(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getVersion Version}'. + * + * + * @return the meta object for the attribute 'Version'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getVersion() + * @see #getSwaggerInfo() + * @generated + */ + EAttribute getSwaggerInfo_Version(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTitle Title}'. + * + * + * @return the meta object for the attribute 'Title'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTitle() + * @see #getSwaggerInfo() + * @generated + */ + EAttribute getSwaggerInfo_Title(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTermsOfService Terms Of Service}'. + * + * + * @return the meta object for the attribute 'Terms Of Service'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getTermsOfService() + * @see #getSwaggerInfo() + * @generated + */ + EAttribute getSwaggerInfo_TermsOfService(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getContact Contact}'. + * + * + * @return the meta object for the containment reference 'Contact'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getContact() + * @see #getSwaggerInfo() + * @generated + */ + EReference getSwaggerInfo_Contact(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getLicense License}'. + * + * + * @return the meta object for the containment reference 'License'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo#getLicense() + * @see #getSwaggerInfo() + * @generated + */ + EReference getSwaggerInfo_License(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact Contact}'. + * + * + * @return the meta object for class 'Contact'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact + * @generated + */ + EClass getSwaggerContact(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact#getEmail Email}'. + * + * + * @return the meta object for the attribute 'Email'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact#getEmail() + * @see #getSwaggerContact() + * @generated + */ + EAttribute getSwaggerContact_Email(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense License}'. + * + * + * @return the meta object for class 'License'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense + * @generated + */ + EClass getSwaggerLicense(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getName() + * @see #getSwaggerLicense() + * @generated + */ + EAttribute getSwaggerLicense_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getUrl Url}'. + * + * + * @return the meta object for the attribute 'Url'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense#getUrl() + * @see #getSwaggerLicense() + * @generated + */ + EAttribute getSwaggerLicense_Url(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag Tag}'. + * + * + * @return the meta object for class 'Tag'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag + * @generated + */ + EClass getSwaggerTag(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getName() + * @see #getSwaggerTag() + * @generated + */ + EAttribute getSwaggerTag_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getDescription() + * @see #getSwaggerTag() + * @generated + */ + EAttribute getSwaggerTag_Description(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getExternalDocs External Docs}'. + * + * + * @return the meta object for the containment reference 'External Docs'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getExternalDocs() + * @see #getSwaggerTag() + * @generated + */ + EReference getSwaggerTag_ExternalDocs(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation External Documentation}'. + * + * + * @return the meta object for class 'External Documentation'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation + * @generated + */ + EClass getSwaggerExternalDocumentation(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getDescription() + * @see #getSwaggerExternalDocumentation() + * @generated + */ + EAttribute getSwaggerExternalDocumentation_Description(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getUrl Url}'. + * + * + * @return the meta object for the attribute 'Url'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation#getUrl() + * @see #getSwaggerExternalDocumentation() + * @generated + */ + EAttribute getSwaggerExternalDocumentation_Url(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath Path}'. + * + * + * @return the meta object for class 'Path'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath + * @generated + */ + EClass getSwaggerPath(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath#getMethods Methods}'. + * + * + * @return the meta object for the containment reference list 'Methods'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath#getMethods() + * @see #getSwaggerPath() + * @generated + */ + EReference getSwaggerPath_Methods(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation Operation}'. + * + * + * @return the meta object for class 'Operation'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation + * @generated + */ + EClass getSwaggerOperation(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getTags Tags}'. + * + * + * @return the meta object for the attribute list 'Tags'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getTags() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Tags(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSummary Summary}'. + * + * + * @return the meta object for the attribute 'Summary'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSummary() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Summary(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getDescription() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Description(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getOperationId Operation Id}'. + * + * + * @return the meta object for the attribute 'Operation Id'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getOperationId() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_OperationId(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getConsumes Consumes}'. + * + * + * @return the meta object for the attribute list 'Consumes'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getConsumes() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Consumes(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getProduces Produces}'. + * + * + * @return the meta object for the attribute list 'Produces'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getProduces() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Produces(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getParameters Parameters}'. + * + * + * @return the meta object for the containment reference list 'Parameters'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getParameters() + * @see #getSwaggerOperation() + * @generated + */ + EReference getSwaggerOperation_Parameters(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getResponses Responses}'. + * + * + * @return the meta object for the containment reference list 'Responses'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getResponses() + * @see #getSwaggerOperation() + * @generated + */ + EReference getSwaggerOperation_Responses(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSecurity Security}'. + * + * + * @return the meta object for the containment reference list 'Security'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#getSecurity() + * @see #getSwaggerOperation() + * @generated + */ + EReference getSwaggerOperation_Security(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#isDeprecated Deprecated}'. + * + * + * @return the meta object for the attribute 'Deprecated'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation#isDeprecated() + * @see #getSwaggerOperation() + * @generated + */ + EAttribute getSwaggerOperation_Deprecated(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter Parameter}'. + * + * + * @return the meta object for class 'Parameter'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter + * @generated + */ + EClass getSwaggerParameter(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getIn In}'. + * + * + * @return the meta object for the attribute 'In'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getIn() + * @see #getSwaggerParameter() + * @generated + */ + EAttribute getSwaggerParameter_In(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getType Type}'. + * + * + * @return the meta object for the containment reference 'Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getType() + * @see #getSwaggerParameter() + * @generated + */ + EReference getSwaggerParameter_Type(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse Response}'. + * + * + * @return the meta object for class 'Response'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse + * @generated + */ + EClass getSwaggerResponse(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getDescription() + * @see #getSwaggerResponse() + * @generated + */ + EAttribute getSwaggerResponse_Description(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getSchema Schema}'. + * + * + * @return the meta object for the containment reference 'Schema'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getSchema() + * @see #getSwaggerResponse() + * @generated + */ + EReference getSwaggerResponse_Schema(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getHeaders Headers}'. + * + * + * @return the meta object for the containment reference list 'Headers'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getHeaders() + * @see #getSwaggerResponse() + * @generated + */ + EReference getSwaggerResponse_Headers(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject Security Object}'. + * + * + * @return the meta object for class 'Security Object'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject + * @generated + */ + EClass getSwaggerSecurityObject(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject#getList List}'. + * + * + * @return the meta object for the containment reference list 'List'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject#getList() + * @see #getSwaggerSecurityObject() + * @generated + */ + EReference getSwaggerSecurityObject_List(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity Security}'. + * + * + * @return the meta object for class 'Security'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity + * @generated + */ + EClass getSwaggerSecurity(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity#getRoles Roles}'. + * + * + * @return the meta object for the attribute list 'Roles'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity#getRoles() + * @see #getSwaggerSecurity() + * @generated + */ + EAttribute getSwaggerSecurity_Roles(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition Security Definition}'. + * + * + * @return the meta object for class 'Security Definition'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition + * @generated + */ + EClass getSwaggerSecurityDefinition(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getType() + * @see #getSwaggerSecurityDefinition() + * @generated + */ + EAttribute getSwaggerSecurityDefinition_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getAuthorizationUrl Authorization Url}'. + * + * + * @return the meta object for the attribute 'Authorization Url'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getAuthorizationUrl() + * @see #getSwaggerSecurityDefinition() + * @generated + */ + EAttribute getSwaggerSecurityDefinition_AuthorizationUrl(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getFlow Flow}'. + * + * + * @return the meta object for the attribute 'Flow'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getFlow() + * @see #getSwaggerSecurityDefinition() + * @generated + */ + EAttribute getSwaggerSecurityDefinition_Flow(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getIn In}'. + * + * + * @return the meta object for the attribute 'In'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getIn() + * @see #getSwaggerSecurityDefinition() + * @generated + */ + EAttribute getSwaggerSecurityDefinition_In(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope Security Definition Scope}'. + * + * + * @return the meta object for class 'Security Definition Scope'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope + * @generated + */ + EClass getSwaggerSecurityDefinitionScope(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope#getDescription() + * @see #getSwaggerSecurityDefinitionScope() + * @generated + */ + EAttribute getSwaggerSecurityDefinitionScope_Description(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType Object Type}'. + * + * + * @return the meta object for class 'Object Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType + * @generated + */ + EClass getSwaggerObjectType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType#isMany Many}'. + * + * + * @return the meta object for the attribute 'Many'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType#isMany() + * @see #getSwaggerObjectType() + * @generated + */ + EAttribute getSwaggerObjectType_Many(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType Reference Object Type}'. + * + * + * @return the meta object for class 'Reference Object Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType + * @generated + */ + EClass getSwaggerReferenceObjectType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#isRequired Required}'. + * + * + * @return the meta object for the attribute 'Required'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#isRequired() + * @see #getSwaggerReferenceObjectType() + * @generated + */ + EAttribute getSwaggerReferenceObjectType_Required(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#getReference Reference}'. + * + * + * @return the meta object for the reference 'Reference'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#getReference() + * @see #getSwaggerReferenceObjectType() + * @generated + */ + EReference getSwaggerReferenceObjectType_Reference(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType Named Object Type}'. + * + * + * @return the meta object for class 'Named Object Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType + * @generated + */ + EClass getSwaggerNamedObjectType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getType() + * @see #getSwaggerNamedObjectType() + * @generated + */ + EAttribute getSwaggerNamedObjectType_Type(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDefault Default}'. + * + * + * @return the meta object for the attribute 'Default'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDefault() + * @see #getSwaggerNamedObjectType() + * @generated + */ + EAttribute getSwaggerNamedObjectType_Default(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getDescription() + * @see #getSwaggerNamedObjectType() + * @generated + */ + EAttribute getSwaggerNamedObjectType_Description(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getXml Xml}'. + * + * + * @return the meta object for the containment reference 'Xml'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType#getXml() + * @see #getSwaggerNamedObjectType() + * @generated + */ + EReference getSwaggerNamedObjectType_Xml(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition Object Class Definition}'. + * + * + * @return the meta object for class 'Object Class Definition'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition + * @generated + */ + EClass getSwaggerObjectClassDefinition(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getRequired Required}'. + * + * + * @return the meta object for the attribute list 'Required'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getRequired() + * @see #getSwaggerObjectClassDefinition() + * @generated + */ + EAttribute getSwaggerObjectClassDefinition_Required(); + + /** + * Returns the meta object for the reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAllOf All Of}'. + * + * + * @return the meta object for the reference list 'All Of'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAllOf() + * @see #getSwaggerObjectClassDefinition() + * @generated + */ + EReference getSwaggerObjectClassDefinition_AllOf(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getProperties Properties}'. + * + * + * @return the meta object for the containment reference list 'Properties'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getProperties() + * @see #getSwaggerObjectClassDefinition() + * @generated + */ + EReference getSwaggerObjectClassDefinition_Properties(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAdditionalProperties Additional Properties}'. + * + * + * @return the meta object for the containment reference 'Additional Properties'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition#getAdditionalProperties() + * @see #getSwaggerObjectClassDefinition() + * @generated + */ + EReference getSwaggerObjectClassDefinition_AdditionalProperties(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType Simple Object Type}'. + * + * + * @return the meta object for class 'Simple Object Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType + * @generated + */ + EClass getSwaggerSimpleObjectType(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#isRequired Required}'. + * + * + * @return the meta object for the attribute 'Required'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#isRequired() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Required(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getFormat Format}'. + * + * + * @return the meta object for the attribute 'Format'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getFormat() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Format(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMinimum Minimum}'. + * + * + * @return the meta object for the attribute 'Minimum'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMinimum() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Minimum(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMaximum Maximum}'. + * + * + * @return the meta object for the attribute 'Maximum'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMaximum() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Maximum(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getPattern Pattern}'. + * + * + * @return the meta object for the attribute 'Pattern'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getPattern() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Pattern(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getExample Example}'. + * + * + * @return the meta object for the attribute 'Example'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getExample() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_Example(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getCollectionFormat Collection Format}'. + * + * + * @return the meta object for the attribute 'Collection Format'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getCollectionFormat() + * @see #getSwaggerSimpleObjectType() + * @generated + */ + EAttribute getSwaggerSimpleObjectType_CollectionFormat(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml Xml}'. + * + * + * @return the meta object for class 'Xml'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml + * @generated + */ + EClass getSwaggerXml(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#getName() + * @see #getSwaggerXml() + * @generated + */ + EAttribute getSwaggerXml_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#isWrapped Wrapped}'. + * + * + * @return the meta object for the attribute 'Wrapped'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#isWrapped() + * @see #getSwaggerXml() + * @generated + */ + EAttribute getSwaggerXml_Wrapped(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType Enum Object Type}'. + * + * + * @return the meta object for class 'Enum Object Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType + * @generated + */ + EClass getSwaggerEnumObjectType(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType#getEnum Enum}'. + * + * + * @return the meta object for the attribute list 'Enum'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType#getEnum() + * @see #getSwaggerEnumObjectType() + * @generated + */ + EAttribute getSwaggerEnumObjectType_Enum(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType Parameter Type}'. + * + * + * @return the meta object for enum 'Parameter Type'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @generated + */ + EEnum getSwaggerParameterType(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat Collection Format}'. + * + * + * @return the meta object for enum 'Collection Format'. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat + * @generated + */ + EEnum getSwaggerCollectionFormat(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + SwaggerFactory getSwaggerFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl Model}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerModel() + * @generated + */ + EClass SWAGGER_MODEL = eINSTANCE.getSwaggerModel(); + + /** + * The meta object literal for the 'Swagger' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_MODEL__SWAGGER = eINSTANCE.getSwaggerModel_Swagger(); + + /** + * The meta object literal for the 'Info' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__INFO = eINSTANCE.getSwaggerModel_Info(); + + /** + * The meta object literal for the 'Host' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_MODEL__HOST = eINSTANCE.getSwaggerModel_Host(); + + /** + * The meta object literal for the 'Base Path' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_MODEL__BASE_PATH = eINSTANCE.getSwaggerModel_BasePath(); + + /** + * The meta object literal for the 'Tags' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__TAGS = eINSTANCE.getSwaggerModel_Tags(); + + /** + * The meta object literal for the 'Schemes' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_MODEL__SCHEMES = eINSTANCE.getSwaggerModel_Schemes(); + + /** + * The meta object literal for the 'Paths' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__PATHS = eINSTANCE.getSwaggerModel_Paths(); + + /** + * The meta object literal for the 'Definitions' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__DEFINITIONS = eINSTANCE.getSwaggerModel_Definitions(); + + /** + * The meta object literal for the 'External Docs' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__EXTERNAL_DOCS = eINSTANCE.getSwaggerModel_ExternalDocs(); + + /** + * The meta object literal for the 'Security Definitions' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_MODEL__SECURITY_DEFINITIONS = eINSTANCE.getSwaggerModel_SecurityDefinitions(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl Info}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerInfo() + * @generated + */ + EClass SWAGGER_INFO = eINSTANCE.getSwaggerInfo(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_INFO__DESCRIPTION = eINSTANCE.getSwaggerInfo_Description(); + + /** + * The meta object literal for the 'Version' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_INFO__VERSION = eINSTANCE.getSwaggerInfo_Version(); + + /** + * The meta object literal for the 'Title' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_INFO__TITLE = eINSTANCE.getSwaggerInfo_Title(); + + /** + * The meta object literal for the 'Terms Of Service' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_INFO__TERMS_OF_SERVICE = eINSTANCE.getSwaggerInfo_TermsOfService(); + + /** + * The meta object literal for the 'Contact' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_INFO__CONTACT = eINSTANCE.getSwaggerInfo_Contact(); + + /** + * The meta object literal for the 'License' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_INFO__LICENSE = eINSTANCE.getSwaggerInfo_License(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerContactImpl Contact}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerContactImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerContact() + * @generated + */ + EClass SWAGGER_CONTACT = eINSTANCE.getSwaggerContact(); + + /** + * The meta object literal for the 'Email' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_CONTACT__EMAIL = eINSTANCE.getSwaggerContact_Email(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl License}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerLicense() + * @generated + */ + EClass SWAGGER_LICENSE = eINSTANCE.getSwaggerLicense(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_LICENSE__NAME = eINSTANCE.getSwaggerLicense_Name(); + + /** + * The meta object literal for the 'Url' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_LICENSE__URL = eINSTANCE.getSwaggerLicense_Url(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl Tag}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerTag() + * @generated + */ + EClass SWAGGER_TAG = eINSTANCE.getSwaggerTag(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_TAG__NAME = eINSTANCE.getSwaggerTag_Name(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_TAG__DESCRIPTION = eINSTANCE.getSwaggerTag_Description(); + + /** + * The meta object literal for the 'External Docs' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_TAG__EXTERNAL_DOCS = eINSTANCE.getSwaggerTag_ExternalDocs(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl External Documentation}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerExternalDocumentation() + * @generated + */ + EClass SWAGGER_EXTERNAL_DOCUMENTATION = eINSTANCE.getSwaggerExternalDocumentation(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION = eINSTANCE.getSwaggerExternalDocumentation_Description(); + + /** + * The meta object literal for the 'Url' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_EXTERNAL_DOCUMENTATION__URL = eINSTANCE.getSwaggerExternalDocumentation_Url(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPathImpl Path}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPathImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerPath() + * @generated + */ + EClass SWAGGER_PATH = eINSTANCE.getSwaggerPath(); + + /** + * The meta object literal for the 'Methods' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_PATH__METHODS = eINSTANCE.getSwaggerPath_Methods(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl Operation}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerOperation() + * @generated + */ + EClass SWAGGER_OPERATION = eINSTANCE.getSwaggerOperation(); + + /** + * The meta object literal for the 'Tags' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__TAGS = eINSTANCE.getSwaggerOperation_Tags(); + + /** + * The meta object literal for the 'Summary' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__SUMMARY = eINSTANCE.getSwaggerOperation_Summary(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__DESCRIPTION = eINSTANCE.getSwaggerOperation_Description(); + + /** + * The meta object literal for the 'Operation Id' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__OPERATION_ID = eINSTANCE.getSwaggerOperation_OperationId(); + + /** + * The meta object literal for the 'Consumes' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__CONSUMES = eINSTANCE.getSwaggerOperation_Consumes(); + + /** + * The meta object literal for the 'Produces' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__PRODUCES = eINSTANCE.getSwaggerOperation_Produces(); + + /** + * The meta object literal for the 'Parameters' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_OPERATION__PARAMETERS = eINSTANCE.getSwaggerOperation_Parameters(); + + /** + * The meta object literal for the 'Responses' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_OPERATION__RESPONSES = eINSTANCE.getSwaggerOperation_Responses(); + + /** + * The meta object literal for the 'Security' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_OPERATION__SECURITY = eINSTANCE.getSwaggerOperation_Security(); + + /** + * The meta object literal for the 'Deprecated' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_OPERATION__DEPRECATED = eINSTANCE.getSwaggerOperation_Deprecated(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl Parameter}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerParameter() + * @generated + */ + EClass SWAGGER_PARAMETER = eINSTANCE.getSwaggerParameter(); + + /** + * The meta object literal for the 'In' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_PARAMETER__IN = eINSTANCE.getSwaggerParameter_In(); + + /** + * The meta object literal for the 'Type' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_PARAMETER__TYPE = eINSTANCE.getSwaggerParameter_Type(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl Response}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerResponse() + * @generated + */ + EClass SWAGGER_RESPONSE = eINSTANCE.getSwaggerResponse(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_RESPONSE__DESCRIPTION = eINSTANCE.getSwaggerResponse_Description(); + + /** + * The meta object literal for the 'Schema' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_RESPONSE__SCHEMA = eINSTANCE.getSwaggerResponse_Schema(); + + /** + * The meta object literal for the 'Headers' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_RESPONSE__HEADERS = eINSTANCE.getSwaggerResponse_Headers(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityObjectImpl Security Object}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityObjectImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityObject() + * @generated + */ + EClass SWAGGER_SECURITY_OBJECT = eINSTANCE.getSwaggerSecurityObject(); + + /** + * The meta object literal for the 'List' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_SECURITY_OBJECT__LIST = eINSTANCE.getSwaggerSecurityObject_List(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityImpl Security}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurity() + * @generated + */ + EClass SWAGGER_SECURITY = eINSTANCE.getSwaggerSecurity(); + + /** + * The meta object literal for the 'Roles' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY__ROLES = eINSTANCE.getSwaggerSecurity_Roles(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl Security Definition}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityDefinition() + * @generated + */ + EClass SWAGGER_SECURITY_DEFINITION = eINSTANCE.getSwaggerSecurityDefinition(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY_DEFINITION__TYPE = eINSTANCE.getSwaggerSecurityDefinition_Type(); + + /** + * The meta object literal for the 'Authorization Url' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL = eINSTANCE.getSwaggerSecurityDefinition_AuthorizationUrl(); + + /** + * The meta object literal for the 'Flow' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY_DEFINITION__FLOW = eINSTANCE.getSwaggerSecurityDefinition_Flow(); + + /** + * The meta object literal for the 'In' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY_DEFINITION__IN = eINSTANCE.getSwaggerSecurityDefinition_In(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionScopeImpl Security Definition Scope}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionScopeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSecurityDefinitionScope() + * @generated + */ + EClass SWAGGER_SECURITY_DEFINITION_SCOPE = eINSTANCE.getSwaggerSecurityDefinitionScope(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SECURITY_DEFINITION_SCOPE__DESCRIPTION = eINSTANCE.getSwaggerSecurityDefinitionScope_Description(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectTypeImpl Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerObjectType() + * @generated + */ + EClass SWAGGER_OBJECT_TYPE = eINSTANCE.getSwaggerObjectType(); + + /** + * The meta object literal for the 'Many' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_OBJECT_TYPE__MANY = eINSTANCE.getSwaggerObjectType_Many(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl Reference Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerReferenceObjectType() + * @generated + */ + EClass SWAGGER_REFERENCE_OBJECT_TYPE = eINSTANCE.getSwaggerReferenceObjectType(); + + /** + * The meta object literal for the 'Required' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED = eINSTANCE.getSwaggerReferenceObjectType_Required(); + + /** + * The meta object literal for the 'Reference' reference feature. + * + * + * @generated + */ + EReference SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE = eINSTANCE.getSwaggerReferenceObjectType_Reference(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl Named Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerNamedObjectType() + * @generated + */ + EClass SWAGGER_NAMED_OBJECT_TYPE = eINSTANCE.getSwaggerNamedObjectType(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_NAMED_OBJECT_TYPE__TYPE = eINSTANCE.getSwaggerNamedObjectType_Type(); + + /** + * The meta object literal for the 'Default' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_NAMED_OBJECT_TYPE__DEFAULT = eINSTANCE.getSwaggerNamedObjectType_Default(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION = eINSTANCE.getSwaggerNamedObjectType_Description(); + + /** + * The meta object literal for the 'Xml' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_NAMED_OBJECT_TYPE__XML = eINSTANCE.getSwaggerNamedObjectType_Xml(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl Object Class Definition}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerObjectClassDefinition() + * @generated + */ + EClass SWAGGER_OBJECT_CLASS_DEFINITION = eINSTANCE.getSwaggerObjectClassDefinition(); + + /** + * The meta object literal for the 'Required' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED = eINSTANCE.getSwaggerObjectClassDefinition_Required(); + + /** + * The meta object literal for the 'All Of' reference list feature. + * + * + * @generated + */ + EReference SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF = eINSTANCE.getSwaggerObjectClassDefinition_AllOf(); + + /** + * The meta object literal for the 'Properties' containment reference list feature. + * + * + * @generated + */ + EReference SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES = eINSTANCE.getSwaggerObjectClassDefinition_Properties(); + + /** + * The meta object literal for the 'Additional Properties' containment reference feature. + * + * + * @generated + */ + EReference SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES = eINSTANCE.getSwaggerObjectClassDefinition_AdditionalProperties(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl Simple Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerSimpleObjectType() + * @generated + */ + EClass SWAGGER_SIMPLE_OBJECT_TYPE = eINSTANCE.getSwaggerSimpleObjectType(); + + /** + * The meta object literal for the 'Required' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED = eINSTANCE.getSwaggerSimpleObjectType_Required(); + + /** + * The meta object literal for the 'Format' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT = eINSTANCE.getSwaggerSimpleObjectType_Format(); + + /** + * The meta object literal for the 'Minimum' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM = eINSTANCE.getSwaggerSimpleObjectType_Minimum(); + + /** + * The meta object literal for the 'Maximum' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM = eINSTANCE.getSwaggerSimpleObjectType_Maximum(); + + /** + * The meta object literal for the 'Pattern' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN = eINSTANCE.getSwaggerSimpleObjectType_Pattern(); + + /** + * The meta object literal for the 'Example' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE = eINSTANCE.getSwaggerSimpleObjectType_Example(); + + /** + * The meta object literal for the 'Collection Format' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT = eINSTANCE.getSwaggerSimpleObjectType_CollectionFormat(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl Xml}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerXml() + * @generated + */ + EClass SWAGGER_XML = eINSTANCE.getSwaggerXml(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_XML__NAME = eINSTANCE.getSwaggerXml_Name(); + + /** + * The meta object literal for the 'Wrapped' attribute feature. + * + * + * @generated + */ + EAttribute SWAGGER_XML__WRAPPED = eINSTANCE.getSwaggerXml_Wrapped(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerEnumObjectTypeImpl Enum Object Type}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerEnumObjectTypeImpl + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerEnumObjectType() + * @generated + */ + EClass SWAGGER_ENUM_OBJECT_TYPE = eINSTANCE.getSwaggerEnumObjectType(); + + /** + * The meta object literal for the 'Enum' attribute list feature. + * + * + * @generated + */ + EAttribute SWAGGER_ENUM_OBJECT_TYPE__ENUM = eINSTANCE.getSwaggerEnumObjectType_Enum(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType Parameter Type}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerParameterType() + * @generated + */ + EEnum SWAGGER_PARAMETER_TYPE = eINSTANCE.getSwaggerParameterType(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat Collection Format}' enum. + * + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat + * @see org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPackageImpl#getSwaggerCollectionFormat() + * @generated + */ + EEnum SWAGGER_COLLECTION_FORMAT = eINSTANCE.getSwaggerCollectionFormat(); + + } + +} //SwaggerPackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameter.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameter.java new file mode 100644 index 0000000..1d0f272 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameter.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; + + +/** + * + * A representation of the model object 'Parameter'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getIn In}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getType Type}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerParameter() + * @model + * @generated + */ +public interface SwaggerParameter extends NamedEntity { + /** + * Returns the value of the 'In' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType}. + * + *

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

+ * + * @return the value of the 'In' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see #setIn(SwaggerParameterType) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerParameter_In() + * @model unique="false" + * @generated + */ + SwaggerParameterType getIn(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getIn In}' attribute. + * + * + * @param value the new value of the 'In' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see #getIn() + * @generated + */ + void setIn(SwaggerParameterType value); + + /** + * Returns the value of the 'Type' containment reference. + * + *

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

+ * + * @return the value of the 'Type' containment reference. + * @see #setType(SwaggerObjectType) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerParameter_Type() + * @model containment="true" + * @generated + */ + SwaggerObjectType getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter#getType Type}' containment reference. + * + * + * @param value the new value of the 'Type' containment reference. + * @see #getType() + * @generated + */ + void setType(SwaggerObjectType value); + +} // SwaggerParameter diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameterType.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameterType.java new file mode 100644 index 0000000..c0d14d9 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerParameterType.java @@ -0,0 +1,330 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Parameter Type', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerParameterType() + * @model + * @generated + */ +public enum SwaggerParameterType implements Enumerator { + /** + * The 'Path' literal object. + * + * + * @see #PATH_VALUE + * @generated + * @ordered + */ + PATH(0, "path", "path"), + + /** + * The 'Query' literal object. + * + * + * @see #QUERY_VALUE + * @generated + * @ordered + */ + QUERY(0, "query", "query"), + + /** + * The 'Header' literal object. + * + * + * @see #HEADER_VALUE + * @generated + * @ordered + */ + HEADER(0, "header", "header"), + + /** + * The 'Body' literal object. + * + * + * @see #BODY_VALUE + * @generated + * @ordered + */ + BODY(0, "body", "body"), + + /** + * The 'Form' literal object. + * + * + * @see #FORM_VALUE + * @generated + * @ordered + */ + FORM(0, "form", "form"), /** + * The 'Form Data' literal object. + * + * + * @see #FORM_DATA_VALUE + * @generated + * @ordered + */ + FORM_DATA(0, "formData", "formData"); + + /** + * The 'Path' literal value. + * + *

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

+ * + * @see #PATH + * @model name="path" + * @generated + * @ordered + */ + public static final int PATH_VALUE = 0; + + /** + * The 'Query' literal value. + * + *

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

+ * + * @see #QUERY + * @model name="query" + * @generated + * @ordered + */ + public static final int QUERY_VALUE = 0; + + /** + * The 'Header' literal value. + * + *

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

+ * + * @see #HEADER + * @model name="header" + * @generated + * @ordered + */ + public static final int HEADER_VALUE = 0; + + /** + * The 'Body' literal value. + * + *

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

+ * + * @see #BODY + * @model name="body" + * @generated + * @ordered + */ + public static final int BODY_VALUE = 0; + + /** + * The 'Form' literal value. + * + *

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

+ * + * @see #FORM + * @model name="form" + * @generated + * @ordered + */ + public static final int FORM_VALUE = 0; + + /** + * The 'Form Data' literal value. + * + *

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

+ * + * @see #FORM_DATA + * @model name="formData" + * @generated + * @ordered + */ + public static final int FORM_DATA_VALUE = 0; + + /** + * An array of all the 'Parameter Type' enumerators. + * + * + * @generated + */ + private static final SwaggerParameterType[] VALUES_ARRAY = + new SwaggerParameterType[] { + PATH, + QUERY, + HEADER, + BODY, + FORM, + FORM_DATA, + }; + + /** + * A public read-only list of all the 'Parameter Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Parameter Type' literal with the specified literal value. + * + * + * @generated + */ + public static SwaggerParameterType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SwaggerParameterType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Parameter Type' literal with the specified name. + * + * + * @generated + */ + public static SwaggerParameterType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + SwaggerParameterType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Parameter Type' literal with the specified integer value. + * + * + * @generated + */ + public static SwaggerParameterType get(int value) { + switch (value) { + case PATH_VALUE: return PATH; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private SwaggerParameterType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //SwaggerParameterType diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPath.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPath.java new file mode 100644 index 0000000..cc28040 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerPath.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.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Path'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath#getMethods Methods}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerPath() + * @model + * @generated + */ +public interface SwaggerPath extends NamedEntity { + /** + * Returns the value of the 'Methods' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation}. + * + *

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

+ * + * @return the value of the 'Methods' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerPath_Methods() + * @model containment="true" + * @generated + */ + EList getMethods(); + +} // SwaggerPath diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerReferenceObjectType.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerReferenceObjectType.java new file mode 100644 index 0000000..c496b2d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerReferenceObjectType.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.sirius.manager.swagger; + + +/** + * + * A representation of the model object 'Reference Object Type'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#isRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#getReference Reference}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerReferenceObjectType() + * @model + * @generated + */ +public interface SwaggerReferenceObjectType extends SwaggerNamedObjectType { + /** + * Returns the value of the 'Required' attribute. + * + *

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

+ * + * @return the value of the 'Required' attribute. + * @see #setRequired(boolean) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerReferenceObjectType_Required() + * @model unique="false" + * annotation="http://openecomp.org/ncomp/swagger name='$ref'" + * @generated + */ + boolean isRequired(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType#isRequired Required}' attribute. + * + * + * @param value the new value of the 'Required' attribute. + * @see #isRequired() + * @generated + */ + void setRequired(boolean value); + + /** + * Returns the value of the 'Reference' reference. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getSchema Schema}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getHeaders Headers}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerResponse() + * @model + * @generated + */ +public interface SwaggerResponse extends NamedEntity { + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerResponse_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Schema' containment reference. + * + *

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

+ * + * @return the value of the 'Schema' containment reference. + * @see #setSchema(SwaggerObjectType) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerResponse_Schema() + * @model containment="true" + * @generated + */ + SwaggerObjectType getSchema(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse#getSchema Schema}' containment reference. + * + * + * @param value the new value of the 'Schema' containment reference. + * @see #getSchema() + * @generated + */ + void setSchema(SwaggerObjectType value); + + /** + * Returns the value of the 'Headers' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType}. + * + *

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

+ * + * @return the value of the 'Headers' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerResponse_Headers() + * @model containment="true" + * @generated + */ + EList getHeaders(); + +} // SwaggerResponse diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSchema.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSchema.java new file mode 100644 index 0000000..851816b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSchema.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Schema'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSchema#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSchema#getSchema Schema}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSchema() + * @model + * @generated + */ +public interface SwaggerSchema extends EObject { + /** + * Returns the value of the 'Type' attribute. + * + *

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

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSchema_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSchema#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Schema' reference. + * + *

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

+ * + * @return the value of the 'Schema' reference. + * @see #setSchema(SwaggerDefinition) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSchema_Schema() + * @model + * @generated + */ + SwaggerDefinition getSchema(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSchema#getSchema Schema}' reference. + * + * + * @param value the new value of the 'Schema' reference. + * @see #getSchema() + * @generated + */ + void setSchema(SwaggerDefinition value); + +} // SwaggerSchema diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurity.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurity.java new file mode 100644 index 0000000..e70d885 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurity.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.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Security'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity#getRoles Roles}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurity() + * @model + * @generated + */ +public interface SwaggerSecurity extends NamedEntity { + /** + * Returns the value of the 'Roles' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

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

+ * + * @return the value of the 'Roles' attribute list. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurity_Roles() + * @model unique="false" + * @generated + */ + EList getRoles(); + +} // SwaggerSecurity diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinition.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinition.java new file mode 100644 index 0000000..a24c9b7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinition.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.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Security Definition'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getAuthorizationUrl Authorization Url}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getFlow Flow}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getIn In}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinition() + * @model + * @generated + */ +public interface SwaggerSecurityDefinition extends NamedEntity { + + /** + * Returns the value of the 'Type' attribute. + * + *

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

+ * + * @return the value of the 'Type' attribute. + * @see #setType(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinition_Type() + * @model unique="false" + * @generated + */ + String getType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see #getType() + * @generated + */ + void setType(String value); + + /** + * Returns the value of the 'Authorization Url' attribute. + * + *

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

+ * + * @return the value of the 'Authorization Url' attribute. + * @see #setAuthorizationUrl(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinition_AuthorizationUrl() + * @model unique="false" + * @generated + */ + String getAuthorizationUrl(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getAuthorizationUrl Authorization Url}' attribute. + * + * + * @param value the new value of the 'Authorization Url' attribute. + * @see #getAuthorizationUrl() + * @generated + */ + void setAuthorizationUrl(String value); + + /** + * Returns the value of the 'Flow' attribute. + * + *

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

+ * + * @return the value of the 'Flow' attribute. + * @see #setFlow(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinition_Flow() + * @model unique="false" + * @generated + */ + String getFlow(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getFlow Flow}' attribute. + * + * + * @param value the new value of the 'Flow' attribute. + * @see #getFlow() + * @generated + */ + void setFlow(String value); + + /** + * Returns the value of the 'In' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType}. + * + *

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

+ * + * @return the value of the 'In' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see #setIn(SwaggerParameterType) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinition_In() + * @model unique="false" + * @generated + */ + SwaggerParameterType getIn(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition#getIn In}' attribute. + * + * + * @param value the new value of the 'In' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType + * @see #getIn() + * @generated + */ + void setIn(SwaggerParameterType value); +} // SwaggerSecurityDefinition diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinitionScope.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinitionScope.java new file mode 100644 index 0000000..150c34d --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityDefinitionScope.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.sirius.manager.swagger; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Security Definition Scope'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope#getDescription Description}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinitionScope() + * @model + * @generated + */ +public interface SwaggerSecurityDefinitionScope extends NamedEntity { + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityDefinitionScope_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + +} // SwaggerSecurityDefinitionScope diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityList.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityList.java new file mode 100644 index 0000000..bcbdddb --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityList.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Security List'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityList#getList List}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityList() + * @model + * @generated + */ +public interface SwaggerSecurityList extends EObject { + /** + * Returns the value of the 'List' containment reference. + * + *

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

+ * + * @return the value of the 'List' containment reference. + * @see #setList(SwaggerSecurity) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityList_List() + * @model containment="true" + * @generated + */ + SwaggerSecurity getList(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityList#getList List}' containment reference. + * + * + * @param value the new value of the 'List' containment reference. + * @see #getList() + * @generated + */ + void setList(SwaggerSecurity value); + +} // SwaggerSecurityList diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityObject.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityObject.java new file mode 100644 index 0000000..3095ec5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerSecurityObject.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.sirius.manager.swagger; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Security Object'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject#getList List}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSecurityObject() + * @model + * @generated + */ +public interface SwaggerSecurityObject extends EObject { + /** + * Returns the value of the 'List' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity}. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#isRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getFormat Format}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMinimum Minimum}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMaximum Maximum}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getPattern Pattern}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getExample Example}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getCollectionFormat Collection Format}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType() + * @model + * @generated + */ +public interface SwaggerSimpleObjectType extends SwaggerNamedObjectType { + /** + * Returns the value of the 'Required' attribute. + * + *

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

+ * + * @return the value of the 'Required' attribute. + * @see #setRequired(boolean) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Required() + * @model unique="false" + * @generated + */ + boolean isRequired(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#isRequired Required}' attribute. + * + * + * @param value the new value of the 'Required' attribute. + * @see #isRequired() + * @generated + */ + void setRequired(boolean value); + + /** + * Returns the value of the 'Format' attribute. + * + *

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

+ * + * @return the value of the 'Format' attribute. + * @see #setFormat(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Format() + * @model unique="false" + * @generated + */ + String getFormat(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getFormat Format}' attribute. + * + * + * @param value the new value of the 'Format' attribute. + * @see #getFormat() + * @generated + */ + void setFormat(String value); + + /** + * Returns the value of the 'Minimum' attribute. + * + *

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

+ * + * @return the value of the 'Minimum' attribute. + * @see #setMinimum(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Minimum() + * @model unique="false" + * @generated + */ + String getMinimum(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMinimum Minimum}' attribute. + * + * + * @param value the new value of the 'Minimum' attribute. + * @see #getMinimum() + * @generated + */ + void setMinimum(String value); + + /** + * Returns the value of the 'Maximum' attribute. + * + *

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

+ * + * @return the value of the 'Maximum' attribute. + * @see #setMaximum(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Maximum() + * @model unique="false" + * @generated + */ + String getMaximum(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getMaximum Maximum}' attribute. + * + * + * @param value the new value of the 'Maximum' attribute. + * @see #getMaximum() + * @generated + */ + void setMaximum(String value); + + /** + * Returns the value of the 'Pattern' attribute. + * + *

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

+ * + * @return the value of the 'Pattern' attribute. + * @see #setPattern(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Pattern() + * @model unique="false" + * @generated + */ + String getPattern(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getPattern Pattern}' attribute. + * + * + * @param value the new value of the 'Pattern' attribute. + * @see #getPattern() + * @generated + */ + void setPattern(String value); + + /** + * Returns the value of the 'Example' attribute. + * + *

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

+ * + * @return the value of the 'Example' attribute. + * @see #setExample(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_Example() + * @model unique="false" + * @generated + */ + String getExample(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getExample Example}' attribute. + * + * + * @param value the new value of the 'Example' attribute. + * @see #getExample() + * @generated + */ + void setExample(String value); + + /** + * Returns the value of the 'Collection Format' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat}. + * + *

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

+ * + * @return the value of the 'Collection Format' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat + * @see #setCollectionFormat(SwaggerCollectionFormat) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerSimpleObjectType_CollectionFormat() + * @model unique="false" + * @generated + */ + SwaggerCollectionFormat getCollectionFormat(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType#getCollectionFormat Collection Format}' attribute. + * + * + * @param value the new value of the 'Collection Format' attribute. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat + * @see #getCollectionFormat() + * @generated + */ + void setCollectionFormat(SwaggerCollectionFormat value); + +} // SwaggerSimpleObjectType diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerTag.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerTag.java new file mode 100644 index 0000000..debeba0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/SwaggerTag.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.sirius.manager.swagger; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Tag'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getExternalDocs External Docs}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerTag() + * @model + * @generated + */ +public interface SwaggerTag extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerTag_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Description' attribute. + * + *

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

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerTag_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'External Docs' containment reference. + * + *

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

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

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#isWrapped Wrapped}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerXml() + * @model + * @generated + */ +public interface SwaggerXml extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

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

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerXml_Name() + * @model unique="false" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Wrapped' attribute. + * The default value is "false". + * + *

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

+ * + * @return the value of the 'Wrapped' attribute. + * @see #setWrapped(boolean) + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage#getSwaggerXml_Wrapped() + * @model default="false" unique="false" + * @generated + */ + boolean isWrapped(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml#isWrapped Wrapped}' attribute. + * + * + * @param value the new value of the 'Wrapped' attribute. + * @see #isWrapped() + * @generated + */ + void setWrapped(boolean value); + +} // SwaggerXml diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerContactImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerContactImpl.java new file mode 100644 index 0000000..3454e1f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerContactImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Contact'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerContactImpl#getEmail Email}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerContactImpl extends MinimalEObjectImpl.Container implements SwaggerContact { + /** + * The default value of the '{@link #getEmail() Email}' attribute. + * + * + * @see #getEmail() + * @generated + * @ordered + */ + protected static final String EMAIL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEmail() Email}' attribute. + * + * + * @see #getEmail() + * @generated + * @ordered + */ + protected String email = EMAIL_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerContactImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_CONTACT; + } + + /** + * + * + * @generated + */ + public String getEmail() { + return email; + } + + /** + * + * + * @generated + */ + public void setEmail(String newEmail) { + String oldEmail = email; + email = newEmail; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_CONTACT__EMAIL, oldEmail, email)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_CONTACT__EMAIL: + return getEmail(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_CONTACT__EMAIL: + setEmail((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_CONTACT__EMAIL: + setEmail(EMAIL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_CONTACT__EMAIL: + return EMAIL_EDEFAULT == null ? email != null : !EMAIL_EDEFAULT.equals(email); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (email: "); + result.append(email); + result.append(')'); + return result.toString(); + } + +} //SwaggerContactImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerEnumObjectTypeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerEnumObjectTypeImpl.java new file mode 100644 index 0000000..08536f8 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerEnumObjectTypeImpl.java @@ -0,0 +1,164 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import java.util.Collection; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Enum Object Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerEnumObjectTypeImpl#getEnum Enum}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerEnumObjectTypeImpl extends SwaggerSimpleObjectTypeImpl implements SwaggerEnumObjectType { + /** + * The cached value of the '{@link #getEnum() Enum}' attribute list. + * + * + * @see #getEnum() + * @generated + * @ordered + */ + protected EList enum_; + + /** + * + * + * @generated + */ + protected SwaggerEnumObjectTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_ENUM_OBJECT_TYPE; + } + + /** + * + * + * @generated + */ + public EList getEnum() { + if (enum_ == null) { + enum_ = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE__ENUM); + } + return enum_; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE__ENUM: + return getEnum(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE__ENUM: + getEnum().clear(); + getEnum().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE__ENUM: + getEnum().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE__ENUM: + return enum_ != null && !enum_.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (enum: "); + result.append(enum_); + result.append(')'); + return result.toString(); + } + +} //SwaggerEnumObjectTypeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerExternalDocumentationImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerExternalDocumentationImpl.java new file mode 100644 index 0000000..5340aa2 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerExternalDocumentationImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Document'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerExternalDocumentationImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerExternalDocumentationImpl extends MinimalEObjectImpl.Container implements SwaggerExternalDocumentation { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerExternalDocumentationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_EXTERNAL_DOCUMENTATION; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(", url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //SwaggerDocumentImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerFactoryImpl.java new file mode 100644 index 0000000..f5b9c91 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerFactoryImpl.java @@ -0,0 +1,411 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class SwaggerFactoryImpl extends EFactoryImpl implements SwaggerFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static SwaggerFactory init() { + try { + SwaggerFactory theSwaggerFactory = (SwaggerFactory)EPackage.Registry.INSTANCE.getEFactory(SwaggerPackage.eNS_URI); + if (theSwaggerFactory != null) { + return theSwaggerFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new SwaggerFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public SwaggerFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case SwaggerPackage.SWAGGER_MODEL: return createSwaggerModel(); + case SwaggerPackage.SWAGGER_INFO: return createSwaggerInfo(); + case SwaggerPackage.SWAGGER_CONTACT: return createSwaggerContact(); + case SwaggerPackage.SWAGGER_LICENSE: return createSwaggerLicense(); + case SwaggerPackage.SWAGGER_TAG: return createSwaggerTag(); + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION: return createSwaggerExternalDocumentation(); + case SwaggerPackage.SWAGGER_PATH: return createSwaggerPath(); + case SwaggerPackage.SWAGGER_OPERATION: return createSwaggerOperation(); + case SwaggerPackage.SWAGGER_PARAMETER: return createSwaggerParameter(); + case SwaggerPackage.SWAGGER_RESPONSE: return createSwaggerResponse(); + case SwaggerPackage.SWAGGER_SECURITY_OBJECT: return createSwaggerSecurityObject(); + case SwaggerPackage.SWAGGER_SECURITY: return createSwaggerSecurity(); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION: return createSwaggerSecurityDefinition(); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION_SCOPE: return createSwaggerSecurityDefinitionScope(); + case SwaggerPackage.SWAGGER_OBJECT_TYPE: return createSwaggerObjectType(); + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE: return createSwaggerReferenceObjectType(); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE: return createSwaggerNamedObjectType(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION: return createSwaggerObjectClassDefinition(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE: return createSwaggerSimpleObjectType(); + case SwaggerPackage.SWAGGER_XML: return createSwaggerXml(); + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE: return createSwaggerEnumObjectType(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case SwaggerPackage.SWAGGER_PARAMETER_TYPE: + return createSwaggerParameterTypeFromString(eDataType, initialValue); + case SwaggerPackage.SWAGGER_COLLECTION_FORMAT: + return createSwaggerCollectionFormatFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case SwaggerPackage.SWAGGER_PARAMETER_TYPE: + return convertSwaggerParameterTypeToString(eDataType, instanceValue); + case SwaggerPackage.SWAGGER_COLLECTION_FORMAT: + return convertSwaggerCollectionFormatToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public SwaggerModel createSwaggerModel() { + SwaggerModelImpl swaggerModel = new SwaggerModelImpl(); + return swaggerModel; + } + + /** + * + * + * @generated + */ + public SwaggerInfo createSwaggerInfo() { + SwaggerInfoImpl swaggerInfo = new SwaggerInfoImpl(); + return swaggerInfo; + } + + /** + * + * + * @generated + */ + public SwaggerContact createSwaggerContact() { + SwaggerContactImpl swaggerContact = new SwaggerContactImpl(); + return swaggerContact; + } + + /** + * + * + * @generated + */ + public SwaggerLicense createSwaggerLicense() { + SwaggerLicenseImpl swaggerLicense = new SwaggerLicenseImpl(); + return swaggerLicense; + } + + /** + * + * + * @generated + */ + public SwaggerTag createSwaggerTag() { + SwaggerTagImpl swaggerTag = new SwaggerTagImpl(); + return swaggerTag; + } + + /** + * + * + * @generated + */ + public SwaggerExternalDocumentation createSwaggerExternalDocumentation() { + SwaggerExternalDocumentationImpl swaggerExternalDocumentation = new SwaggerExternalDocumentationImpl(); + return swaggerExternalDocumentation; + } + + /** + * + * + * @generated + */ + public SwaggerPath createSwaggerPath() { + SwaggerPathImpl swaggerPath = new SwaggerPathImpl(); + return swaggerPath; + } + + /** + * + * + * @generated + */ + public SwaggerOperation createSwaggerOperation() { + SwaggerOperationImpl swaggerOperation = new SwaggerOperationImpl(); + return swaggerOperation; + } + + /** + * + * + * @generated + */ + public SwaggerParameter createSwaggerParameter() { + SwaggerParameterImpl swaggerParameter = new SwaggerParameterImpl(); + return swaggerParameter; + } + + /** + * + * + * @generated + */ + public SwaggerResponse createSwaggerResponse() { + SwaggerResponseImpl swaggerResponse = new SwaggerResponseImpl(); + return swaggerResponse; + } + + /** + * + * + * @generated + */ + public SwaggerSecurityObject createSwaggerSecurityObject() { + SwaggerSecurityObjectImpl swaggerSecurityObject = new SwaggerSecurityObjectImpl(); + return swaggerSecurityObject; + } + + /** + * + * + * @generated + */ + public SwaggerSecurity createSwaggerSecurity() { + SwaggerSecurityImpl swaggerSecurity = new SwaggerSecurityImpl(); + return swaggerSecurity; + } + + /** + * + * + * @generated + */ + public SwaggerSecurityDefinition createSwaggerSecurityDefinition() { + SwaggerSecurityDefinitionImpl swaggerSecurityDefinition = new SwaggerSecurityDefinitionImpl(); + return swaggerSecurityDefinition; + } + + /** + * + * + * @generated + */ + public SwaggerSecurityDefinitionScope createSwaggerSecurityDefinitionScope() { + SwaggerSecurityDefinitionScopeImpl swaggerSecurityDefinitionScope = new SwaggerSecurityDefinitionScopeImpl(); + return swaggerSecurityDefinitionScope; + } + + /** + * + * + * @generated + */ + public SwaggerObjectType createSwaggerObjectType() { + SwaggerObjectTypeImpl swaggerObjectType = new SwaggerObjectTypeImpl(); + return swaggerObjectType; + } + + /** + * + * + * @generated + */ + public SwaggerReferenceObjectType createSwaggerReferenceObjectType() { + SwaggerReferenceObjectTypeImpl swaggerReferenceObjectType = new SwaggerReferenceObjectTypeImpl(); + return swaggerReferenceObjectType; + } + + /** + * + * + * @generated + */ + public SwaggerNamedObjectType createSwaggerNamedObjectType() { + SwaggerNamedObjectTypeImpl swaggerNamedObjectType = new SwaggerNamedObjectTypeImpl(); + return swaggerNamedObjectType; + } + + /** + * + * + * @generated + */ + public SwaggerObjectClassDefinition createSwaggerObjectClassDefinition() { + SwaggerObjectClassDefinitionImpl swaggerObjectClassDefinition = new SwaggerObjectClassDefinitionImpl(); + return swaggerObjectClassDefinition; + } + + /** + * + * + * @generated + */ + public SwaggerSimpleObjectType createSwaggerSimpleObjectType() { + SwaggerSimpleObjectTypeImpl swaggerSimpleObjectType = new SwaggerSimpleObjectTypeImpl(); + return swaggerSimpleObjectType; + } + + /** + * + * + * @generated + */ + public SwaggerXml createSwaggerXml() { + SwaggerXmlImpl swaggerXml = new SwaggerXmlImpl(); + return swaggerXml; + } + + /** + * + * + * @generated + */ + public SwaggerEnumObjectType createSwaggerEnumObjectType() { + SwaggerEnumObjectTypeImpl swaggerEnumObjectType = new SwaggerEnumObjectTypeImpl(); + return swaggerEnumObjectType; + } + + /** + * + * + * @generated + */ + public SwaggerParameterType createSwaggerParameterTypeFromString(EDataType eDataType, String initialValue) { + SwaggerParameterType result = SwaggerParameterType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertSwaggerParameterTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public SwaggerCollectionFormat createSwaggerCollectionFormatFromString(EDataType eDataType, String initialValue) { + SwaggerCollectionFormat result = SwaggerCollectionFormat.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertSwaggerCollectionFormatToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public SwaggerPackage getSwaggerPackage() { + return (SwaggerPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static SwaggerPackage getPackage() { + return SwaggerPackage.eINSTANCE; + } + +} //SwaggerFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerInfoImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerInfoImpl.java new file mode 100644 index 0000000..e325523 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerInfoImpl.java @@ -0,0 +1,492 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +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; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Info'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getVersion Version}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getTitle Title}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getTermsOfService Terms Of Service}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getContact Contact}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerInfoImpl#getLicense License}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerInfoImpl extends MinimalEObjectImpl.Container implements SwaggerInfo { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected static final String VERSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getVersion() Version}' attribute. + * + * + * @see #getVersion() + * @generated + * @ordered + */ + protected String version = VERSION_EDEFAULT; + + /** + * The default value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected static final String TITLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTitle() Title}' attribute. + * + * + * @see #getTitle() + * @generated + * @ordered + */ + protected String title = TITLE_EDEFAULT; + + /** + * The default value of the '{@link #getTermsOfService() Terms Of Service}' attribute. + * + * + * @see #getTermsOfService() + * @generated + * @ordered + */ + protected static final String TERMS_OF_SERVICE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTermsOfService() Terms Of Service}' attribute. + * + * + * @see #getTermsOfService() + * @generated + * @ordered + */ + protected String termsOfService = TERMS_OF_SERVICE_EDEFAULT; + + /** + * The cached value of the '{@link #getContact() Contact}' containment reference. + * + * + * @see #getContact() + * @generated + * @ordered + */ + protected SwaggerContact contact; + + /** + * The cached value of the '{@link #getLicense() License}' containment reference. + * + * + * @see #getLicense() + * @generated + * @ordered + */ + protected SwaggerLicense license; + + /** + * + * + * @generated + */ + protected SwaggerInfoImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_INFO; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getVersion() { + return version; + } + + /** + * + * + * @generated + */ + public void setVersion(String newVersion) { + String oldVersion = version; + version = newVersion; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__VERSION, oldVersion, version)); + } + + /** + * + * + * @generated + */ + public String getTitle() { + return title; + } + + /** + * + * + * @generated + */ + public void setTitle(String newTitle) { + String oldTitle = title; + title = newTitle; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__TITLE, oldTitle, title)); + } + + /** + * + * + * @generated + */ + public String getTermsOfService() { + return termsOfService; + } + + /** + * + * + * @generated + */ + public void setTermsOfService(String newTermsOfService) { + String oldTermsOfService = termsOfService; + termsOfService = newTermsOfService; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__TERMS_OF_SERVICE, oldTermsOfService, termsOfService)); + } + + /** + * + * + * @generated + */ + public SwaggerContact getContact() { + return contact; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetContact(SwaggerContact newContact, NotificationChain msgs) { + SwaggerContact oldContact = contact; + contact = newContact; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__CONTACT, oldContact, newContact); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setContact(SwaggerContact newContact) { + if (newContact != contact) { + NotificationChain msgs = null; + if (contact != null) + msgs = ((InternalEObject)contact).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_INFO__CONTACT, null, msgs); + if (newContact != null) + msgs = ((InternalEObject)newContact).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_INFO__CONTACT, null, msgs); + msgs = basicSetContact(newContact, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__CONTACT, newContact, newContact)); + } + + /** + * + * + * @generated + */ + public SwaggerLicense getLicense() { + return license; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLicense(SwaggerLicense newLicense, NotificationChain msgs) { + SwaggerLicense oldLicense = license; + license = newLicense; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__LICENSE, oldLicense, newLicense); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLicense(SwaggerLicense newLicense) { + if (newLicense != license) { + NotificationChain msgs = null; + if (license != null) + msgs = ((InternalEObject)license).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_INFO__LICENSE, null, msgs); + if (newLicense != null) + msgs = ((InternalEObject)newLicense).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_INFO__LICENSE, null, msgs); + msgs = basicSetLicense(newLicense, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_INFO__LICENSE, newLicense, newLicense)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_INFO__CONTACT: + return basicSetContact(null, msgs); + case SwaggerPackage.SWAGGER_INFO__LICENSE: + return basicSetLicense(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_INFO__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_INFO__VERSION: + return getVersion(); + case SwaggerPackage.SWAGGER_INFO__TITLE: + return getTitle(); + case SwaggerPackage.SWAGGER_INFO__TERMS_OF_SERVICE: + return getTermsOfService(); + case SwaggerPackage.SWAGGER_INFO__CONTACT: + return getContact(); + case SwaggerPackage.SWAGGER_INFO__LICENSE: + return getLicense(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_INFO__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_INFO__VERSION: + setVersion((String)newValue); + return; + case SwaggerPackage.SWAGGER_INFO__TITLE: + setTitle((String)newValue); + return; + case SwaggerPackage.SWAGGER_INFO__TERMS_OF_SERVICE: + setTermsOfService((String)newValue); + return; + case SwaggerPackage.SWAGGER_INFO__CONTACT: + setContact((SwaggerContact)newValue); + return; + case SwaggerPackage.SWAGGER_INFO__LICENSE: + setLicense((SwaggerLicense)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_INFO__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_INFO__VERSION: + setVersion(VERSION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_INFO__TITLE: + setTitle(TITLE_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_INFO__TERMS_OF_SERVICE: + setTermsOfService(TERMS_OF_SERVICE_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_INFO__CONTACT: + setContact((SwaggerContact)null); + return; + case SwaggerPackage.SWAGGER_INFO__LICENSE: + setLicense((SwaggerLicense)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_INFO__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_INFO__VERSION: + return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); + case SwaggerPackage.SWAGGER_INFO__TITLE: + return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title); + case SwaggerPackage.SWAGGER_INFO__TERMS_OF_SERVICE: + return TERMS_OF_SERVICE_EDEFAULT == null ? termsOfService != null : !TERMS_OF_SERVICE_EDEFAULT.equals(termsOfService); + case SwaggerPackage.SWAGGER_INFO__CONTACT: + return contact != null; + case SwaggerPackage.SWAGGER_INFO__LICENSE: + return license != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(", version: "); + result.append(version); + result.append(", title: "); + result.append(title); + result.append(", termsOfService: "); + result.append(termsOfService); + result.append(')'); + return result.toString(); + } + +} //SwaggerInfoImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerLicenseImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerLicenseImpl.java new file mode 100644 index 0000000..d67be65 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerLicenseImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'License'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerLicenseImpl#getUrl Url}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerLicenseImpl extends MinimalEObjectImpl.Container implements SwaggerLicense { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected static final String URL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUrl() Url}' attribute. + * + * + * @see #getUrl() + * @generated + * @ordered + */ + protected String url = URL_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerLicenseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_LICENSE; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_LICENSE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getUrl() { + return url; + } + + /** + * + * + * @generated + */ + public void setUrl(String newUrl) { + String oldUrl = url; + url = newUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_LICENSE__URL, oldUrl, url)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_LICENSE__NAME: + return getName(); + case SwaggerPackage.SWAGGER_LICENSE__URL: + return getUrl(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_LICENSE__NAME: + setName((String)newValue); + return; + case SwaggerPackage.SWAGGER_LICENSE__URL: + setUrl((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_LICENSE__NAME: + setName(NAME_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_LICENSE__URL: + setUrl(URL_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_LICENSE__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case SwaggerPackage.SWAGGER_LICENSE__URL: + return URL_EDEFAULT == null ? url != null : !URL_EDEFAULT.equals(url); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", url: "); + result.append(url); + result.append(')'); + return result.toString(); + } + +} //SwaggerLicenseImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerModelImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerModelImpl.java new file mode 100644 index 0000000..c8be5c5 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerModelImpl.java @@ -0,0 +1,633 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag; + +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.EDataTypeEList; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Model'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getSwagger Swagger}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getInfo Info}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getHost Host}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getBasePath Base Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getTags Tags}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getSchemes Schemes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getPaths Paths}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getDefinitions Definitions}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getExternalDocs External Docs}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerModelImpl#getSecurityDefinitions Security Definitions}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerModelImpl extends MinimalEObjectImpl.Container implements SwaggerModel { + /** + * The default value of the '{@link #getSwagger() Swagger}' attribute. + * + * + * @see #getSwagger() + * @generated + * @ordered + */ + protected static final String SWAGGER_EDEFAULT = "2.0"; + + /** + * The cached value of the '{@link #getSwagger() Swagger}' attribute. + * + * + * @see #getSwagger() + * @generated + * @ordered + */ + protected String swagger = SWAGGER_EDEFAULT; + + /** + * The cached value of the '{@link #getInfo() Info}' containment reference. + * + * + * @see #getInfo() + * @generated + * @ordered + */ + protected SwaggerInfo info; + + /** + * The default value of the '{@link #getHost() Host}' attribute. + * + * + * @see #getHost() + * @generated + * @ordered + */ + protected static final String HOST_EDEFAULT = null; + + /** + * The cached value of the '{@link #getHost() Host}' attribute. + * + * + * @see #getHost() + * @generated + * @ordered + */ + protected String host = HOST_EDEFAULT; + + /** + * The default value of the '{@link #getBasePath() Base Path}' attribute. + * + * + * @see #getBasePath() + * @generated + * @ordered + */ + protected static final String BASE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getBasePath() Base Path}' attribute. + * + * + * @see #getBasePath() + * @generated + * @ordered + */ + protected String basePath = BASE_PATH_EDEFAULT; + + /** + * The cached value of the '{@link #getTags() Tags}' containment reference list. + * + * + * @see #getTags() + * @generated + * @ordered + */ + protected EList tags; + + /** + * The cached value of the '{@link #getSchemes() Schemes}' attribute list. + * + * + * @see #getSchemes() + * @generated + * @ordered + */ + protected EList schemes; + + /** + * The cached value of the '{@link #getPaths() Paths}' containment reference list. + * + * + * @see #getPaths() + * @generated + * @ordered + */ + protected EList paths; + + /** + * The cached value of the '{@link #getDefinitions() Definitions}' containment reference list. + * + * + * @see #getDefinitions() + * @generated + * @ordered + */ + protected EList definitions; + + /** + * The cached value of the '{@link #getExternalDocs() External Docs}' containment reference. + * + * + * @see #getExternalDocs() + * @generated + * @ordered + */ + protected SwaggerExternalDocumentation externalDocs; + + /** + * The cached value of the '{@link #getSecurityDefinitions() Security Definitions}' containment reference list. + * + * + * @see #getSecurityDefinitions() + * @generated + * @ordered + */ + protected EList securityDefinitions; + + /** + * + * + * @generated + */ + protected SwaggerModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_MODEL; + } + + /** + * + * + * @generated + */ + public String getSwagger() { + return swagger; + } + + /** + * + * + * @generated + */ + public void setSwagger(String newSwagger) { + String oldSwagger = swagger; + swagger = newSwagger; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__SWAGGER, oldSwagger, swagger)); + } + + /** + * + * + * @generated + */ + public SwaggerInfo getInfo() { + return info; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInfo(SwaggerInfo newInfo, NotificationChain msgs) { + SwaggerInfo oldInfo = info; + info = newInfo; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__INFO, oldInfo, newInfo); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInfo(SwaggerInfo newInfo) { + if (newInfo != info) { + NotificationChain msgs = null; + if (info != null) + msgs = ((InternalEObject)info).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_MODEL__INFO, null, msgs); + if (newInfo != null) + msgs = ((InternalEObject)newInfo).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_MODEL__INFO, null, msgs); + msgs = basicSetInfo(newInfo, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__INFO, newInfo, newInfo)); + } + + /** + * + * + * @generated + */ + public String getHost() { + return host; + } + + /** + * + * + * @generated + */ + public void setHost(String newHost) { + String oldHost = host; + host = newHost; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__HOST, oldHost, host)); + } + + /** + * + * + * @generated + */ + public String getBasePath() { + return basePath; + } + + /** + * + * + * @generated + */ + public void setBasePath(String newBasePath) { + String oldBasePath = basePath; + basePath = newBasePath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__BASE_PATH, oldBasePath, basePath)); + } + + /** + * + * + * @generated + */ + public EList getTags() { + if (tags == null) { + tags = new EObjectContainmentEList(SwaggerTag.class, this, SwaggerPackage.SWAGGER_MODEL__TAGS); + } + return tags; + } + + /** + * + * + * @generated + */ + public EList getSchemes() { + if (schemes == null) { + schemes = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_MODEL__SCHEMES); + } + return schemes; + } + + /** + * + * + * @generated + */ + public EList getPaths() { + if (paths == null) { + paths = new EObjectContainmentEList(SwaggerPath.class, this, SwaggerPackage.SWAGGER_MODEL__PATHS); + } + return paths; + } + + /** + * + * + * @generated + */ + public EList getDefinitions() { + if (definitions == null) { + definitions = new EObjectContainmentEList(SwaggerNamedObjectType.class, this, SwaggerPackage.SWAGGER_MODEL__DEFINITIONS); + } + return definitions; + } + + /** + * + * + * @generated + */ + public SwaggerExternalDocumentation getExternalDocs() { + return externalDocs; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetExternalDocs(SwaggerExternalDocumentation newExternalDocs, NotificationChain msgs) { + SwaggerExternalDocumentation oldExternalDocs = externalDocs; + externalDocs = newExternalDocs; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS, oldExternalDocs, newExternalDocs); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setExternalDocs(SwaggerExternalDocumentation newExternalDocs) { + if (newExternalDocs != externalDocs) { + NotificationChain msgs = null; + if (externalDocs != null) + msgs = ((InternalEObject)externalDocs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS, null, msgs); + if (newExternalDocs != null) + msgs = ((InternalEObject)newExternalDocs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS, null, msgs); + msgs = basicSetExternalDocs(newExternalDocs, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS, newExternalDocs, newExternalDocs)); + } + + /** + * + * + * @generated + */ + public EList getSecurityDefinitions() { + if (securityDefinitions == null) { + securityDefinitions = new EObjectContainmentEList(SwaggerSecurityDefinition.class, this, SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS); + } + return securityDefinitions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_MODEL__INFO: + return basicSetInfo(null, msgs); + case SwaggerPackage.SWAGGER_MODEL__TAGS: + return ((InternalEList)getTags()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_MODEL__PATHS: + return ((InternalEList)getPaths()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_MODEL__DEFINITIONS: + return ((InternalEList)getDefinitions()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS: + return basicSetExternalDocs(null, msgs); + case SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS: + return ((InternalEList)getSecurityDefinitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_MODEL__SWAGGER: + return getSwagger(); + case SwaggerPackage.SWAGGER_MODEL__INFO: + return getInfo(); + case SwaggerPackage.SWAGGER_MODEL__HOST: + return getHost(); + case SwaggerPackage.SWAGGER_MODEL__BASE_PATH: + return getBasePath(); + case SwaggerPackage.SWAGGER_MODEL__TAGS: + return getTags(); + case SwaggerPackage.SWAGGER_MODEL__SCHEMES: + return getSchemes(); + case SwaggerPackage.SWAGGER_MODEL__PATHS: + return getPaths(); + case SwaggerPackage.SWAGGER_MODEL__DEFINITIONS: + return getDefinitions(); + case SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS: + return getExternalDocs(); + case SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS: + return getSecurityDefinitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_MODEL__SWAGGER: + setSwagger((String)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__INFO: + setInfo((SwaggerInfo)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__HOST: + setHost((String)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__BASE_PATH: + setBasePath((String)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__TAGS: + getTags().clear(); + getTags().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__SCHEMES: + getSchemes().clear(); + getSchemes().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__PATHS: + getPaths().clear(); + getPaths().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__DEFINITIONS: + getDefinitions().clear(); + getDefinitions().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS: + setExternalDocs((SwaggerExternalDocumentation)newValue); + return; + case SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS: + getSecurityDefinitions().clear(); + getSecurityDefinitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_MODEL__SWAGGER: + setSwagger(SWAGGER_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_MODEL__INFO: + setInfo((SwaggerInfo)null); + return; + case SwaggerPackage.SWAGGER_MODEL__HOST: + setHost(HOST_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_MODEL__BASE_PATH: + setBasePath(BASE_PATH_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_MODEL__TAGS: + getTags().clear(); + return; + case SwaggerPackage.SWAGGER_MODEL__SCHEMES: + getSchemes().clear(); + return; + case SwaggerPackage.SWAGGER_MODEL__PATHS: + getPaths().clear(); + return; + case SwaggerPackage.SWAGGER_MODEL__DEFINITIONS: + getDefinitions().clear(); + return; + case SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS: + setExternalDocs((SwaggerExternalDocumentation)null); + return; + case SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS: + getSecurityDefinitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_MODEL__SWAGGER: + return SWAGGER_EDEFAULT == null ? swagger != null : !SWAGGER_EDEFAULT.equals(swagger); + case SwaggerPackage.SWAGGER_MODEL__INFO: + return info != null; + case SwaggerPackage.SWAGGER_MODEL__HOST: + return HOST_EDEFAULT == null ? host != null : !HOST_EDEFAULT.equals(host); + case SwaggerPackage.SWAGGER_MODEL__BASE_PATH: + return BASE_PATH_EDEFAULT == null ? basePath != null : !BASE_PATH_EDEFAULT.equals(basePath); + case SwaggerPackage.SWAGGER_MODEL__TAGS: + return tags != null && !tags.isEmpty(); + case SwaggerPackage.SWAGGER_MODEL__SCHEMES: + return schemes != null && !schemes.isEmpty(); + case SwaggerPackage.SWAGGER_MODEL__PATHS: + return paths != null && !paths.isEmpty(); + case SwaggerPackage.SWAGGER_MODEL__DEFINITIONS: + return definitions != null && !definitions.isEmpty(); + case SwaggerPackage.SWAGGER_MODEL__EXTERNAL_DOCS: + return externalDocs != null; + case SwaggerPackage.SWAGGER_MODEL__SECURITY_DEFINITIONS: + return securityDefinitions != null && !securityDefinitions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (swagger: "); + result.append(swagger); + result.append(", host: "); + result.append(host); + result.append(", basePath: "); + result.append(basePath); + result.append(", schemes: "); + result.append(schemes); + result.append(')'); + return result.toString(); + } + +} //SwaggerModelImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerNamedObjectTypeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerNamedObjectTypeImpl.java new file mode 100644 index 0000000..d8d4e7c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerNamedObjectTypeImpl.java @@ -0,0 +1,461 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Named Object Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl#isMany Many}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl#getDefault Default}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerNamedObjectTypeImpl#getXml Xml}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerNamedObjectTypeImpl extends NamedEntityImpl implements SwaggerNamedObjectType { + /** + * The default value of the '{@link #isMany() Many}' attribute. + * + * + * @see #isMany() + * @generated + * @ordered + */ + protected static final boolean MANY_EDEFAULT = false; + + /** + * The cached value of the '{@link #isMany() Many}' attribute. + * + * + * @see #isMany() + * @generated + * @ordered + */ + protected boolean many = MANY_EDEFAULT; + + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + + /** + * The default value of the '{@link #getDefault() Default}' attribute. + * + * + * @see #getDefault() + * @generated + * @ordered + */ + protected static final String DEFAULT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDefault() Default}' attribute. + * + * + * @see #getDefault() + * @generated + * @ordered + */ + protected String default_ = DEFAULT_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getXml() Xml}' containment reference. + * + * + * @see #getXml() + * @generated + * @ordered + */ + protected SwaggerXml xml; + + /** + * + * + * @generated + */ + protected SwaggerNamedObjectTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_NAMED_OBJECT_TYPE; + } + + /** + * + * + * @generated + */ + public boolean isMany() { + return many; + } + + /** + * + * + * @generated + */ + public void setMany(boolean newMany) { + boolean oldMany = many; + many = newMany; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY, oldMany, many)); + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public String getDefault() { + return default_; + } + + /** + * + * + * @generated + */ + public void setDefault(String newDefault) { + String oldDefault = default_; + default_ = newDefault; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DEFAULT, oldDefault, default_)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public SwaggerXml getXml() { + return xml; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetXml(SwaggerXml newXml, NotificationChain msgs) { + SwaggerXml oldXml = xml; + xml = newXml; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML, oldXml, newXml); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setXml(SwaggerXml newXml) { + if (newXml != xml) { + NotificationChain msgs = null; + if (xml != null) + msgs = ((InternalEObject)xml).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML, null, msgs); + if (newXml != null) + msgs = ((InternalEObject)newXml).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML, null, msgs); + msgs = basicSetXml(newXml, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML, newXml, newXml)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML: + return basicSetXml(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY: + return isMany(); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__TYPE: + return getType(); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DEFAULT: + return getDefault(); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML: + return getXml(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY: + setMany((Boolean)newValue); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__TYPE: + setType((String)newValue); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DEFAULT: + setDefault((String)newValue); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML: + setXml((SwaggerXml)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY: + setMany(MANY_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__TYPE: + setType(TYPE_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DEFAULT: + setDefault(DEFAULT_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML: + setXml((SwaggerXml)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY: + return many != MANY_EDEFAULT; + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DEFAULT: + return DEFAULT_EDEFAULT == null ? default_ != null : !DEFAULT_EDEFAULT.equals(default_); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__XML: + return xml != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == SwaggerObjectType.class) { + switch (derivedFeatureID) { + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY: return SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == SwaggerObjectType.class) { + switch (baseFeatureID) { + case SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY: return SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE__MANY; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (many: "); + result.append(many); + result.append(", type: "); + result.append(type); + result.append(", default: "); + result.append(default_); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //SwaggerNamedObjectTypeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectClassDefinitionImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectClassDefinitionImpl.java new file mode 100644 index 0000000..6af474e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectClassDefinitionImpl.java @@ -0,0 +1,321 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +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; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Object Class Definition'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl#getRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl#getAllOf All Of}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl#getProperties Properties}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectClassDefinitionImpl#getAdditionalProperties Additional Properties}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerObjectClassDefinitionImpl extends SwaggerNamedObjectTypeImpl implements SwaggerObjectClassDefinition { + /** + * The cached value of the '{@link #getRequired() Required}' attribute list. + * + * + * @see #getRequired() + * @generated + * @ordered + */ + protected EList required; + + /** + * The cached value of the '{@link #getAllOf() All Of}' reference list. + * + * + * @see #getAllOf() + * @generated + * @ordered + */ + protected EList allOf; + + /** + * The cached value of the '{@link #getProperties() Properties}' containment reference list. + * + * + * @see #getProperties() + * @generated + * @ordered + */ + protected EList properties; + + /** + * The cached value of the '{@link #getAdditionalProperties() Additional Properties}' containment reference. + * + * + * @see #getAdditionalProperties() + * @generated + * @ordered + */ + protected SwaggerObjectType additionalProperties; + + /** + * + * + * @generated + */ + protected SwaggerObjectClassDefinitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_OBJECT_CLASS_DEFINITION; + } + + /** + * + * + * @generated + */ + public EList getRequired() { + if (required == null) { + required = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED); + } + return required; + } + + /** + * + * + * @generated + */ + public EList getAllOf() { + if (allOf == null) { + allOf = new EObjectResolvingEList(SwaggerObjectType.class, this, SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF); + } + return allOf; + } + + /** + * + * + * @generated + */ + public EList getProperties() { + if (properties == null) { + properties = new EObjectContainmentEList(SwaggerNamedObjectType.class, this, SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES); + } + return properties; + } + + /** + * + * + * @generated + */ + public SwaggerObjectType getAdditionalProperties() { + return additionalProperties; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAdditionalProperties(SwaggerObjectType newAdditionalProperties, NotificationChain msgs) { + SwaggerObjectType oldAdditionalProperties = additionalProperties; + additionalProperties = newAdditionalProperties; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES, oldAdditionalProperties, newAdditionalProperties); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setAdditionalProperties(SwaggerObjectType newAdditionalProperties) { + if (newAdditionalProperties != additionalProperties) { + NotificationChain msgs = null; + if (additionalProperties != null) + msgs = ((InternalEObject)additionalProperties).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES, null, msgs); + if (newAdditionalProperties != null) + msgs = ((InternalEObject)newAdditionalProperties).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES, null, msgs); + msgs = basicSetAdditionalProperties(newAdditionalProperties, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES, newAdditionalProperties, newAdditionalProperties)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES: + return ((InternalEList)getProperties()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES: + return basicSetAdditionalProperties(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED: + return getRequired(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF: + return getAllOf(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES: + return getProperties(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES: + return getAdditionalProperties(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED: + getRequired().clear(); + getRequired().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF: + getAllOf().clear(); + getAllOf().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES: + getProperties().clear(); + getProperties().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES: + setAdditionalProperties((SwaggerObjectType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED: + getRequired().clear(); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF: + getAllOf().clear(); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES: + getProperties().clear(); + return; + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES: + setAdditionalProperties((SwaggerObjectType)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED: + return required != null && !required.isEmpty(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF: + return allOf != null && !allOf.isEmpty(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES: + return properties != null && !properties.isEmpty(); + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES: + return additionalProperties != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (required: "); + result.append(required); + result.append(')'); + return result.toString(); + } + +} //SwaggerObjectClassDefinitionImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectTypeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectTypeImpl.java new file mode 100644 index 0000000..5e4459b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerObjectTypeImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Object Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerObjectTypeImpl#isMany Many}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerObjectTypeImpl extends MinimalEObjectImpl.Container implements SwaggerObjectType { + /** + * The default value of the '{@link #isMany() Many}' attribute. + * + * + * @see #isMany() + * @generated + * @ordered + */ + protected static final boolean MANY_EDEFAULT = false; + /** + * The cached value of the '{@link #isMany() Many}' attribute. + * + * + * @see #isMany() + * @generated + * @ordered + */ + protected boolean many = MANY_EDEFAULT; + /** + * + * + * @generated + */ + protected SwaggerObjectTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_OBJECT_TYPE; + } + + /** + * + * + * @generated + */ + public boolean isMany() { + return many; + } + + /** + * + * + * @generated + */ + public void setMany(boolean newMany) { + boolean oldMany = many; + many = newMany; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY, oldMany, many)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY: + return isMany(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY: + setMany((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY: + setMany(MANY_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OBJECT_TYPE__MANY: + return many != MANY_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (many: "); + result.append(many); + result.append(')'); + return result.toString(); + } + +} //SwaggerObjectTypeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerOperationImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerOperationImpl.java new file mode 100644 index 0000000..acdd2c4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerOperationImpl.java @@ -0,0 +1,582 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject; +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; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Operation'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getTags Tags}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getSummary Summary}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getOperationId Operation Id}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getConsumes Consumes}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getProduces Produces}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getParameters Parameters}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getResponses Responses}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#getSecurity Security}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerOperationImpl#isDeprecated Deprecated}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerOperationImpl extends NamedEntityImpl implements SwaggerOperation { + /** + * The cached value of the '{@link #getTags() Tags}' attribute list. + * + * + * @see #getTags() + * @generated + * @ordered + */ + protected EList tags; + + /** + * The default value of the '{@link #getSummary() Summary}' attribute. + * + * + * @see #getSummary() + * @generated + * @ordered + */ + protected static final String SUMMARY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSummary() Summary}' attribute. + * + * + * @see #getSummary() + * @generated + * @ordered + */ + protected String summary = SUMMARY_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getOperationId() Operation Id}' attribute. + * + * + * @see #getOperationId() + * @generated + * @ordered + */ + protected static final String OPERATION_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getOperationId() Operation Id}' attribute. + * + * + * @see #getOperationId() + * @generated + * @ordered + */ + protected String operationId = OPERATION_ID_EDEFAULT; + + /** + * The cached value of the '{@link #getConsumes() Consumes}' attribute list. + * + * + * @see #getConsumes() + * @generated + * @ordered + */ + protected EList consumes; + + /** + * The cached value of the '{@link #getProduces() Produces}' attribute list. + * + * + * @see #getProduces() + * @generated + * @ordered + */ + protected EList produces; + + /** + * The cached value of the '{@link #getParameters() Parameters}' containment reference list. + * + * + * @see #getParameters() + * @generated + * @ordered + */ + protected EList parameters; + + /** + * The cached value of the '{@link #getResponses() Responses}' containment reference list. + * + * + * @see #getResponses() + * @generated + * @ordered + */ + protected EList responses; + + /** + * The cached value of the '{@link #getSecurity() Security}' containment reference list. + * + * + * @see #getSecurity() + * @generated + * @ordered + */ + protected EList security; + + /** + * The default value of the '{@link #isDeprecated() Deprecated}' attribute. + * + * + * @see #isDeprecated() + * @generated + * @ordered + */ + protected static final boolean DEPRECATED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDeprecated() Deprecated}' attribute. + * + * + * @see #isDeprecated() + * @generated + * @ordered + */ + protected boolean deprecated = DEPRECATED_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerOperationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_OPERATION; + } + + /** + * + * + * @generated + */ + public EList getTags() { + if (tags == null) { + tags = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_OPERATION__TAGS); + } + return tags; + } + + /** + * + * + * @generated + */ + public String getSummary() { + return summary; + } + + /** + * + * + * @generated + */ + public void setSummary(String newSummary) { + String oldSummary = summary; + summary = newSummary; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OPERATION__SUMMARY, oldSummary, summary)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OPERATION__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getOperationId() { + return operationId; + } + + /** + * + * + * @generated + */ + public void setOperationId(String newOperationId) { + String oldOperationId = operationId; + operationId = newOperationId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OPERATION__OPERATION_ID, oldOperationId, operationId)); + } + + /** + * + * + * @generated + */ + public EList getConsumes() { + if (consumes == null) { + consumes = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_OPERATION__CONSUMES); + } + return consumes; + } + + /** + * + * + * @generated + */ + public EList getProduces() { + if (produces == null) { + produces = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_OPERATION__PRODUCES); + } + return produces; + } + + /** + * + * + * @generated + */ + public EList getParameters() { + if (parameters == null) { + parameters = new EObjectContainmentEList(SwaggerParameter.class, this, SwaggerPackage.SWAGGER_OPERATION__PARAMETERS); + } + return parameters; + } + + /** + * + * + * @generated + */ + public EList getResponses() { + if (responses == null) { + responses = new EObjectContainmentEList(SwaggerResponse.class, this, SwaggerPackage.SWAGGER_OPERATION__RESPONSES); + } + return responses; + } + + /** + * + * + * @generated + */ + public EList getSecurity() { + if (security == null) { + security = new EObjectContainmentEList(SwaggerSecurityObject.class, this, SwaggerPackage.SWAGGER_OPERATION__SECURITY); + } + return security; + } + + /** + * + * + * @generated + */ + public boolean isDeprecated() { + return deprecated; + } + + /** + * + * + * @generated + */ + public void setDeprecated(boolean newDeprecated) { + boolean oldDeprecated = deprecated; + deprecated = newDeprecated; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_OPERATION__DEPRECATED, oldDeprecated, deprecated)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OPERATION__PARAMETERS: + return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_OPERATION__RESPONSES: + return ((InternalEList)getResponses()).basicRemove(otherEnd, msgs); + case SwaggerPackage.SWAGGER_OPERATION__SECURITY: + return ((InternalEList)getSecurity()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OPERATION__TAGS: + return getTags(); + case SwaggerPackage.SWAGGER_OPERATION__SUMMARY: + return getSummary(); + case SwaggerPackage.SWAGGER_OPERATION__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_OPERATION__OPERATION_ID: + return getOperationId(); + case SwaggerPackage.SWAGGER_OPERATION__CONSUMES: + return getConsumes(); + case SwaggerPackage.SWAGGER_OPERATION__PRODUCES: + return getProduces(); + case SwaggerPackage.SWAGGER_OPERATION__PARAMETERS: + return getParameters(); + case SwaggerPackage.SWAGGER_OPERATION__RESPONSES: + return getResponses(); + case SwaggerPackage.SWAGGER_OPERATION__SECURITY: + return getSecurity(); + case SwaggerPackage.SWAGGER_OPERATION__DEPRECATED: + return isDeprecated(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OPERATION__TAGS: + getTags().clear(); + getTags().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__SUMMARY: + setSummary((String)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__OPERATION_ID: + setOperationId((String)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__CONSUMES: + getConsumes().clear(); + getConsumes().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__PRODUCES: + getProduces().clear(); + getProduces().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__PARAMETERS: + getParameters().clear(); + getParameters().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__RESPONSES: + getResponses().clear(); + getResponses().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__SECURITY: + getSecurity().clear(); + getSecurity().addAll((Collection)newValue); + return; + case SwaggerPackage.SWAGGER_OPERATION__DEPRECATED: + setDeprecated((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OPERATION__TAGS: + getTags().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__SUMMARY: + setSummary(SUMMARY_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_OPERATION__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_OPERATION__OPERATION_ID: + setOperationId(OPERATION_ID_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_OPERATION__CONSUMES: + getConsumes().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__PRODUCES: + getProduces().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__PARAMETERS: + getParameters().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__RESPONSES: + getResponses().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__SECURITY: + getSecurity().clear(); + return; + case SwaggerPackage.SWAGGER_OPERATION__DEPRECATED: + setDeprecated(DEPRECATED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_OPERATION__TAGS: + return tags != null && !tags.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__SUMMARY: + return SUMMARY_EDEFAULT == null ? summary != null : !SUMMARY_EDEFAULT.equals(summary); + case SwaggerPackage.SWAGGER_OPERATION__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_OPERATION__OPERATION_ID: + return OPERATION_ID_EDEFAULT == null ? operationId != null : !OPERATION_ID_EDEFAULT.equals(operationId); + case SwaggerPackage.SWAGGER_OPERATION__CONSUMES: + return consumes != null && !consumes.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__PRODUCES: + return produces != null && !produces.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__PARAMETERS: + return parameters != null && !parameters.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__RESPONSES: + return responses != null && !responses.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__SECURITY: + return security != null && !security.isEmpty(); + case SwaggerPackage.SWAGGER_OPERATION__DEPRECATED: + return deprecated != DEPRECATED_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (tags: "); + result.append(tags); + result.append(", summary: "); + result.append(summary); + result.append(", description: "); + result.append(description); + result.append(", operationId: "); + result.append(operationId); + result.append(", consumes: "); + result.append(consumes); + result.append(", produces: "); + result.append(produces); + result.append(", deprecated: "); + result.append(deprecated); + result.append(')'); + return result.toString(); + } + +} //SwaggerOperationImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPackageImpl.java new file mode 100644 index 0000000..c00577a --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPackageImpl.java @@ -0,0 +1,1469 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerCollectionFormat; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerFactory; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class SwaggerPackageImpl extends EPackageImpl implements SwaggerPackage { + /** + * + * + * @generated + */ + private EClass swaggerModelEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerInfoEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerContactEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerLicenseEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerTagEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerExternalDocumentationEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerPathEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerOperationEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerParameterEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerResponseEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerSecurityObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerSecurityEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerSecurityDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerSecurityDefinitionScopeEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerObjectTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerReferenceObjectTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerNamedObjectTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerObjectClassDefinitionEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerSimpleObjectTypeEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerXmlEClass = null; + + /** + * + * + * @generated + */ + private EClass swaggerEnumObjectTypeEClass = null; + + /** + * + * + * @generated + */ + private EEnum swaggerParameterTypeEEnum = null; + + /** + * + * + * @generated + */ + private EEnum swaggerCollectionFormatEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link SwaggerPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static SwaggerPackage init() { + if (isInited) return (SwaggerPackage)EPackage.Registry.INSTANCE.getEPackage(SwaggerPackage.eNS_URI); + + // Obtain or create and register package + SwaggerPackageImpl theSwaggerPackage = (SwaggerPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SwaggerPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SwaggerPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theSwaggerPackage.createPackageContents(); + + // Initialize created meta-data + theSwaggerPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theSwaggerPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(SwaggerPackage.eNS_URI, theSwaggerPackage); + return theSwaggerPackage; + } + + /** + * + * + * @generated + */ + public EClass getSwaggerModel() { + return swaggerModelEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerModel_Swagger() { + return (EAttribute)swaggerModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_Info() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerModel_Host() { + return (EAttribute)swaggerModelEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerModel_BasePath() { + return (EAttribute)swaggerModelEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_Tags() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerModel_Schemes() { + return (EAttribute)swaggerModelEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_Paths() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_Definitions() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_ExternalDocs() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerModel_SecurityDefinitions() { + return (EReference)swaggerModelEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerInfo() { + return swaggerInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerInfo_Description() { + return (EAttribute)swaggerInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerInfo_Version() { + return (EAttribute)swaggerInfoEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerInfo_Title() { + return (EAttribute)swaggerInfoEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerInfo_TermsOfService() { + return (EAttribute)swaggerInfoEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerInfo_Contact() { + return (EReference)swaggerInfoEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerInfo_License() { + return (EReference)swaggerInfoEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerContact() { + return swaggerContactEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerContact_Email() { + return (EAttribute)swaggerContactEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerLicense() { + return swaggerLicenseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerLicense_Name() { + return (EAttribute)swaggerLicenseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerLicense_Url() { + return (EAttribute)swaggerLicenseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerTag() { + return swaggerTagEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerTag_Name() { + return (EAttribute)swaggerTagEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerTag_Description() { + return (EAttribute)swaggerTagEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerTag_ExternalDocs() { + return (EReference)swaggerTagEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerExternalDocumentation() { + return swaggerExternalDocumentationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerExternalDocumentation_Description() { + return (EAttribute)swaggerExternalDocumentationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerExternalDocumentation_Url() { + return (EAttribute)swaggerExternalDocumentationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerPath() { + return swaggerPathEClass; + } + + /** + * + * + * @generated + */ + public EReference getSwaggerPath_Methods() { + return (EReference)swaggerPathEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerOperation() { + return swaggerOperationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Tags() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Summary() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Description() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_OperationId() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Consumes() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Produces() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerOperation_Parameters() { + return (EReference)swaggerOperationEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerOperation_Responses() { + return (EReference)swaggerOperationEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerOperation_Security() { + return (EReference)swaggerOperationEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerOperation_Deprecated() { + return (EAttribute)swaggerOperationEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerParameter() { + return swaggerParameterEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerParameter_In() { + return (EAttribute)swaggerParameterEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerParameter_Type() { + return (EReference)swaggerParameterEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerResponse() { + return swaggerResponseEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerResponse_Description() { + return (EAttribute)swaggerResponseEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerResponse_Schema() { + return (EReference)swaggerResponseEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerResponse_Headers() { + return (EReference)swaggerResponseEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerSecurityObject() { + return swaggerSecurityObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getSwaggerSecurityObject_List() { + return (EReference)swaggerSecurityObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerSecurity() { + return swaggerSecurityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurity_Roles() { + return (EAttribute)swaggerSecurityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerSecurityDefinition() { + return swaggerSecurityDefinitionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurityDefinition_Type() { + return (EAttribute)swaggerSecurityDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurityDefinition_AuthorizationUrl() { + return (EAttribute)swaggerSecurityDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurityDefinition_Flow() { + return (EAttribute)swaggerSecurityDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurityDefinition_In() { + return (EAttribute)swaggerSecurityDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerSecurityDefinitionScope() { + return swaggerSecurityDefinitionScopeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSecurityDefinitionScope_Description() { + return (EAttribute)swaggerSecurityDefinitionScopeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerObjectType() { + return swaggerObjectTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerObjectType_Many() { + return (EAttribute)swaggerObjectTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerReferenceObjectType() { + return swaggerReferenceObjectTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerReferenceObjectType_Required() { + return (EAttribute)swaggerReferenceObjectTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerReferenceObjectType_Reference() { + return (EReference)swaggerReferenceObjectTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerNamedObjectType() { + return swaggerNamedObjectTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerNamedObjectType_Type() { + return (EAttribute)swaggerNamedObjectTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerNamedObjectType_Default() { + return (EAttribute)swaggerNamedObjectTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerNamedObjectType_Description() { + return (EAttribute)swaggerNamedObjectTypeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerNamedObjectType_Xml() { + return (EReference)swaggerNamedObjectTypeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerObjectClassDefinition() { + return swaggerObjectClassDefinitionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerObjectClassDefinition_Required() { + return (EAttribute)swaggerObjectClassDefinitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerObjectClassDefinition_AllOf() { + return (EReference)swaggerObjectClassDefinitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerObjectClassDefinition_Properties() { + return (EReference)swaggerObjectClassDefinitionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getSwaggerObjectClassDefinition_AdditionalProperties() { + return (EReference)swaggerObjectClassDefinitionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerSimpleObjectType() { + return swaggerSimpleObjectTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Required() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Format() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Minimum() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Maximum() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Pattern() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_Example() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerSimpleObjectType_CollectionFormat() { + return (EAttribute)swaggerSimpleObjectTypeEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerXml() { + return swaggerXmlEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerXml_Name() { + return (EAttribute)swaggerXmlEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerXml_Wrapped() { + return (EAttribute)swaggerXmlEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getSwaggerEnumObjectType() { + return swaggerEnumObjectTypeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSwaggerEnumObjectType_Enum() { + return (EAttribute)swaggerEnumObjectTypeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getSwaggerParameterType() { + return swaggerParameterTypeEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getSwaggerCollectionFormat() { + return swaggerCollectionFormatEEnum; + } + + /** + * + * + * @generated + */ + public SwaggerFactory getSwaggerFactory() { + return (SwaggerFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + swaggerModelEClass = createEClass(SWAGGER_MODEL); + createEAttribute(swaggerModelEClass, SWAGGER_MODEL__SWAGGER); + createEReference(swaggerModelEClass, SWAGGER_MODEL__INFO); + createEAttribute(swaggerModelEClass, SWAGGER_MODEL__HOST); + createEAttribute(swaggerModelEClass, SWAGGER_MODEL__BASE_PATH); + createEReference(swaggerModelEClass, SWAGGER_MODEL__TAGS); + createEAttribute(swaggerModelEClass, SWAGGER_MODEL__SCHEMES); + createEReference(swaggerModelEClass, SWAGGER_MODEL__PATHS); + createEReference(swaggerModelEClass, SWAGGER_MODEL__DEFINITIONS); + createEReference(swaggerModelEClass, SWAGGER_MODEL__EXTERNAL_DOCS); + createEReference(swaggerModelEClass, SWAGGER_MODEL__SECURITY_DEFINITIONS); + + swaggerInfoEClass = createEClass(SWAGGER_INFO); + createEAttribute(swaggerInfoEClass, SWAGGER_INFO__DESCRIPTION); + createEAttribute(swaggerInfoEClass, SWAGGER_INFO__VERSION); + createEAttribute(swaggerInfoEClass, SWAGGER_INFO__TITLE); + createEAttribute(swaggerInfoEClass, SWAGGER_INFO__TERMS_OF_SERVICE); + createEReference(swaggerInfoEClass, SWAGGER_INFO__CONTACT); + createEReference(swaggerInfoEClass, SWAGGER_INFO__LICENSE); + + swaggerContactEClass = createEClass(SWAGGER_CONTACT); + createEAttribute(swaggerContactEClass, SWAGGER_CONTACT__EMAIL); + + swaggerLicenseEClass = createEClass(SWAGGER_LICENSE); + createEAttribute(swaggerLicenseEClass, SWAGGER_LICENSE__NAME); + createEAttribute(swaggerLicenseEClass, SWAGGER_LICENSE__URL); + + swaggerTagEClass = createEClass(SWAGGER_TAG); + createEAttribute(swaggerTagEClass, SWAGGER_TAG__NAME); + createEAttribute(swaggerTagEClass, SWAGGER_TAG__DESCRIPTION); + createEReference(swaggerTagEClass, SWAGGER_TAG__EXTERNAL_DOCS); + + swaggerExternalDocumentationEClass = createEClass(SWAGGER_EXTERNAL_DOCUMENTATION); + createEAttribute(swaggerExternalDocumentationEClass, SWAGGER_EXTERNAL_DOCUMENTATION__DESCRIPTION); + createEAttribute(swaggerExternalDocumentationEClass, SWAGGER_EXTERNAL_DOCUMENTATION__URL); + + swaggerPathEClass = createEClass(SWAGGER_PATH); + createEReference(swaggerPathEClass, SWAGGER_PATH__METHODS); + + swaggerOperationEClass = createEClass(SWAGGER_OPERATION); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__TAGS); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__SUMMARY); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__DESCRIPTION); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__OPERATION_ID); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__CONSUMES); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__PRODUCES); + createEReference(swaggerOperationEClass, SWAGGER_OPERATION__PARAMETERS); + createEReference(swaggerOperationEClass, SWAGGER_OPERATION__RESPONSES); + createEReference(swaggerOperationEClass, SWAGGER_OPERATION__SECURITY); + createEAttribute(swaggerOperationEClass, SWAGGER_OPERATION__DEPRECATED); + + swaggerParameterEClass = createEClass(SWAGGER_PARAMETER); + createEAttribute(swaggerParameterEClass, SWAGGER_PARAMETER__IN); + createEReference(swaggerParameterEClass, SWAGGER_PARAMETER__TYPE); + + swaggerResponseEClass = createEClass(SWAGGER_RESPONSE); + createEAttribute(swaggerResponseEClass, SWAGGER_RESPONSE__DESCRIPTION); + createEReference(swaggerResponseEClass, SWAGGER_RESPONSE__SCHEMA); + createEReference(swaggerResponseEClass, SWAGGER_RESPONSE__HEADERS); + + swaggerSecurityObjectEClass = createEClass(SWAGGER_SECURITY_OBJECT); + createEReference(swaggerSecurityObjectEClass, SWAGGER_SECURITY_OBJECT__LIST); + + swaggerSecurityEClass = createEClass(SWAGGER_SECURITY); + createEAttribute(swaggerSecurityEClass, SWAGGER_SECURITY__ROLES); + + swaggerSecurityDefinitionEClass = createEClass(SWAGGER_SECURITY_DEFINITION); + createEAttribute(swaggerSecurityDefinitionEClass, SWAGGER_SECURITY_DEFINITION__TYPE); + createEAttribute(swaggerSecurityDefinitionEClass, SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL); + createEAttribute(swaggerSecurityDefinitionEClass, SWAGGER_SECURITY_DEFINITION__FLOW); + createEAttribute(swaggerSecurityDefinitionEClass, SWAGGER_SECURITY_DEFINITION__IN); + + swaggerSecurityDefinitionScopeEClass = createEClass(SWAGGER_SECURITY_DEFINITION_SCOPE); + createEAttribute(swaggerSecurityDefinitionScopeEClass, SWAGGER_SECURITY_DEFINITION_SCOPE__DESCRIPTION); + + swaggerObjectTypeEClass = createEClass(SWAGGER_OBJECT_TYPE); + createEAttribute(swaggerObjectTypeEClass, SWAGGER_OBJECT_TYPE__MANY); + + swaggerReferenceObjectTypeEClass = createEClass(SWAGGER_REFERENCE_OBJECT_TYPE); + createEAttribute(swaggerReferenceObjectTypeEClass, SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED); + createEReference(swaggerReferenceObjectTypeEClass, SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE); + + swaggerNamedObjectTypeEClass = createEClass(SWAGGER_NAMED_OBJECT_TYPE); + createEAttribute(swaggerNamedObjectTypeEClass, SWAGGER_NAMED_OBJECT_TYPE__TYPE); + createEAttribute(swaggerNamedObjectTypeEClass, SWAGGER_NAMED_OBJECT_TYPE__DEFAULT); + createEAttribute(swaggerNamedObjectTypeEClass, SWAGGER_NAMED_OBJECT_TYPE__DESCRIPTION); + createEReference(swaggerNamedObjectTypeEClass, SWAGGER_NAMED_OBJECT_TYPE__XML); + + swaggerObjectClassDefinitionEClass = createEClass(SWAGGER_OBJECT_CLASS_DEFINITION); + createEAttribute(swaggerObjectClassDefinitionEClass, SWAGGER_OBJECT_CLASS_DEFINITION__REQUIRED); + createEReference(swaggerObjectClassDefinitionEClass, SWAGGER_OBJECT_CLASS_DEFINITION__ALL_OF); + createEReference(swaggerObjectClassDefinitionEClass, SWAGGER_OBJECT_CLASS_DEFINITION__PROPERTIES); + createEReference(swaggerObjectClassDefinitionEClass, SWAGGER_OBJECT_CLASS_DEFINITION__ADDITIONAL_PROPERTIES); + + swaggerSimpleObjectTypeEClass = createEClass(SWAGGER_SIMPLE_OBJECT_TYPE); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE); + createEAttribute(swaggerSimpleObjectTypeEClass, SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT); + + swaggerXmlEClass = createEClass(SWAGGER_XML); + createEAttribute(swaggerXmlEClass, SWAGGER_XML__NAME); + createEAttribute(swaggerXmlEClass, SWAGGER_XML__WRAPPED); + + swaggerEnumObjectTypeEClass = createEClass(SWAGGER_ENUM_OBJECT_TYPE); + createEAttribute(swaggerEnumObjectTypeEClass, SWAGGER_ENUM_OBJECT_TYPE__ENUM); + + // Create enums + swaggerParameterTypeEEnum = createEEnum(SWAGGER_PARAMETER_TYPE); + swaggerCollectionFormatEEnum = createEEnum(SWAGGER_COLLECTION_FORMAT); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + swaggerPathEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerOperationEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerParameterEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerResponseEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerSecurityEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerSecurityDefinitionEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerSecurityDefinitionScopeEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerReferenceObjectTypeEClass.getESuperTypes().add(this.getSwaggerNamedObjectType()); + swaggerNamedObjectTypeEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + swaggerNamedObjectTypeEClass.getESuperTypes().add(this.getSwaggerObjectType()); + swaggerObjectClassDefinitionEClass.getESuperTypes().add(this.getSwaggerNamedObjectType()); + swaggerSimpleObjectTypeEClass.getESuperTypes().add(this.getSwaggerNamedObjectType()); + swaggerEnumObjectTypeEClass.getESuperTypes().add(this.getSwaggerSimpleObjectType()); + + // Initialize classes, features, and operations; add parameters + initEClass(swaggerModelEClass, SwaggerModel.class, "SwaggerModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerModel_Swagger(), theEcorePackage.getEString(), "swagger", "2.0", 0, 1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_Info(), this.getSwaggerInfo(), null, "info", null, 0, 1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerModel_Host(), theEcorePackage.getEString(), "host", null, 0, 1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerModel_BasePath(), theEcorePackage.getEString(), "basePath", null, 0, 1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_Tags(), this.getSwaggerTag(), null, "tags", null, 0, -1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerModel_Schemes(), theEcorePackage.getEString(), "schemes", null, 0, -1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_Paths(), this.getSwaggerPath(), null, "paths", null, 0, -1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_Definitions(), this.getSwaggerNamedObjectType(), null, "definitions", null, 0, -1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_ExternalDocs(), this.getSwaggerExternalDocumentation(), null, "externalDocs", null, 0, 1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerModel_SecurityDefinitions(), this.getSwaggerSecurityDefinition(), null, "securityDefinitions", null, 0, -1, SwaggerModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerInfoEClass, SwaggerInfo.class, "SwaggerInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerInfo_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerInfo_Version(), theEcorePackage.getEString(), "version", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerInfo_Title(), theEcorePackage.getEString(), "title", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerInfo_TermsOfService(), theEcorePackage.getEString(), "termsOfService", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerInfo_Contact(), this.getSwaggerContact(), null, "contact", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerInfo_License(), this.getSwaggerLicense(), null, "license", null, 0, 1, SwaggerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerContactEClass, SwaggerContact.class, "SwaggerContact", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerContact_Email(), theEcorePackage.getEString(), "email", null, 0, 1, SwaggerContact.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerLicenseEClass, SwaggerLicense.class, "SwaggerLicense", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerLicense_Name(), theEcorePackage.getEString(), "name", null, 0, 1, SwaggerLicense.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerLicense_Url(), theEcorePackage.getEString(), "url", null, 0, 1, SwaggerLicense.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerTagEClass, SwaggerTag.class, "SwaggerTag", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerTag_Name(), theEcorePackage.getEString(), "name", null, 0, 1, SwaggerTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerTag_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerTag_ExternalDocs(), this.getSwaggerExternalDocumentation(), null, "externalDocs", null, 0, 1, SwaggerTag.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerExternalDocumentationEClass, SwaggerExternalDocumentation.class, "SwaggerExternalDocumentation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerExternalDocumentation_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerExternalDocumentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerExternalDocumentation_Url(), theEcorePackage.getEString(), "url", null, 0, 1, SwaggerExternalDocumentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerPathEClass, SwaggerPath.class, "SwaggerPath", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSwaggerPath_Methods(), this.getSwaggerOperation(), null, "methods", null, 0, -1, SwaggerPath.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerOperationEClass, SwaggerOperation.class, "SwaggerOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerOperation_Tags(), theEcorePackage.getEString(), "tags", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_Summary(), theEcorePackage.getEString(), "summary", null, 0, 1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_OperationId(), theEcorePackage.getEString(), "operationId", null, 0, 1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_Consumes(), theEcorePackage.getEString(), "consumes", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_Produces(), theEcorePackage.getEString(), "produces", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerOperation_Parameters(), this.getSwaggerParameter(), null, "parameters", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerOperation_Responses(), this.getSwaggerResponse(), null, "responses", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerOperation_Security(), this.getSwaggerSecurityObject(), null, "security", null, 0, -1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerOperation_Deprecated(), theEcorePackage.getEBoolean(), "deprecated", "false", 0, 1, SwaggerOperation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerParameterEClass, SwaggerParameter.class, "SwaggerParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerParameter_In(), this.getSwaggerParameterType(), "in", null, 0, 1, SwaggerParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerParameter_Type(), this.getSwaggerObjectType(), null, "type", null, 0, 1, SwaggerParameter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerResponseEClass, SwaggerResponse.class, "SwaggerResponse", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerResponse_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerResponse_Schema(), this.getSwaggerObjectType(), null, "schema", null, 0, 1, SwaggerResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerResponse_Headers(), this.getSwaggerSimpleObjectType(), null, "headers", null, 0, -1, SwaggerResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerSecurityObjectEClass, SwaggerSecurityObject.class, "SwaggerSecurityObject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSwaggerSecurityObject_List(), this.getSwaggerSecurity(), null, "list", null, 0, -1, SwaggerSecurityObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerSecurityEClass, SwaggerSecurity.class, "SwaggerSecurity", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerSecurity_Roles(), theEcorePackage.getEString(), "roles", null, 0, -1, SwaggerSecurity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerSecurityDefinitionEClass, SwaggerSecurityDefinition.class, "SwaggerSecurityDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerSecurityDefinition_Type(), theEcorePackage.getEString(), "type", null, 0, 1, SwaggerSecurityDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSecurityDefinition_AuthorizationUrl(), theEcorePackage.getEString(), "authorizationUrl", null, 0, 1, SwaggerSecurityDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSecurityDefinition_Flow(), theEcorePackage.getEString(), "flow", null, 0, 1, SwaggerSecurityDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSecurityDefinition_In(), this.getSwaggerParameterType(), "in", null, 0, 1, SwaggerSecurityDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerSecurityDefinitionScopeEClass, SwaggerSecurityDefinitionScope.class, "SwaggerSecurityDefinitionScope", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerSecurityDefinitionScope_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerSecurityDefinitionScope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerObjectTypeEClass, SwaggerObjectType.class, "SwaggerObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerObjectType_Many(), theEcorePackage.getEBoolean(), "many", "false", 0, 1, SwaggerObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerReferenceObjectTypeEClass, SwaggerReferenceObjectType.class, "SwaggerReferenceObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerReferenceObjectType_Required(), theEcorePackage.getEBoolean(), "required", null, 0, 1, SwaggerReferenceObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerReferenceObjectType_Reference(), this.getSwaggerObjectType(), null, "reference", null, 0, 1, SwaggerReferenceObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerNamedObjectTypeEClass, SwaggerNamedObjectType.class, "SwaggerNamedObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerNamedObjectType_Type(), theEcorePackage.getEString(), "type", null, 0, 1, SwaggerNamedObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerNamedObjectType_Default(), theEcorePackage.getEString(), "default", null, 0, 1, SwaggerNamedObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerNamedObjectType_Description(), theEcorePackage.getEString(), "description", null, 0, 1, SwaggerNamedObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerNamedObjectType_Xml(), this.getSwaggerXml(), null, "xml", null, 0, 1, SwaggerNamedObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerObjectClassDefinitionEClass, SwaggerObjectClassDefinition.class, "SwaggerObjectClassDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerObjectClassDefinition_Required(), theEcorePackage.getEString(), "required", null, 0, -1, SwaggerObjectClassDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerObjectClassDefinition_AllOf(), this.getSwaggerObjectType(), null, "allOf", null, 0, -1, SwaggerObjectClassDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerObjectClassDefinition_Properties(), this.getSwaggerNamedObjectType(), null, "properties", null, 0, -1, SwaggerObjectClassDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSwaggerObjectClassDefinition_AdditionalProperties(), this.getSwaggerObjectType(), null, "additionalProperties", null, 0, 1, SwaggerObjectClassDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerSimpleObjectTypeEClass, SwaggerSimpleObjectType.class, "SwaggerSimpleObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerSimpleObjectType_Required(), theEcorePackage.getEBoolean(), "required", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_Format(), theEcorePackage.getEString(), "format", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_Minimum(), theEcorePackage.getEString(), "minimum", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_Maximum(), theEcorePackage.getEString(), "maximum", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_Pattern(), theEcorePackage.getEString(), "pattern", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_Example(), theEcorePackage.getEString(), "example", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerSimpleObjectType_CollectionFormat(), this.getSwaggerCollectionFormat(), "collectionFormat", null, 0, 1, SwaggerSimpleObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerXmlEClass, SwaggerXml.class, "SwaggerXml", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerXml_Name(), theEcorePackage.getEString(), "name", null, 0, 1, SwaggerXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSwaggerXml_Wrapped(), theEcorePackage.getEBoolean(), "wrapped", "false", 0, 1, SwaggerXml.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(swaggerEnumObjectTypeEClass, SwaggerEnumObjectType.class, "SwaggerEnumObjectType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSwaggerEnumObjectType_Enum(), theEcorePackage.getEString(), "enum", null, 0, -1, SwaggerEnumObjectType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(swaggerParameterTypeEEnum, SwaggerParameterType.class, "SwaggerParameterType"); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.PATH); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.QUERY); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.HEADER); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.BODY); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.FORM); + addEEnumLiteral(swaggerParameterTypeEEnum, SwaggerParameterType.FORM_DATA); + + initEEnum(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.class, "SwaggerCollectionFormat"); + addEEnumLiteral(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.CSV); + addEEnumLiteral(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.SSV); + addEEnumLiteral(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.TSV); + addEEnumLiteral(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.PIPES); + addEEnumLiteral(swaggerCollectionFormatEEnum, SwaggerCollectionFormat.MULTI); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org/ncomp/swagger + createSwaggerAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "swagger", "http://openecomp.org/ncomp/swagger" + }); + } + + /** + * Initializes the annotations for http://openecomp.org/ncomp/swagger. + * + * + * @generated + */ + protected void createSwaggerAnnotations() { + String source = "http://openecomp.org/ncomp/swagger"; + addAnnotation + (getSwaggerReferenceObjectType_Required(), + source, + new String[] { + "name", "$ref" + }); + } + +} //SwaggerPackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerParameterImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerParameterImpl.java new file mode 100644 index 0000000..07933d6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerParameterImpl.java @@ -0,0 +1,263 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Parameter'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl#getIn In}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerParameterImpl#getType Type}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerParameterImpl extends NamedEntityImpl implements SwaggerParameter { + /** + * The default value of the '{@link #getIn() In}' attribute. + * + * + * @see #getIn() + * @generated + * @ordered + */ + protected static final SwaggerParameterType IN_EDEFAULT = SwaggerParameterType.PATH; + + /** + * The cached value of the '{@link #getIn() In}' attribute. + * + * + * @see #getIn() + * @generated + * @ordered + */ + protected SwaggerParameterType in = IN_EDEFAULT; + + /** + * The cached value of the '{@link #getType() Type}' containment reference. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected SwaggerObjectType type; + + /** + * + * + * @generated + */ + protected SwaggerParameterImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_PARAMETER; + } + + /** + * + * + * @generated + */ + public SwaggerParameterType getIn() { + return in; + } + + /** + * + * + * @generated + */ + public void setIn(SwaggerParameterType newIn) { + SwaggerParameterType oldIn = in; + in = newIn == null ? IN_EDEFAULT : newIn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_PARAMETER__IN, oldIn, in)); + } + + /** + * + * + * @generated + */ + public SwaggerObjectType getType() { + return type; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetType(SwaggerObjectType newType, NotificationChain msgs) { + SwaggerObjectType oldType = type; + type = newType; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_PARAMETER__TYPE, oldType, newType); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setType(SwaggerObjectType newType) { + if (newType != type) { + NotificationChain msgs = null; + if (type != null) + msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_PARAMETER__TYPE, null, msgs); + if (newType != null) + msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_PARAMETER__TYPE, null, msgs); + msgs = basicSetType(newType, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_PARAMETER__TYPE, newType, newType)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PARAMETER__TYPE: + return basicSetType(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PARAMETER__IN: + return getIn(); + case SwaggerPackage.SWAGGER_PARAMETER__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PARAMETER__IN: + setIn((SwaggerParameterType)newValue); + return; + case SwaggerPackage.SWAGGER_PARAMETER__TYPE: + setType((SwaggerObjectType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PARAMETER__IN: + setIn(IN_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_PARAMETER__TYPE: + setType((SwaggerObjectType)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PARAMETER__IN: + return in != IN_EDEFAULT; + case SwaggerPackage.SWAGGER_PARAMETER__TYPE: + return type != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (in: "); + result.append(in); + result.append(')'); + return result.toString(); + } + +} //SwaggerParameterImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPathImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPathImpl.java new file mode 100644 index 0000000..fce7016 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerPathImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Path'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerPathImpl#getMethods Methods}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerPathImpl extends NamedEntityImpl implements SwaggerPath { + /** + * The cached value of the '{@link #getMethods() Methods}' containment reference list. + * + * + * @see #getMethods() + * @generated + * @ordered + */ + protected EList methods; + + /** + * + * + * @generated + */ + protected SwaggerPathImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_PATH; + } + + /** + * + * + * @generated + */ + public EList getMethods() { + if (methods == null) { + methods = new EObjectContainmentEList(SwaggerOperation.class, this, SwaggerPackage.SWAGGER_PATH__METHODS); + } + return methods; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PATH__METHODS: + return ((InternalEList)getMethods()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PATH__METHODS: + return getMethods(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PATH__METHODS: + getMethods().clear(); + getMethods().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PATH__METHODS: + getMethods().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_PATH__METHODS: + return methods != null && !methods.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //SwaggerPathImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerReferenceObjectTypeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerReferenceObjectTypeImpl.java new file mode 100644 index 0000000..afe3621 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerReferenceObjectTypeImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Reference Object Type'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl#isRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerReferenceObjectTypeImpl#getReference Reference}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerReferenceObjectTypeImpl extends SwaggerNamedObjectTypeImpl implements SwaggerReferenceObjectType { + /** + * The default value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected static final boolean REQUIRED_EDEFAULT = false; + /** + * The cached value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected boolean required = REQUIRED_EDEFAULT; + /** + * The cached value of the '{@link #getReference() Reference}' reference. + * + * + * @see #getReference() + * @generated + * @ordered + */ + protected SwaggerObjectType reference; + + /** + * + * + * @generated + */ + protected SwaggerReferenceObjectTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_REFERENCE_OBJECT_TYPE; + } + + /** + * + * + * @generated + */ + public boolean isRequired() { + return required; + } + + /** + * + * + * @generated + */ + public void setRequired(boolean newRequired) { + boolean oldRequired = required; + required = newRequired; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED, oldRequired, required)); + } + + /** + * + * + * @generated + */ + public SwaggerObjectType getReference() { + if (reference != null && reference.eIsProxy()) { + InternalEObject oldReference = (InternalEObject)reference; + reference = (SwaggerObjectType)eResolveProxy(oldReference); + if (reference != oldReference) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE, oldReference, reference)); + } + } + return reference; + } + + /** + * + * + * @generated + */ + public SwaggerObjectType basicGetReference() { + return reference; + } + + /** + * + * + * @generated + */ + public void setReference(SwaggerObjectType newReference) { + SwaggerObjectType oldReference = reference; + reference = newReference; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE, oldReference, reference)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED: + return isRequired(); + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE: + if (resolve) return getReference(); + return basicGetReference(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED: + setRequired((Boolean)newValue); + return; + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE: + setReference((SwaggerObjectType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED: + setRequired(REQUIRED_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE: + setReference((SwaggerObjectType)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REQUIRED: + return required != REQUIRED_EDEFAULT; + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE__REFERENCE: + return reference != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (required: "); + result.append(required); + result.append(')'); + return result.toString(); + } + +} //SwaggerReferenceObjectTypeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerResponseImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerResponseImpl.java new file mode 100644 index 0000000..4bf31e4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerResponseImpl.java @@ -0,0 +1,304 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType; +import java.util.Collection; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Response'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl#getSchema Schema}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerResponseImpl#getHeaders Headers}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerResponseImpl extends NamedEntityImpl implements SwaggerResponse { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getSchema() Schema}' containment reference. + * + * + * @see #getSchema() + * @generated + * @ordered + */ + protected SwaggerObjectType schema; + + /** + * The cached value of the '{@link #getHeaders() Headers}' containment reference list. + * + * + * @see #getHeaders() + * @generated + * @ordered + */ + protected EList headers; + + /** + * + * + * @generated + */ + protected SwaggerResponseImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_RESPONSE; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_RESPONSE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public SwaggerObjectType getSchema() { + return schema; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSchema(SwaggerObjectType newSchema, NotificationChain msgs) { + SwaggerObjectType oldSchema = schema; + schema = newSchema; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_RESPONSE__SCHEMA, oldSchema, newSchema); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSchema(SwaggerObjectType newSchema) { + if (newSchema != schema) { + NotificationChain msgs = null; + if (schema != null) + msgs = ((InternalEObject)schema).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_RESPONSE__SCHEMA, null, msgs); + if (newSchema != null) + msgs = ((InternalEObject)newSchema).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_RESPONSE__SCHEMA, null, msgs); + msgs = basicSetSchema(newSchema, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_RESPONSE__SCHEMA, newSchema, newSchema)); + } + + /** + * + * + * @generated + */ + public EList getHeaders() { + if (headers == null) { + headers = new EObjectContainmentEList(SwaggerSimpleObjectType.class, this, SwaggerPackage.SWAGGER_RESPONSE__HEADERS); + } + return headers; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_RESPONSE__SCHEMA: + return basicSetSchema(null, msgs); + case SwaggerPackage.SWAGGER_RESPONSE__HEADERS: + return ((InternalEList)getHeaders()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_RESPONSE__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_RESPONSE__SCHEMA: + return getSchema(); + case SwaggerPackage.SWAGGER_RESPONSE__HEADERS: + return getHeaders(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_RESPONSE__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_RESPONSE__SCHEMA: + setSchema((SwaggerObjectType)newValue); + return; + case SwaggerPackage.SWAGGER_RESPONSE__HEADERS: + getHeaders().clear(); + getHeaders().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_RESPONSE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_RESPONSE__SCHEMA: + setSchema((SwaggerObjectType)null); + return; + case SwaggerPackage.SWAGGER_RESPONSE__HEADERS: + getHeaders().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_RESPONSE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_RESPONSE__SCHEMA: + return schema != null; + case SwaggerPackage.SWAGGER_RESPONSE__HEADERS: + return headers != null && !headers.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //SwaggerResponseImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionImpl.java new file mode 100644 index 0000000..221d33f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionImpl.java @@ -0,0 +1,338 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Security Definition'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl#getType Type}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl#getAuthorizationUrl Authorization Url}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl#getFlow Flow}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionImpl#getIn In}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerSecurityDefinitionImpl extends NamedEntityImpl implements SwaggerSecurityDefinition { + /** + * The default value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected static final String TYPE_EDEFAULT = null; + /** + * The cached value of the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected String type = TYPE_EDEFAULT; + /** + * The default value of the '{@link #getAuthorizationUrl() Authorization Url}' attribute. + * + * + * @see #getAuthorizationUrl() + * @generated + * @ordered + */ + protected static final String AUTHORIZATION_URL_EDEFAULT = null; + /** + * The cached value of the '{@link #getAuthorizationUrl() Authorization Url}' attribute. + * + * + * @see #getAuthorizationUrl() + * @generated + * @ordered + */ + protected String authorizationUrl = AUTHORIZATION_URL_EDEFAULT; + /** + * The default value of the '{@link #getFlow() Flow}' attribute. + * + * + * @see #getFlow() + * @generated + * @ordered + */ + protected static final String FLOW_EDEFAULT = null; + /** + * The cached value of the '{@link #getFlow() Flow}' attribute. + * + * + * @see #getFlow() + * @generated + * @ordered + */ + protected String flow = FLOW_EDEFAULT; + /** + * The default value of the '{@link #getIn() In}' attribute. + * + * + * @see #getIn() + * @generated + * @ordered + */ + protected static final SwaggerParameterType IN_EDEFAULT = SwaggerParameterType.PATH; + /** + * The cached value of the '{@link #getIn() In}' attribute. + * + * + * @see #getIn() + * @generated + * @ordered + */ + protected SwaggerParameterType in = IN_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerSecurityDefinitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_SECURITY_DEFINITION; + } + + /** + * + * + * @generated + */ + public String getType() { + return type; + } + + /** + * + * + * @generated + */ + public void setType(String newType) { + String oldType = type; + type = newType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SECURITY_DEFINITION__TYPE, oldType, type)); + } + + /** + * + * + * @generated + */ + public String getAuthorizationUrl() { + return authorizationUrl; + } + + /** + * + * + * @generated + */ + public void setAuthorizationUrl(String newAuthorizationUrl) { + String oldAuthorizationUrl = authorizationUrl; + authorizationUrl = newAuthorizationUrl; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL, oldAuthorizationUrl, authorizationUrl)); + } + + /** + * + * + * @generated + */ + public String getFlow() { + return flow; + } + + /** + * + * + * @generated + */ + public void setFlow(String newFlow) { + String oldFlow = flow; + flow = newFlow; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SECURITY_DEFINITION__FLOW, oldFlow, flow)); + } + + /** + * + * + * @generated + */ + public SwaggerParameterType getIn() { + return in; + } + + /** + * + * + * @generated + */ + public void setIn(SwaggerParameterType newIn) { + SwaggerParameterType oldIn = in; + in = newIn == null ? IN_EDEFAULT : newIn; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SECURITY_DEFINITION__IN, oldIn, in)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__TYPE: + return getType(); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL: + return getAuthorizationUrl(); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__FLOW: + return getFlow(); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__IN: + return getIn(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__TYPE: + setType((String)newValue); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL: + setAuthorizationUrl((String)newValue); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__FLOW: + setFlow((String)newValue); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__IN: + setIn((SwaggerParameterType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__TYPE: + setType(TYPE_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL: + setAuthorizationUrl(AUTHORIZATION_URL_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__FLOW: + setFlow(FLOW_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__IN: + setIn(IN_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__TYPE: + return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__AUTHORIZATION_URL: + return AUTHORIZATION_URL_EDEFAULT == null ? authorizationUrl != null : !AUTHORIZATION_URL_EDEFAULT.equals(authorizationUrl); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__FLOW: + return FLOW_EDEFAULT == null ? flow != null : !FLOW_EDEFAULT.equals(flow); + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION__IN: + return in != IN_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (type: "); + result.append(type); + result.append(", authorizationUrl: "); + result.append(authorizationUrl); + result.append(", flow: "); + result.append(flow); + result.append(", in: "); + result.append(in); + result.append(')'); + return result.toString(); + } + +} //SwaggerSecurityDefinitionImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionScopeImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionScopeImpl.java new file mode 100644 index 0000000..80fa9e0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityDefinitionScopeImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Security Definition Scope'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityDefinitionScopeImpl#getDescription Description}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityImpl#getRoles Roles}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerSecurityImpl extends NamedEntityImpl implements SwaggerSecurity { + /** + * The cached value of the '{@link #getRoles() Roles}' attribute list. + * + * + * @see #getRoles() + * @generated + * @ordered + */ + protected EList roles; + + /** + * + * + * @generated + */ + protected SwaggerSecurityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_SECURITY; + } + + /** + * + * + * @generated + */ + public EList getRoles() { + if (roles == null) { + roles = new EDataTypeEList(String.class, this, SwaggerPackage.SWAGGER_SECURITY__ROLES); + } + return roles; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY__ROLES: + return getRoles(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY__ROLES: + getRoles().clear(); + getRoles().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY__ROLES: + getRoles().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SECURITY__ROLES: + return roles != null && !roles.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (roles: "); + result.append(roles); + result.append(')'); + return result.toString(); + } + +} //SwaggerSecurityImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityObjectImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityObjectImpl.java new file mode 100644 index 0000000..ed134d2 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerSecurityObjectImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Security Object'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSecurityObjectImpl#getList List}
  • + *
+ *

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#isRequired Required}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getFormat Format}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getMinimum Minimum}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getMaximum Maximum}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getPattern Pattern}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getExample Example}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerSimpleObjectTypeImpl#getCollectionFormat Collection Format}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerSimpleObjectTypeImpl extends SwaggerNamedObjectTypeImpl implements SwaggerSimpleObjectType { + /** + * The default value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected static final boolean REQUIRED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isRequired() Required}' attribute. + * + * + * @see #isRequired() + * @generated + * @ordered + */ + protected boolean required = REQUIRED_EDEFAULT; + + /** + * The default value of the '{@link #getFormat() Format}' attribute. + * + * + * @see #getFormat() + * @generated + * @ordered + */ + protected static final String FORMAT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFormat() Format}' attribute. + * + * + * @see #getFormat() + * @generated + * @ordered + */ + protected String format = FORMAT_EDEFAULT; + + /** + * The default value of the '{@link #getMinimum() Minimum}' attribute. + * + * + * @see #getMinimum() + * @generated + * @ordered + */ + protected static final String MINIMUM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMinimum() Minimum}' attribute. + * + * + * @see #getMinimum() + * @generated + * @ordered + */ + protected String minimum = MINIMUM_EDEFAULT; + + /** + * The default value of the '{@link #getMaximum() Maximum}' attribute. + * + * + * @see #getMaximum() + * @generated + * @ordered + */ + protected static final String MAXIMUM_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMaximum() Maximum}' attribute. + * + * + * @see #getMaximum() + * @generated + * @ordered + */ + protected String maximum = MAXIMUM_EDEFAULT; + + /** + * The default value of the '{@link #getPattern() Pattern}' attribute. + * + * + * @see #getPattern() + * @generated + * @ordered + */ + protected static final String PATTERN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPattern() Pattern}' attribute. + * + * + * @see #getPattern() + * @generated + * @ordered + */ + protected String pattern = PATTERN_EDEFAULT; + + /** + * The default value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected static final String EXAMPLE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getExample() Example}' attribute. + * + * + * @see #getExample() + * @generated + * @ordered + */ + protected String example = EXAMPLE_EDEFAULT; + + /** + * The default value of the '{@link #getCollectionFormat() Collection Format}' attribute. + * + * + * @see #getCollectionFormat() + * @generated + * @ordered + */ + protected static final SwaggerCollectionFormat COLLECTION_FORMAT_EDEFAULT = SwaggerCollectionFormat.CSV; + + /** + * The cached value of the '{@link #getCollectionFormat() Collection Format}' attribute. + * + * + * @see #getCollectionFormat() + * @generated + * @ordered + */ + protected SwaggerCollectionFormat collectionFormat = COLLECTION_FORMAT_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerSimpleObjectTypeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_SIMPLE_OBJECT_TYPE; + } + + /** + * + * + * @generated + */ + public boolean isRequired() { + return required; + } + + /** + * + * + * @generated + */ + public void setRequired(boolean newRequired) { + boolean oldRequired = required; + required = newRequired; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED, oldRequired, required)); + } + + /** + * + * + * @generated + */ + public String getFormat() { + return format; + } + + /** + * + * + * @generated + */ + public void setFormat(String newFormat) { + String oldFormat = format; + format = newFormat; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT, oldFormat, format)); + } + + /** + * + * + * @generated + */ + public String getMinimum() { + return minimum; + } + + /** + * + * + * @generated + */ + public void setMinimum(String newMinimum) { + String oldMinimum = minimum; + minimum = newMinimum; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM, oldMinimum, minimum)); + } + + /** + * + * + * @generated + */ + public String getMaximum() { + return maximum; + } + + /** + * + * + * @generated + */ + public void setMaximum(String newMaximum) { + String oldMaximum = maximum; + maximum = newMaximum; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM, oldMaximum, maximum)); + } + + /** + * + * + * @generated + */ + public String getPattern() { + return pattern; + } + + /** + * + * + * @generated + */ + public void setPattern(String newPattern) { + String oldPattern = pattern; + pattern = newPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN, oldPattern, pattern)); + } + + /** + * + * + * @generated + */ + public String getExample() { + return example; + } + + /** + * + * + * @generated + */ + public void setExample(String newExample) { + String oldExample = example; + example = newExample; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE, oldExample, example)); + } + + /** + * + * + * @generated + */ + public SwaggerCollectionFormat getCollectionFormat() { + return collectionFormat; + } + + /** + * + * + * @generated + */ + public void setCollectionFormat(SwaggerCollectionFormat newCollectionFormat) { + SwaggerCollectionFormat oldCollectionFormat = collectionFormat; + collectionFormat = newCollectionFormat == null ? COLLECTION_FORMAT_EDEFAULT : newCollectionFormat; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT, oldCollectionFormat, collectionFormat)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED: + return isRequired(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT: + return getFormat(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM: + return getMinimum(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM: + return getMaximum(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN: + return getPattern(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE: + return getExample(); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT: + return getCollectionFormat(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED: + setRequired((Boolean)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT: + setFormat((String)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM: + setMinimum((String)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM: + setMaximum((String)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN: + setPattern((String)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE: + setExample((String)newValue); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT: + setCollectionFormat((SwaggerCollectionFormat)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED: + setRequired(REQUIRED_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT: + setFormat(FORMAT_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM: + setMinimum(MINIMUM_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM: + setMaximum(MAXIMUM_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN: + setPattern(PATTERN_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE: + setExample(EXAMPLE_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT: + setCollectionFormat(COLLECTION_FORMAT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__REQUIRED: + return required != REQUIRED_EDEFAULT; + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__FORMAT: + return FORMAT_EDEFAULT == null ? format != null : !FORMAT_EDEFAULT.equals(format); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MINIMUM: + return MINIMUM_EDEFAULT == null ? minimum != null : !MINIMUM_EDEFAULT.equals(minimum); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__MAXIMUM: + return MAXIMUM_EDEFAULT == null ? maximum != null : !MAXIMUM_EDEFAULT.equals(maximum); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__PATTERN: + return PATTERN_EDEFAULT == null ? pattern != null : !PATTERN_EDEFAULT.equals(pattern); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__EXAMPLE: + return EXAMPLE_EDEFAULT == null ? example != null : !EXAMPLE_EDEFAULT.equals(example); + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE__COLLECTION_FORMAT: + return collectionFormat != COLLECTION_FORMAT_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (required: "); + result.append(required); + result.append(", format: "); + result.append(format); + result.append(", minimum: "); + result.append(minimum); + result.append(", maximum: "); + result.append(maximum); + result.append(", pattern: "); + result.append(pattern); + result.append(", example: "); + result.append(example); + result.append(", collectionFormat: "); + result.append(collectionFormat); + result.append(')'); + return result.toString(); + } + +} //SwaggerSimpleObjectTypeImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerTagImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerTagImpl.java new file mode 100644 index 0000000..a7035c9 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerTagImpl.java @@ -0,0 +1,319 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag; + +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; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Tag'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerTagImpl#getExternalDocs External Docs}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerTagImpl extends MinimalEObjectImpl.Container implements SwaggerTag { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The cached value of the '{@link #getExternalDocs() External Docs}' containment reference. + * + * + * @see #getExternalDocs() + * @generated + * @ordered + */ + protected SwaggerExternalDocumentation externalDocs; + + /** + * + * + * @generated + */ + protected SwaggerTagImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_TAG; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_TAG__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_TAG__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public SwaggerExternalDocumentation getExternalDocs() { + return externalDocs; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetExternalDocs(SwaggerExternalDocumentation newExternalDocs, NotificationChain msgs) { + SwaggerExternalDocumentation oldExternalDocs = externalDocs; + externalDocs = newExternalDocs; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS, oldExternalDocs, newExternalDocs); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setExternalDocs(SwaggerExternalDocumentation newExternalDocs) { + if (newExternalDocs != externalDocs) { + NotificationChain msgs = null; + if (externalDocs != null) + msgs = ((InternalEObject)externalDocs).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS, null, msgs); + if (newExternalDocs != null) + msgs = ((InternalEObject)newExternalDocs).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS, null, msgs); + msgs = basicSetExternalDocs(newExternalDocs, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS, newExternalDocs, newExternalDocs)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS: + return basicSetExternalDocs(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_TAG__NAME: + return getName(); + case SwaggerPackage.SWAGGER_TAG__DESCRIPTION: + return getDescription(); + case SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS: + return getExternalDocs(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_TAG__NAME: + setName((String)newValue); + return; + case SwaggerPackage.SWAGGER_TAG__DESCRIPTION: + setDescription((String)newValue); + return; + case SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS: + setExternalDocs((SwaggerExternalDocumentation)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_TAG__NAME: + setName(NAME_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_TAG__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS: + setExternalDocs((SwaggerExternalDocumentation)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_TAG__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case SwaggerPackage.SWAGGER_TAG__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case SwaggerPackage.SWAGGER_TAG__EXTERNAL_DOCS: + return externalDocs != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} //SwaggerTagImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerXmlImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerXmlImpl.java new file mode 100644 index 0000000..b9cb7f3 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/impl/SwaggerXmlImpl.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.sirius.manager.swagger.impl; + +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Xml'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.swagger.impl.SwaggerXmlImpl#isWrapped Wrapped}
  • + *
+ *

+ * + * @generated + */ +public class SwaggerXmlImpl extends MinimalEObjectImpl.Container implements SwaggerXml { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #isWrapped() Wrapped}' attribute. + * + * + * @see #isWrapped() + * @generated + * @ordered + */ + protected static final boolean WRAPPED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isWrapped() Wrapped}' attribute. + * + * + * @see #isWrapped() + * @generated + * @ordered + */ + protected boolean wrapped = WRAPPED_EDEFAULT; + + /** + * + * + * @generated + */ + protected SwaggerXmlImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return SwaggerPackage.Literals.SWAGGER_XML; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_XML__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public boolean isWrapped() { + return wrapped; + } + + /** + * + * + * @generated + */ + public void setWrapped(boolean newWrapped) { + boolean oldWrapped = wrapped; + wrapped = newWrapped; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SwaggerPackage.SWAGGER_XML__WRAPPED, oldWrapped, wrapped)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case SwaggerPackage.SWAGGER_XML__NAME: + return getName(); + case SwaggerPackage.SWAGGER_XML__WRAPPED: + return isWrapped(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case SwaggerPackage.SWAGGER_XML__NAME: + setName((String)newValue); + return; + case SwaggerPackage.SWAGGER_XML__WRAPPED: + setWrapped((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_XML__NAME: + setName(NAME_EDEFAULT); + return; + case SwaggerPackage.SWAGGER_XML__WRAPPED: + setWrapped(WRAPPED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case SwaggerPackage.SWAGGER_XML__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case SwaggerPackage.SWAGGER_XML__WRAPPED: + return wrapped != WRAPPED_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", wrapped: "); + result.append(wrapped); + result.append(')'); + return result.toString(); + } + +} //SwaggerXmlImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerAdapterFactory.java new file mode 100644 index 0000000..24d9c8b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerAdapterFactory.java @@ -0,0 +1,521 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.swagger.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage + * @generated + */ +public class SwaggerAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static SwaggerPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public SwaggerAdapterFactory() { + if (modelPackage == null) { + modelPackage = SwaggerPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected SwaggerSwitch modelSwitch = + new SwaggerSwitch() { + @Override + public Adapter caseSwaggerModel(SwaggerModel object) { + return createSwaggerModelAdapter(); + } + @Override + public Adapter caseSwaggerInfo(SwaggerInfo object) { + return createSwaggerInfoAdapter(); + } + @Override + public Adapter caseSwaggerContact(SwaggerContact object) { + return createSwaggerContactAdapter(); + } + @Override + public Adapter caseSwaggerLicense(SwaggerLicense object) { + return createSwaggerLicenseAdapter(); + } + @Override + public Adapter caseSwaggerTag(SwaggerTag object) { + return createSwaggerTagAdapter(); + } + @Override + public Adapter caseSwaggerExternalDocumentation(SwaggerExternalDocumentation object) { + return createSwaggerExternalDocumentationAdapter(); + } + @Override + public Adapter caseSwaggerPath(SwaggerPath object) { + return createSwaggerPathAdapter(); + } + @Override + public Adapter caseSwaggerOperation(SwaggerOperation object) { + return createSwaggerOperationAdapter(); + } + @Override + public Adapter caseSwaggerParameter(SwaggerParameter object) { + return createSwaggerParameterAdapter(); + } + @Override + public Adapter caseSwaggerResponse(SwaggerResponse object) { + return createSwaggerResponseAdapter(); + } + @Override + public Adapter caseSwaggerSecurityObject(SwaggerSecurityObject object) { + return createSwaggerSecurityObjectAdapter(); + } + @Override + public Adapter caseSwaggerSecurity(SwaggerSecurity object) { + return createSwaggerSecurityAdapter(); + } + @Override + public Adapter caseSwaggerSecurityDefinition(SwaggerSecurityDefinition object) { + return createSwaggerSecurityDefinitionAdapter(); + } + @Override + public Adapter caseSwaggerSecurityDefinitionScope(SwaggerSecurityDefinitionScope object) { + return createSwaggerSecurityDefinitionScopeAdapter(); + } + @Override + public Adapter caseSwaggerObjectType(SwaggerObjectType object) { + return createSwaggerObjectTypeAdapter(); + } + @Override + public Adapter caseSwaggerReferenceObjectType(SwaggerReferenceObjectType object) { + return createSwaggerReferenceObjectTypeAdapter(); + } + @Override + public Adapter caseSwaggerNamedObjectType(SwaggerNamedObjectType object) { + return createSwaggerNamedObjectTypeAdapter(); + } + @Override + public Adapter caseSwaggerObjectClassDefinition(SwaggerObjectClassDefinition object) { + return createSwaggerObjectClassDefinitionAdapter(); + } + @Override + public Adapter caseSwaggerSimpleObjectType(SwaggerSimpleObjectType object) { + return createSwaggerSimpleObjectTypeAdapter(); + } + @Override + public Adapter caseSwaggerXml(SwaggerXml object) { + return createSwaggerXmlAdapter(); + } + @Override + public Adapter caseSwaggerEnumObjectType(SwaggerEnumObjectType object) { + return createSwaggerEnumObjectTypeAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel + * @generated + */ + public Adapter createSwaggerModelAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo Info}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerInfo + * @generated + */ + public Adapter createSwaggerInfoAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact Contact}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerContact + * @generated + */ + public Adapter createSwaggerContactAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense License}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerLicense + * @generated + */ + public Adapter createSwaggerLicenseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag Tag}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag + * @generated + */ + public Adapter createSwaggerTagAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation External Documentation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerExternalDocumentation + * @generated + */ + public Adapter createSwaggerExternalDocumentationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath Path}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath + * @generated + */ + public Adapter createSwaggerPathAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation Operation}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation + * @generated + */ + public Adapter createSwaggerOperationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter Parameter}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter + * @generated + */ + public Adapter createSwaggerParameterAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse Response}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerResponse + * @generated + */ + public Adapter createSwaggerResponseAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject Security Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityObject + * @generated + */ + public Adapter createSwaggerSecurityObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity Security}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurity + * @generated + */ + public Adapter createSwaggerSecurityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition Security Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinition + * @generated + */ + public Adapter createSwaggerSecurityDefinitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope Security Definition Scope}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSecurityDefinitionScope + * @generated + */ + public Adapter createSwaggerSecurityDefinitionScopeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType Object Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType + * @generated + */ + public Adapter createSwaggerObjectTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType Reference Object Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType + * @generated + */ + public Adapter createSwaggerReferenceObjectTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType Named Object Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType + * @generated + */ + public Adapter createSwaggerNamedObjectTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition Object Class Definition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition + * @generated + */ + public Adapter createSwaggerObjectClassDefinitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType Simple Object Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType + * @generated + */ + public Adapter createSwaggerSimpleObjectTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml Xml}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerXml + * @generated + */ + public Adapter createSwaggerXmlAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType Enum Object Type}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType + * @generated + */ + public Adapter createSwaggerEnumObjectTypeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //SwaggerAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerSwitch.java new file mode 100644 index 0000000..dc3e38b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/swagger/util/SwaggerSwitch.java @@ -0,0 +1,590 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.swagger.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.swagger.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.swagger.SwaggerPackage + * @generated + */ +public class SwaggerSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static SwaggerPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public SwaggerSwitch() { + if (modelPackage == null) { + modelPackage = SwaggerPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case SwaggerPackage.SWAGGER_MODEL: { + SwaggerModel swaggerModel = (SwaggerModel)theEObject; + T result = caseSwaggerModel(swaggerModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_INFO: { + SwaggerInfo swaggerInfo = (SwaggerInfo)theEObject; + T result = caseSwaggerInfo(swaggerInfo); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_CONTACT: { + SwaggerContact swaggerContact = (SwaggerContact)theEObject; + T result = caseSwaggerContact(swaggerContact); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_LICENSE: { + SwaggerLicense swaggerLicense = (SwaggerLicense)theEObject; + T result = caseSwaggerLicense(swaggerLicense); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_TAG: { + SwaggerTag swaggerTag = (SwaggerTag)theEObject; + T result = caseSwaggerTag(swaggerTag); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_EXTERNAL_DOCUMENTATION: { + SwaggerExternalDocumentation swaggerExternalDocumentation = (SwaggerExternalDocumentation)theEObject; + T result = caseSwaggerExternalDocumentation(swaggerExternalDocumentation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_PATH: { + SwaggerPath swaggerPath = (SwaggerPath)theEObject; + T result = caseSwaggerPath(swaggerPath); + if (result == null) result = caseNamedEntity(swaggerPath); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_OPERATION: { + SwaggerOperation swaggerOperation = (SwaggerOperation)theEObject; + T result = caseSwaggerOperation(swaggerOperation); + if (result == null) result = caseNamedEntity(swaggerOperation); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_PARAMETER: { + SwaggerParameter swaggerParameter = (SwaggerParameter)theEObject; + T result = caseSwaggerParameter(swaggerParameter); + if (result == null) result = caseNamedEntity(swaggerParameter); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_RESPONSE: { + SwaggerResponse swaggerResponse = (SwaggerResponse)theEObject; + T result = caseSwaggerResponse(swaggerResponse); + if (result == null) result = caseNamedEntity(swaggerResponse); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_SECURITY_OBJECT: { + SwaggerSecurityObject swaggerSecurityObject = (SwaggerSecurityObject)theEObject; + T result = caseSwaggerSecurityObject(swaggerSecurityObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_SECURITY: { + SwaggerSecurity swaggerSecurity = (SwaggerSecurity)theEObject; + T result = caseSwaggerSecurity(swaggerSecurity); + if (result == null) result = caseNamedEntity(swaggerSecurity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION: { + SwaggerSecurityDefinition swaggerSecurityDefinition = (SwaggerSecurityDefinition)theEObject; + T result = caseSwaggerSecurityDefinition(swaggerSecurityDefinition); + if (result == null) result = caseNamedEntity(swaggerSecurityDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_SECURITY_DEFINITION_SCOPE: { + SwaggerSecurityDefinitionScope swaggerSecurityDefinitionScope = (SwaggerSecurityDefinitionScope)theEObject; + T result = caseSwaggerSecurityDefinitionScope(swaggerSecurityDefinitionScope); + if (result == null) result = caseNamedEntity(swaggerSecurityDefinitionScope); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_OBJECT_TYPE: { + SwaggerObjectType swaggerObjectType = (SwaggerObjectType)theEObject; + T result = caseSwaggerObjectType(swaggerObjectType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_REFERENCE_OBJECT_TYPE: { + SwaggerReferenceObjectType swaggerReferenceObjectType = (SwaggerReferenceObjectType)theEObject; + T result = caseSwaggerReferenceObjectType(swaggerReferenceObjectType); + if (result == null) result = caseSwaggerNamedObjectType(swaggerReferenceObjectType); + if (result == null) result = caseNamedEntity(swaggerReferenceObjectType); + if (result == null) result = caseSwaggerObjectType(swaggerReferenceObjectType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_NAMED_OBJECT_TYPE: { + SwaggerNamedObjectType swaggerNamedObjectType = (SwaggerNamedObjectType)theEObject; + T result = caseSwaggerNamedObjectType(swaggerNamedObjectType); + if (result == null) result = caseNamedEntity(swaggerNamedObjectType); + if (result == null) result = caseSwaggerObjectType(swaggerNamedObjectType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_OBJECT_CLASS_DEFINITION: { + SwaggerObjectClassDefinition swaggerObjectClassDefinition = (SwaggerObjectClassDefinition)theEObject; + T result = caseSwaggerObjectClassDefinition(swaggerObjectClassDefinition); + if (result == null) result = caseSwaggerNamedObjectType(swaggerObjectClassDefinition); + if (result == null) result = caseNamedEntity(swaggerObjectClassDefinition); + if (result == null) result = caseSwaggerObjectType(swaggerObjectClassDefinition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_SIMPLE_OBJECT_TYPE: { + SwaggerSimpleObjectType swaggerSimpleObjectType = (SwaggerSimpleObjectType)theEObject; + T result = caseSwaggerSimpleObjectType(swaggerSimpleObjectType); + if (result == null) result = caseSwaggerNamedObjectType(swaggerSimpleObjectType); + if (result == null) result = caseNamedEntity(swaggerSimpleObjectType); + if (result == null) result = caseSwaggerObjectType(swaggerSimpleObjectType); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_XML: { + SwaggerXml swaggerXml = (SwaggerXml)theEObject; + T result = caseSwaggerXml(swaggerXml); + if (result == null) result = defaultCase(theEObject); + return result; + } + case SwaggerPackage.SWAGGER_ENUM_OBJECT_TYPE: { + SwaggerEnumObjectType swaggerEnumObjectType = (SwaggerEnumObjectType)theEObject; + T result = caseSwaggerEnumObjectType(swaggerEnumObjectType); + if (result == null) result = caseSwaggerSimpleObjectType(swaggerEnumObjectType); + if (result == null) result = caseSwaggerNamedObjectType(swaggerEnumObjectType); + if (result == null) result = caseNamedEntity(swaggerEnumObjectType); + if (result == null) result = caseSwaggerObjectType(swaggerEnumObjectType); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerModel(SwaggerModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Info'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Info'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerInfo(SwaggerInfo object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Contact'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Contact'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerContact(SwaggerContact object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'License'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'License'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerLicense(SwaggerLicense object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Tag'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Tag'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerTag(SwaggerTag object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'External Documentation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'External Documentation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerExternalDocumentation(SwaggerExternalDocumentation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Path'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Path'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerPath(SwaggerPath object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Operation'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Operation'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerOperation(SwaggerOperation object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Parameter'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Parameter'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerParameter(SwaggerParameter object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Response'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Response'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerResponse(SwaggerResponse object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Security Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Security Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerSecurityObject(SwaggerSecurityObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Security'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Security'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerSecurity(SwaggerSecurity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Security Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Security Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerSecurityDefinition(SwaggerSecurityDefinition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Security Definition Scope'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Security Definition Scope'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerSecurityDefinitionScope(SwaggerSecurityDefinitionScope object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Object Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Object Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerObjectType(SwaggerObjectType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Reference Object Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Reference Object Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerReferenceObjectType(SwaggerReferenceObjectType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Object Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Object Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerNamedObjectType(SwaggerNamedObjectType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Object Class Definition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Object Class Definition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerObjectClassDefinition(SwaggerObjectClassDefinition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Simple Object Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Simple Object Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerSimpleObjectType(SwaggerSimpleObjectType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Xml'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Xml'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerXml(SwaggerXml object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Enum Object Type'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Enum Object Type'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSwaggerEnumObjectType(SwaggerEnumObjectType object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //SwaggerSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/AbstractTableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/AbstractTableTemplate.java new file mode 100644 index 0000000..f0f634b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/AbstractTableTemplate.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.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Abstract Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTreePath Tree Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTablePath Table Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getAbstractTableTemplate() + * @model abstract="true" + * @generated + */ +public interface AbstractTableTemplate extends NamedEntity { + /** + * Returns the value of the 'Tree Path' attribute. + * + *

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

+ * + * @return the value of the 'Tree Path' attribute. + * @see #setTreePath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getAbstractTableTemplate_TreePath() + * @model unique="false" + * @generated + */ + String getTreePath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTreePath Tree Path}' attribute. + * + * + * @param value the new value of the 'Tree Path' attribute. + * @see #getTreePath() + * @generated + */ + void setTreePath(String value); + + /** + * Returns the value of the 'Table Path' attribute. + * + *

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

+ * + * @return the value of the 'Table Path' attribute. + * @see #setTablePath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getAbstractTableTemplate_TablePath() + * @model unique="false" + * @generated + */ + String getTablePath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTablePath Table Path}' attribute. + * + * + * @param value the new value of the 'Table Path' attribute. + * @see #getTablePath() + * @generated + */ + void setTablePath(String value); + +} // AbstractTableTemplate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/HasColumnsTableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/HasColumnsTableTemplate.java new file mode 100644 index 0000000..84a5d81 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/HasColumnsTableTemplate.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.sirius.manager.tableTemplate; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Has Columns Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate#getColumns Columns}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getHasColumnsTableTemplate() + * @model abstract="true" + * @generated + */ +public interface HasColumnsTableTemplate extends EObject { + /** + * Returns the value of the 'Columns' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn}. + * + *

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

+ * + * @return the value of the 'Columns' containment reference list. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getHasColumnsTableTemplate_Columns() + * @model containment="true" + * @generated + */ + EList getColumns(); + +} // HasColumnsTableTemplate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/IteratorTableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/IteratorTableTemplate.java new file mode 100644 index 0000000..4a78790 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/IteratorTableTemplate.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.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.function.Iterator; + +/** + * + * A representation of the model object 'Iterator Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate#getIterator Iterator}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getIteratorTableTemplate() + * @model + * @generated + */ +public interface IteratorTableTemplate extends AbstractTableTemplate, HasColumnsTableTemplate { + /** + * Returns the value of the 'Iterator' containment reference. + * + *

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

+ * + * @return the value of the 'Iterator' containment reference. + * @see #setIterator(Iterator) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getIteratorTableTemplate_Iterator() + * @model containment="true" + * @generated + */ + Iterator getIterator(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate#getIterator Iterator}' containment reference. + * + * + * @param value the new value of the 'Iterator' containment reference. + * @see #getIterator() + * @generated + */ + void setIterator(Iterator value); + +} // IteratorTableTemplate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/LogTableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/LogTableTemplate.java new file mode 100644 index 0000000..a458fde --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/LogTableTemplate.java @@ -0,0 +1,186 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogSeverity; + +/** + * + * A representation of the model object 'Log Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinLevel Min Level}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinSeverity Min Severity}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getPrefixResourcePath Prefix Resource Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getAggregationDuration Aggregation Duration}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate() + * @model + * @generated + */ +public interface LogTableTemplate extends AbstractTableTemplate { + /** + * Returns the value of the 'Min Level' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * + *

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

+ * + * @return the value of the 'Min Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #setMinLevel(LogLevel) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate_MinLevel() + * @model unique="false" + * @generated + */ + LogLevel getMinLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinLevel Min Level}' attribute. + * + * + * @param value the new value of the 'Min Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getMinLevel() + * @generated + */ + void setMinLevel(LogLevel value); + + /** + * Returns the value of the 'Min Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

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

+ * + * @return the value of the 'Min Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setMinSeverity(LogSeverity) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate_MinSeverity() + * @model unique="false" + * @generated + */ + LogSeverity getMinSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinSeverity Min Severity}' attribute. + * + * + * @param value the new value of the 'Min Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getMinSeverity() + * @generated + */ + void setMinSeverity(LogSeverity value); + + /** + * Returns the value of the 'Prefix Resource Path' attribute. + * + *

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

+ * + * @return the value of the 'Prefix Resource Path' attribute. + * @see #setPrefixResourcePath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate_PrefixResourcePath() + * @model unique="false" + * @generated + */ + String getPrefixResourcePath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getPrefixResourcePath Prefix Resource Path}' attribute. + * + * + * @param value the new value of the 'Prefix Resource Path' attribute. + * @see #getPrefixResourcePath() + * @generated + */ + void setPrefixResourcePath(String value); + + /** + * Returns the value of the 'Duration' attribute. + * + *

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

+ * + * @return the value of the 'Duration' attribute. + * @see #setDuration(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate_Duration() + * @model unique="false" + * @generated + */ + String getDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getDuration Duration}' attribute. + * + * + * @param value the new value of the 'Duration' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(String value); + + /** + * Returns the value of the 'Aggregation Duration' attribute. + * + *

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

+ * + * @return the value of the 'Aggregation Duration' attribute. + * @see #setAggregationDuration(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getLogTableTemplate_AggregationDuration() + * @model unique="false" + * @generated + */ + String getAggregationDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getAggregationDuration Aggregation Duration}' attribute. + * + * + * @param value the new value of the 'Aggregation Duration' attribute. + * @see #getAggregationDuration() + * @generated + */ + void setAggregationDuration(String value); + +} // LogTableTemplate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplate.java new file mode 100644 index 0000000..ff0d58c --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplate.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.sirius.manager.tableTemplate; + + +/** + * + * A representation of the model object 'Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate#getRowPath Row Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplate() + * @model + * @generated + */ +public interface TableTemplate extends AbstractTableTemplate, HasColumnsTableTemplate { + /** + * Returns the value of the 'Row Path' attribute. + * + *

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

+ * + * @return the value of the 'Row Path' attribute. + * @see #setRowPath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplate_RowPath() + * @model unique="false" + * @generated + */ + String getRowPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate#getRowPath Row Path}' attribute. + * + * + * @param value the new value of the 'Row Path' attribute. + * @see #getRowPath() + * @generated + */ + void setRowPath(String value); + +} // TableTemplate diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateAttributeColumn.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateAttributeColumn.java new file mode 100644 index 0000000..4b5dea4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateAttributeColumn.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.sirius.manager.tableTemplate; + + +/** + * + * A representation of the model object 'Attribute Column'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateAttributeColumn() + * @model + * @generated + */ +public interface TableTemplateAttributeColumn extends TableTemplateColumn { + /** + * Returns the value of the 'Path' attribute. + * + *

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

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateAttributeColumn_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // TableTemplateAttributeColumn diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateColumn.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateColumn.java new file mode 100644 index 0000000..e088470 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateColumn.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.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Column'. + * + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateColumn() + * @model abstract="true" + * @generated + */ +public interface TableTemplateColumn extends NamedEntity { +} // TableTemplateColumn diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateFactory.java new file mode 100644 index 0000000..1cd608f --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateFactory.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.sirius.manager.tableTemplate; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage + * @generated + */ +public interface TableTemplateFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + TableTemplateFactory eINSTANCE = org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateFactoryImpl.init(); + + /** + * Returns a new object of class 'Log Table Template'. + * + * + * @return a new object of class 'Log Table Template'. + * @generated + */ + LogTableTemplate createLogTableTemplate(); + + /** + * Returns a new object of class 'Table Template'. + * + * + * @return a new object of class 'Table Template'. + * @generated + */ + TableTemplate createTableTemplate(); + + /** + * Returns a new object of class 'Iterator Table Template'. + * + * + * @return a new object of class 'Iterator Table Template'. + * @generated + */ + IteratorTableTemplate createIteratorTableTemplate(); + + /** + * Returns a new object of class 'Time Table Template'. + * + * + * @return a new object of class 'Time Table Template'. + * @generated + */ + TimeTableTemplate createTimeTableTemplate(); + + /** + * Returns a new object of class 'Attribute Column'. + * + * + * @return a new object of class 'Attribute Column'. + * @generated + */ + TableTemplateAttributeColumn createTableTemplateAttributeColumn(); + + /** + * Returns a new object of class 'Metric Column'. + * + * + * @return a new object of class 'Metric Column'. + * @generated + */ + TableTemplateMetricColumn createTableTemplateMetricColumn(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + TableTemplatePackage getTableTemplatePackage(); + +} //TableTemplateFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateMetricColumn.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateMetricColumn.java new file mode 100644 index 0000000..f345c77 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplateMetricColumn.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.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; + +/** + * + * A representation of the model object 'Metric Column'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getOption Option}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateMetricColumn() + * @model + * @generated + */ +public interface TableTemplateMetricColumn extends TableTemplateColumn { + /** + * Returns the value of the 'Path' attribute. + * + *

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

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateMetricColumn_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the 'Option' reference. + * + *

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

+ * + * @return the value of the 'Option' reference. + * @see #setOption(MetricValueOption) + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTableTemplateMetricColumn_Option() + * @model + * @generated + */ + MetricValueOption getOption(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getOption Option}' reference. + * + * + * @param value the new value of the 'Option' reference. + * @see #getOption() + * @generated + */ + void setOption(MetricValueOption value); + +} // TableTemplateMetricColumn diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplatePackage.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplatePackage.java new file mode 100644 index 0000000..ddf5d4b --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TableTemplatePackage.java @@ -0,0 +1,1330 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-sirius-manager-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.sirius.manager'" + * annotation="http://www.eclipse.org/emf/2011/Xcore GenModel='http://www.eclipse.org/emf/2002/GenModel' doc='http://openecomp.org/sirius/doc'" + * @generated + */ +public interface TableTemplatePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "tableTemplate"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.sirius.manager.tableTemplate"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "tableTemplate"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + TableTemplatePackage eINSTANCE = org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl Abstract Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getAbstractTableTemplate() + * @generated + */ + int ABSTRACT_TABLE_TEMPLATE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Tree Path' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__TREE_PATH = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Table Path' attribute. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE__TABLE_PATH = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Abstract Table Template' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Abstract Table Template' class. + * + * + * @generated + * @ordered + */ + int ABSTRACT_TABLE_TEMPLATE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.HasColumnsTableTemplateImpl Has Columns Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.HasColumnsTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getHasColumnsTableTemplate() + * @generated + */ + int HAS_COLUMNS_TABLE_TEMPLATE = 1; + + /** + * The feature id for the 'Columns' containment reference list. + * + * + * @generated + * @ordered + */ + int HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS = 0; + + /** + * The number of structural features of the 'Has Columns Table Template' class. + * + * + * @generated + * @ordered + */ + int HAS_COLUMNS_TABLE_TEMPLATE_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Has Columns Table Template' class. + * + * + * @generated + * @ordered + */ + int HAS_COLUMNS_TABLE_TEMPLATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl Log Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getLogTableTemplate() + * @generated + */ + int LOG_TABLE_TEMPLATE = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__NAME = ABSTRACT_TABLE_TEMPLATE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__LAST_POLLED = ABSTRACT_TABLE_TEMPLATE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__LAST_CHANGED = ABSTRACT_TABLE_TEMPLATE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__CREATED = ABSTRACT_TABLE_TEMPLATE__CREATED; + + /** + * The feature id for the 'Tree Path' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__TREE_PATH = ABSTRACT_TABLE_TEMPLATE__TREE_PATH; + + /** + * The feature id for the 'Table Path' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__TABLE_PATH = ABSTRACT_TABLE_TEMPLATE__TABLE_PATH; + + /** + * The feature id for the 'Min Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__MIN_LEVEL = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Min Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__MIN_SEVERITY = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Prefix Resource Path' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Duration' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__DURATION = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Aggregation Duration' attribute. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE__AGGREGATION_DURATION = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Log Table Template' class. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE_FEATURE_COUNT = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Log Table Template' class. + * + * + * @generated + * @ordered + */ + int LOG_TABLE_TEMPLATE_OPERATION_COUNT = ABSTRACT_TABLE_TEMPLATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplate() + * @generated + */ + int TABLE_TEMPLATE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__NAME = ABSTRACT_TABLE_TEMPLATE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__LAST_POLLED = ABSTRACT_TABLE_TEMPLATE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__LAST_CHANGED = ABSTRACT_TABLE_TEMPLATE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__CREATED = ABSTRACT_TABLE_TEMPLATE__CREATED; + + /** + * The feature id for the 'Tree Path' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__TREE_PATH = ABSTRACT_TABLE_TEMPLATE__TREE_PATH; + + /** + * The feature id for the 'Table Path' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__TABLE_PATH = ABSTRACT_TABLE_TEMPLATE__TABLE_PATH; + + /** + * The feature id for the 'Columns' containment reference list. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__COLUMNS = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Row Path' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE__ROW_PATH = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Table Template' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_FEATURE_COUNT = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Table Template' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_OPERATION_COUNT = ABSTRACT_TABLE_TEMPLATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl Iterator Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getIteratorTableTemplate() + * @generated + */ + int ITERATOR_TABLE_TEMPLATE = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__NAME = ABSTRACT_TABLE_TEMPLATE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__LAST_POLLED = ABSTRACT_TABLE_TEMPLATE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__LAST_CHANGED = ABSTRACT_TABLE_TEMPLATE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__CREATED = ABSTRACT_TABLE_TEMPLATE__CREATED; + + /** + * The feature id for the 'Tree Path' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__TREE_PATH = ABSTRACT_TABLE_TEMPLATE__TREE_PATH; + + /** + * The feature id for the 'Table Path' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__TABLE_PATH = ABSTRACT_TABLE_TEMPLATE__TABLE_PATH; + + /** + * The feature id for the 'Columns' containment reference list. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__COLUMNS = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Iterator' containment reference. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE__ITERATOR = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Iterator Table Template' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE_FEATURE_COUNT = ABSTRACT_TABLE_TEMPLATE_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Iterator Table Template' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_TABLE_TEMPLATE_OPERATION_COUNT = ABSTRACT_TABLE_TEMPLATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TimeTableTemplateImpl Time Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TimeTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTimeTableTemplate() + * @generated + */ + int TIME_TABLE_TEMPLATE = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__NAME = TABLE_TEMPLATE__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__LAST_POLLED = TABLE_TEMPLATE__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__LAST_CHANGED = TABLE_TEMPLATE__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__CREATED = TABLE_TEMPLATE__CREATED; + + /** + * The feature id for the 'Tree Path' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__TREE_PATH = TABLE_TEMPLATE__TREE_PATH; + + /** + * The feature id for the 'Table Path' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__TABLE_PATH = TABLE_TEMPLATE__TABLE_PATH; + + /** + * The feature id for the 'Columns' containment reference list. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__COLUMNS = TABLE_TEMPLATE__COLUMNS; + + /** + * The feature id for the 'Row Path' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__ROW_PATH = TABLE_TEMPLATE__ROW_PATH; + + /** + * The feature id for the 'Duration' attribute. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE__DURATION = TABLE_TEMPLATE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Time Table Template' class. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE_FEATURE_COUNT = TABLE_TEMPLATE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Time Table Template' class. + * + * + * @generated + * @ordered + */ + int TIME_TABLE_TEMPLATE_OPERATION_COUNT = TABLE_TEMPLATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateColumnImpl Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateColumn() + * @generated + */ + int TABLE_TEMPLATE_COLUMN = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_COLUMN_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateAttributeColumnImpl Attribute Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateAttributeColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateAttributeColumn() + * @generated + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN__NAME = TABLE_TEMPLATE_COLUMN__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN__LAST_POLLED = TABLE_TEMPLATE_COLUMN__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN__LAST_CHANGED = TABLE_TEMPLATE_COLUMN__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN__CREATED = TABLE_TEMPLATE_COLUMN__CREATED; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH = TABLE_TEMPLATE_COLUMN_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Attribute Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN_FEATURE_COUNT = TABLE_TEMPLATE_COLUMN_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Attribute Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_ATTRIBUTE_COLUMN_OPERATION_COUNT = TABLE_TEMPLATE_COLUMN_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl Metric Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateMetricColumn() + * @generated + */ + int TABLE_TEMPLATE_METRIC_COLUMN = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__NAME = TABLE_TEMPLATE_COLUMN__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__LAST_POLLED = TABLE_TEMPLATE_COLUMN__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__LAST_CHANGED = TABLE_TEMPLATE_COLUMN__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__CREATED = TABLE_TEMPLATE_COLUMN__CREATED; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__PATH = TABLE_TEMPLATE_COLUMN_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Option' reference. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN__OPTION = TABLE_TEMPLATE_COLUMN_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Metric Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN_FEATURE_COUNT = TABLE_TEMPLATE_COLUMN_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Metric Column' class. + * + * + * @generated + * @ordered + */ + int TABLE_TEMPLATE_METRIC_COLUMN_OPERATION_COUNT = TABLE_TEMPLATE_COLUMN_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate Abstract Table Template}'. + * + * + * @return the meta object for class 'Abstract Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate + * @generated + */ + EClass getAbstractTableTemplate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTreePath Tree Path}'. + * + * + * @return the meta object for the attribute 'Tree Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTreePath() + * @see #getAbstractTableTemplate() + * @generated + */ + EAttribute getAbstractTableTemplate_TreePath(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTablePath Table Path}'. + * + * + * @return the meta object for the attribute 'Table Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate#getTablePath() + * @see #getAbstractTableTemplate() + * @generated + */ + EAttribute getAbstractTableTemplate_TablePath(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate Has Columns Table Template}'. + * + * + * @return the meta object for class 'Has Columns Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate + * @generated + */ + EClass getHasColumnsTableTemplate(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate#getColumns Columns}'. + * + * + * @return the meta object for the containment reference list 'Columns'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate#getColumns() + * @see #getHasColumnsTableTemplate() + * @generated + */ + EReference getHasColumnsTableTemplate_Columns(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate Log Table Template}'. + * + * + * @return the meta object for class 'Log Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate + * @generated + */ + EClass getLogTableTemplate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinLevel Min Level}'. + * + * + * @return the meta object for the attribute 'Min Level'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinLevel() + * @see #getLogTableTemplate() + * @generated + */ + EAttribute getLogTableTemplate_MinLevel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinSeverity Min Severity}'. + * + * + * @return the meta object for the attribute 'Min Severity'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getMinSeverity() + * @see #getLogTableTemplate() + * @generated + */ + EAttribute getLogTableTemplate_MinSeverity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getPrefixResourcePath Prefix Resource Path}'. + * + * + * @return the meta object for the attribute 'Prefix Resource Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getPrefixResourcePath() + * @see #getLogTableTemplate() + * @generated + */ + EAttribute getLogTableTemplate_PrefixResourcePath(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getDuration Duration}'. + * + * + * @return the meta object for the attribute 'Duration'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getDuration() + * @see #getLogTableTemplate() + * @generated + */ + EAttribute getLogTableTemplate_Duration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getAggregationDuration Aggregation Duration}'. + * + * + * @return the meta object for the attribute 'Aggregation Duration'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate#getAggregationDuration() + * @see #getLogTableTemplate() + * @generated + */ + EAttribute getLogTableTemplate_AggregationDuration(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate Table Template}'. + * + * + * @return the meta object for class 'Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate + * @generated + */ + EClass getTableTemplate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate#getRowPath Row Path}'. + * + * + * @return the meta object for the attribute 'Row Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate#getRowPath() + * @see #getTableTemplate() + * @generated + */ + EAttribute getTableTemplate_RowPath(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate Iterator Table Template}'. + * + * + * @return the meta object for class 'Iterator Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate + * @generated + */ + EClass getIteratorTableTemplate(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate#getIterator Iterator}'. + * + * + * @return the meta object for the containment reference 'Iterator'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate#getIterator() + * @see #getIteratorTableTemplate() + * @generated + */ + EReference getIteratorTableTemplate_Iterator(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate Time Table Template}'. + * + * + * @return the meta object for class 'Time Table Template'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate + * @generated + */ + EClass getTimeTableTemplate(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate#getDuration Duration}'. + * + * + * @return the meta object for the attribute 'Duration'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate#getDuration() + * @see #getTimeTableTemplate() + * @generated + */ + EAttribute getTimeTableTemplate_Duration(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn Column}'. + * + * + * @return the meta object for class 'Column'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn + * @generated + */ + EClass getTableTemplateColumn(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn Attribute Column}'. + * + * + * @return the meta object for class 'Attribute Column'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn + * @generated + */ + EClass getTableTemplateAttributeColumn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn#getPath() + * @see #getTableTemplateAttributeColumn() + * @generated + */ + EAttribute getTableTemplateAttributeColumn_Path(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn Metric Column}'. + * + * + * @return the meta object for class 'Metric Column'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn + * @generated + */ + EClass getTableTemplateMetricColumn(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getPath() + * @see #getTableTemplateMetricColumn() + * @generated + */ + EAttribute getTableTemplateMetricColumn_Path(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getOption Option}'. + * + * + * @return the meta object for the reference 'Option'. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn#getOption() + * @see #getTableTemplateMetricColumn() + * @generated + */ + EReference getTableTemplateMetricColumn_Option(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + TableTemplateFactory getTableTemplateFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl Abstract Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getAbstractTableTemplate() + * @generated + */ + EClass ABSTRACT_TABLE_TEMPLATE = eINSTANCE.getAbstractTableTemplate(); + + /** + * The meta object literal for the 'Tree Path' attribute feature. + * + * + * @generated + */ + EAttribute ABSTRACT_TABLE_TEMPLATE__TREE_PATH = eINSTANCE.getAbstractTableTemplate_TreePath(); + + /** + * The meta object literal for the 'Table Path' attribute feature. + * + * + * @generated + */ + EAttribute ABSTRACT_TABLE_TEMPLATE__TABLE_PATH = eINSTANCE.getAbstractTableTemplate_TablePath(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.HasColumnsTableTemplateImpl Has Columns Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.HasColumnsTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getHasColumnsTableTemplate() + * @generated + */ + EClass HAS_COLUMNS_TABLE_TEMPLATE = eINSTANCE.getHasColumnsTableTemplate(); + + /** + * The meta object literal for the 'Columns' containment reference list feature. + * + * + * @generated + */ + EReference HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS = eINSTANCE.getHasColumnsTableTemplate_Columns(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl Log Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getLogTableTemplate() + * @generated + */ + EClass LOG_TABLE_TEMPLATE = eINSTANCE.getLogTableTemplate(); + + /** + * The meta object literal for the 'Min Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_TABLE_TEMPLATE__MIN_LEVEL = eINSTANCE.getLogTableTemplate_MinLevel(); + + /** + * The meta object literal for the 'Min Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_TABLE_TEMPLATE__MIN_SEVERITY = eINSTANCE.getLogTableTemplate_MinSeverity(); + + /** + * The meta object literal for the 'Prefix Resource Path' attribute feature. + * + * + * @generated + */ + EAttribute LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH = eINSTANCE.getLogTableTemplate_PrefixResourcePath(); + + /** + * The meta object literal for the 'Duration' attribute feature. + * + * + * @generated + */ + EAttribute LOG_TABLE_TEMPLATE__DURATION = eINSTANCE.getLogTableTemplate_Duration(); + + /** + * The meta object literal for the 'Aggregation Duration' attribute feature. + * + * + * @generated + */ + EAttribute LOG_TABLE_TEMPLATE__AGGREGATION_DURATION = eINSTANCE.getLogTableTemplate_AggregationDuration(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplate() + * @generated + */ + EClass TABLE_TEMPLATE = eINSTANCE.getTableTemplate(); + + /** + * The meta object literal for the 'Row Path' attribute feature. + * + * + * @generated + */ + EAttribute TABLE_TEMPLATE__ROW_PATH = eINSTANCE.getTableTemplate_RowPath(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl Iterator Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getIteratorTableTemplate() + * @generated + */ + EClass ITERATOR_TABLE_TEMPLATE = eINSTANCE.getIteratorTableTemplate(); + + /** + * The meta object literal for the 'Iterator' containment reference feature. + * + * + * @generated + */ + EReference ITERATOR_TABLE_TEMPLATE__ITERATOR = eINSTANCE.getIteratorTableTemplate_Iterator(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TimeTableTemplateImpl Time Table Template}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TimeTableTemplateImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTimeTableTemplate() + * @generated + */ + EClass TIME_TABLE_TEMPLATE = eINSTANCE.getTimeTableTemplate(); + + /** + * The meta object literal for the 'Duration' attribute feature. + * + * + * @generated + */ + EAttribute TIME_TABLE_TEMPLATE__DURATION = eINSTANCE.getTimeTableTemplate_Duration(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateColumnImpl Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateColumn() + * @generated + */ + EClass TABLE_TEMPLATE_COLUMN = eINSTANCE.getTableTemplateColumn(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateAttributeColumnImpl Attribute Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateAttributeColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateAttributeColumn() + * @generated + */ + EClass TABLE_TEMPLATE_ATTRIBUTE_COLUMN = eINSTANCE.getTableTemplateAttributeColumn(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH = eINSTANCE.getTableTemplateAttributeColumn_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl Metric Column}' class. + * + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplatePackageImpl#getTableTemplateMetricColumn() + * @generated + */ + EClass TABLE_TEMPLATE_METRIC_COLUMN = eINSTANCE.getTableTemplateMetricColumn(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute TABLE_TEMPLATE_METRIC_COLUMN__PATH = eINSTANCE.getTableTemplateMetricColumn_Path(); + + /** + * The meta object literal for the 'Option' reference feature. + * + * + * @generated + */ + EReference TABLE_TEMPLATE_METRIC_COLUMN__OPTION = eINSTANCE.getTableTemplateMetricColumn_Option(); + + } + +} //TableTemplatePackage diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TimeTableTemplate.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TimeTableTemplate.java new file mode 100644 index 0000000..53faf84 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/TimeTableTemplate.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.sirius.manager.tableTemplate; + + +/** + * + * A representation of the model object 'Time Table Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate#getDuration Duration}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage#getTimeTableTemplate() + * @model + * @generated + */ +public interface TimeTableTemplate extends TableTemplate { + /** + * Returns the value of the 'Duration' attribute. + * + *

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

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

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl#getTreePath Tree Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.AbstractTableTemplateImpl#getTablePath Table Path}
  • + *
+ *

+ * + * @generated + */ +public abstract class AbstractTableTemplateImpl extends NamedEntityImpl implements AbstractTableTemplate { + /** + * The default value of the '{@link #getTreePath() Tree Path}' attribute. + * + * + * @see #getTreePath() + * @generated + * @ordered + */ + protected static final String TREE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTreePath() Tree Path}' attribute. + * + * + * @see #getTreePath() + * @generated + * @ordered + */ + protected String treePath = TREE_PATH_EDEFAULT; + + /** + * The default value of the '{@link #getTablePath() Table Path}' attribute. + * + * + * @see #getTablePath() + * @generated + * @ordered + */ + protected static final String TABLE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTablePath() Table Path}' attribute. + * + * + * @see #getTablePath() + * @generated + * @ordered + */ + protected String tablePath = TABLE_PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected AbstractTableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.ABSTRACT_TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public String getTreePath() { + return treePath; + } + + /** + * + * + * @generated + */ + public void setTreePath(String newTreePath) { + String oldTreePath = treePath; + treePath = newTreePath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TREE_PATH, oldTreePath, treePath)); + } + + /** + * + * + * @generated + */ + public String getTablePath() { + return tablePath; + } + + /** + * + * + * @generated + */ + public void setTablePath(String newTablePath) { + String oldTablePath = tablePath; + tablePath = newTablePath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TABLE_PATH, oldTablePath, tablePath)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TREE_PATH: + return getTreePath(); + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TABLE_PATH: + return getTablePath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TREE_PATH: + setTreePath((String)newValue); + return; + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TABLE_PATH: + setTablePath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TREE_PATH: + setTreePath(TREE_PATH_EDEFAULT); + return; + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TABLE_PATH: + setTablePath(TABLE_PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TREE_PATH: + return TREE_PATH_EDEFAULT == null ? treePath != null : !TREE_PATH_EDEFAULT.equals(treePath); + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE__TABLE_PATH: + return TABLE_PATH_EDEFAULT == null ? tablePath != null : !TABLE_PATH_EDEFAULT.equals(tablePath); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (treePath: "); + result.append(treePath); + result.append(", tablePath: "); + result.append(tablePath); + result.append(')'); + return result.toString(); + } + +} //AbstractTableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/HasColumnsTableTemplateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/HasColumnsTableTemplateImpl.java new file mode 100644 index 0000000..e2714d6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/HasColumnsTableTemplateImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Has Columns Table Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.HasColumnsTableTemplateImpl#getColumns Columns}
  • + *
+ *

+ * + * @generated + */ +public abstract class HasColumnsTableTemplateImpl extends MinimalEObjectImpl.Container implements HasColumnsTableTemplate { + /** + * The cached value of the '{@link #getColumns() Columns}' containment reference list. + * + * + * @see #getColumns() + * @generated + * @ordered + */ + protected EList columns; + + /** + * + * + * @generated + */ + protected HasColumnsTableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.HAS_COLUMNS_TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public EList getColumns() { + if (columns == null) { + columns = new EObjectContainmentEList(TableTemplateColumn.class, this, TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS); + } + return columns; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: + return ((InternalEList)getColumns()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: + return getColumns(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + getColumns().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: + return columns != null && !columns.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //HasColumnsTableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/IteratorTableTemplateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/IteratorTableTemplateImpl.java new file mode 100644 index 0000000..9221429 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/IteratorTableTemplateImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.core.function.Iterator; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Iterator Table Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl#getColumns Columns}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.IteratorTableTemplateImpl#getIterator Iterator}
  • + *
+ *

+ * + * @generated + */ +public class IteratorTableTemplateImpl extends AbstractTableTemplateImpl implements IteratorTableTemplate { + /** + * The cached value of the '{@link #getColumns() Columns}' containment reference list. + * + * + * @see #getColumns() + * @generated + * @ordered + */ + protected EList columns; + + /** + * The cached value of the '{@link #getIterator() Iterator}' containment reference. + * + * + * @see #getIterator() + * @generated + * @ordered + */ + protected Iterator iterator; + + /** + * + * + * @generated + */ + protected IteratorTableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.ITERATOR_TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public EList getColumns() { + if (columns == null) { + columns = new EObjectContainmentEList(TableTemplateColumn.class, this, TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS); + } + return columns; + } + + /** + * + * + * @generated + */ + public Iterator getIterator() { + return iterator; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetIterator(Iterator newIterator, NotificationChain msgs) { + Iterator oldIterator = iterator; + iterator = newIterator; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR, oldIterator, newIterator); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setIterator(Iterator newIterator) { + if (newIterator != iterator) { + NotificationChain msgs = null; + if (iterator != null) + msgs = ((InternalEObject)iterator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR, null, msgs); + if (newIterator != null) + msgs = ((InternalEObject)newIterator).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR, null, msgs); + msgs = basicSetIterator(newIterator, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR, newIterator, newIterator)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: + return ((InternalEList)getColumns()).basicRemove(otherEnd, msgs); + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR: + return basicSetIterator(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: + return getColumns(); + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR: + return getIterator(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + getColumns().addAll((Collection)newValue); + return; + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR: + setIterator((Iterator)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + return; + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR: + setIterator((Iterator)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: + return columns != null && !columns.isEmpty(); + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__ITERATOR: + return iterator != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == HasColumnsTableTemplate.class) { + switch (derivedFeatureID) { + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS: return TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == HasColumnsTableTemplate.class) { + switch (baseFeatureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: return TableTemplatePackage.ITERATOR_TABLE_TEMPLATE__COLUMNS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //IteratorTableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/LogTableTemplateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/LogTableTemplateImpl.java new file mode 100644 index 0000000..12cd999 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/LogTableTemplateImpl.java @@ -0,0 +1,402 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogSeverity; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Log Table Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl#getMinLevel Min Level}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl#getMinSeverity Min Severity}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl#getPrefixResourcePath Prefix Resource Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.LogTableTemplateImpl#getAggregationDuration Aggregation Duration}
  • + *
+ *

+ * + * @generated + */ +public class LogTableTemplateImpl extends AbstractTableTemplateImpl implements LogTableTemplate { + /** + * The default value of the '{@link #getMinLevel() Min Level}' attribute. + * + * + * @see #getMinLevel() + * @generated + * @ordered + */ + protected static final LogLevel MIN_LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getMinLevel() Min Level}' attribute. + * + * + * @see #getMinLevel() + * @generated + * @ordered + */ + protected LogLevel minLevel = MIN_LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getMinSeverity() Min Severity}' attribute. + * + * + * @see #getMinSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity MIN_SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getMinSeverity() Min Severity}' attribute. + * + * + * @see #getMinSeverity() + * @generated + * @ordered + */ + protected LogSeverity minSeverity = MIN_SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getPrefixResourcePath() Prefix Resource Path}' attribute. + * + * + * @see #getPrefixResourcePath() + * @generated + * @ordered + */ + protected static final String PREFIX_RESOURCE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPrefixResourcePath() Prefix Resource Path}' attribute. + * + * + * @see #getPrefixResourcePath() + * @generated + * @ordered + */ + protected String prefixResourcePath = PREFIX_RESOURCE_PATH_EDEFAULT; + + /** + * The default value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getAggregationDuration() Aggregation Duration}' attribute. + * + * + * @see #getAggregationDuration() + * @generated + * @ordered + */ + protected static final String AGGREGATION_DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAggregationDuration() Aggregation Duration}' attribute. + * + * + * @see #getAggregationDuration() + * @generated + * @ordered + */ + protected String aggregationDuration = AGGREGATION_DURATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected LogTableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.LOG_TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public LogLevel getMinLevel() { + return minLevel; + } + + /** + * + * + * @generated + */ + public void setMinLevel(LogLevel newMinLevel) { + LogLevel oldMinLevel = minLevel; + minLevel = newMinLevel == null ? MIN_LEVEL_EDEFAULT : newMinLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_LEVEL, oldMinLevel, minLevel)); + } + + /** + * + * + * @generated + */ + public LogSeverity getMinSeverity() { + return minSeverity; + } + + /** + * + * + * @generated + */ + public void setMinSeverity(LogSeverity newMinSeverity) { + LogSeverity oldMinSeverity = minSeverity; + minSeverity = newMinSeverity == null ? MIN_SEVERITY_EDEFAULT : newMinSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_SEVERITY, oldMinSeverity, minSeverity)); + } + + /** + * + * + * @generated + */ + public String getPrefixResourcePath() { + return prefixResourcePath; + } + + /** + * + * + * @generated + */ + public void setPrefixResourcePath(String newPrefixResourcePath) { + String oldPrefixResourcePath = prefixResourcePath; + prefixResourcePath = newPrefixResourcePath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH, oldPrefixResourcePath, prefixResourcePath)); + } + + /** + * + * + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * + * + * @generated + */ + public void setDuration(String newDuration) { + String oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.LOG_TABLE_TEMPLATE__DURATION, oldDuration, duration)); + } + + /** + * + * + * @generated + */ + public String getAggregationDuration() { + return aggregationDuration; + } + + /** + * + * + * @generated + */ + public void setAggregationDuration(String newAggregationDuration) { + String oldAggregationDuration = aggregationDuration; + aggregationDuration = newAggregationDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.LOG_TABLE_TEMPLATE__AGGREGATION_DURATION, oldAggregationDuration, aggregationDuration)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_LEVEL: + return getMinLevel(); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_SEVERITY: + return getMinSeverity(); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH: + return getPrefixResourcePath(); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__DURATION: + return getDuration(); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__AGGREGATION_DURATION: + return getAggregationDuration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_LEVEL: + setMinLevel((LogLevel)newValue); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_SEVERITY: + setMinSeverity((LogSeverity)newValue); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH: + setPrefixResourcePath((String)newValue); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__DURATION: + setDuration((String)newValue); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__AGGREGATION_DURATION: + setAggregationDuration((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_LEVEL: + setMinLevel(MIN_LEVEL_EDEFAULT); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_SEVERITY: + setMinSeverity(MIN_SEVERITY_EDEFAULT); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH: + setPrefixResourcePath(PREFIX_RESOURCE_PATH_EDEFAULT); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__DURATION: + setDuration(DURATION_EDEFAULT); + return; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__AGGREGATION_DURATION: + setAggregationDuration(AGGREGATION_DURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_LEVEL: + return minLevel != MIN_LEVEL_EDEFAULT; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__MIN_SEVERITY: + return minSeverity != MIN_SEVERITY_EDEFAULT; + case TableTemplatePackage.LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH: + return PREFIX_RESOURCE_PATH_EDEFAULT == null ? prefixResourcePath != null : !PREFIX_RESOURCE_PATH_EDEFAULT.equals(prefixResourcePath); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__DURATION: + return DURATION_EDEFAULT == null ? duration != null : !DURATION_EDEFAULT.equals(duration); + case TableTemplatePackage.LOG_TABLE_TEMPLATE__AGGREGATION_DURATION: + return AGGREGATION_DURATION_EDEFAULT == null ? aggregationDuration != null : !AGGREGATION_DURATION_EDEFAULT.equals(aggregationDuration); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (minLevel: "); + result.append(minLevel); + result.append(", minSeverity: "); + result.append(minSeverity); + result.append(", prefixResourcePath: "); + result.append(prefixResourcePath); + result.append(", duration: "); + result.append(duration); + result.append(", aggregationDuration: "); + result.append(aggregationDuration); + result.append(')'); + return result.toString(); + } + +} //LogTableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateAttributeColumnImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateAttributeColumnImpl.java new file mode 100644 index 0000000..faa23d0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateAttributeColumnImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Attribute Column'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateAttributeColumnImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public class TableTemplateAttributeColumnImpl extends TableTemplateColumnImpl implements TableTemplateAttributeColumn { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected TableTemplateAttributeColumnImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.TABLE_TEMPLATE_ATTRIBUTE_COLUMN; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //TableTemplateAttributeColumnImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateColumnImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateColumnImpl.java new file mode 100644 index 0000000..5995352 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateColumnImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Column'. + * + *

+ *

+ * + * @generated + */ +public abstract class TableTemplateColumnImpl extends NamedEntityImpl implements TableTemplateColumn { + /** + * + * + * @generated + */ + protected TableTemplateColumnImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.TABLE_TEMPLATE_COLUMN; + } + +} //TableTemplateColumnImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateFactoryImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateFactoryImpl.java new file mode 100644 index 0000000..d13e876 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateFactoryImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class TableTemplateFactoryImpl extends EFactoryImpl implements TableTemplateFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static TableTemplateFactory init() { + try { + TableTemplateFactory theTableTemplateFactory = (TableTemplateFactory)EPackage.Registry.INSTANCE.getEFactory(TableTemplatePackage.eNS_URI); + if (theTableTemplateFactory != null) { + return theTableTemplateFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new TableTemplateFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public TableTemplateFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case TableTemplatePackage.LOG_TABLE_TEMPLATE: return createLogTableTemplate(); + case TableTemplatePackage.TABLE_TEMPLATE: return createTableTemplate(); + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE: return createIteratorTableTemplate(); + case TableTemplatePackage.TIME_TABLE_TEMPLATE: return createTimeTableTemplate(); + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN: return createTableTemplateAttributeColumn(); + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN: return createTableTemplateMetricColumn(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public LogTableTemplate createLogTableTemplate() { + LogTableTemplateImpl logTableTemplate = new LogTableTemplateImpl(); + return logTableTemplate; + } + + /** + * + * + * @generated + */ + public TableTemplate createTableTemplate() { + TableTemplateImpl tableTemplate = new TableTemplateImpl(); + return tableTemplate; + } + + /** + * + * + * @generated + */ + public IteratorTableTemplate createIteratorTableTemplate() { + IteratorTableTemplateImpl iteratorTableTemplate = new IteratorTableTemplateImpl(); + return iteratorTableTemplate; + } + + /** + * + * + * @generated + */ + public TimeTableTemplate createTimeTableTemplate() { + TimeTableTemplateImpl timeTableTemplate = new TimeTableTemplateImpl(); + return timeTableTemplate; + } + + /** + * + * + * @generated + */ + public TableTemplateAttributeColumn createTableTemplateAttributeColumn() { + TableTemplateAttributeColumnImpl tableTemplateAttributeColumn = new TableTemplateAttributeColumnImpl(); + return tableTemplateAttributeColumn; + } + + /** + * + * + * @generated + */ + public TableTemplateMetricColumn createTableTemplateMetricColumn() { + TableTemplateMetricColumnImpl tableTemplateMetricColumn = new TableTemplateMetricColumnImpl(); + return tableTemplateMetricColumn; + } + + /** + * + * + * @generated + */ + public TableTemplatePackage getTableTemplatePackage() { + return (TableTemplatePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static TableTemplatePackage getPackage() { + return TableTemplatePackage.eINSTANCE; + } + +} //TableTemplateFactoryImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateImpl.java new file mode 100644 index 0000000..3a24cb6 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Table Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl#getColumns Columns}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateImpl#getRowPath Row Path}
  • + *
+ *

+ * + * @generated + */ +public class TableTemplateImpl extends AbstractTableTemplateImpl implements TableTemplate { + /** + * The cached value of the '{@link #getColumns() Columns}' containment reference list. + * + * + * @see #getColumns() + * @generated + * @ordered + */ + protected EList columns; + + /** + * The default value of the '{@link #getRowPath() Row Path}' attribute. + * + * + * @see #getRowPath() + * @generated + * @ordered + */ + protected static final String ROW_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getRowPath() Row Path}' attribute. + * + * + * @see #getRowPath() + * @generated + * @ordered + */ + protected String rowPath = ROW_PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected TableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public EList getColumns() { + if (columns == null) { + columns = new EObjectContainmentEList(TableTemplateColumn.class, this, TableTemplatePackage.TABLE_TEMPLATE__COLUMNS); + } + return columns; + } + + /** + * + * + * @generated + */ + public String getRowPath() { + return rowPath; + } + + /** + * + * + * @generated + */ + public void setRowPath(String newRowPath) { + String oldRowPath = rowPath; + rowPath = newRowPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.TABLE_TEMPLATE__ROW_PATH, oldRowPath, rowPath)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: + return ((InternalEList)getColumns()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: + return getColumns(); + case TableTemplatePackage.TABLE_TEMPLATE__ROW_PATH: + return getRowPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + getColumns().addAll((Collection)newValue); + return; + case TableTemplatePackage.TABLE_TEMPLATE__ROW_PATH: + setRowPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: + getColumns().clear(); + return; + case TableTemplatePackage.TABLE_TEMPLATE__ROW_PATH: + setRowPath(ROW_PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: + return columns != null && !columns.isEmpty(); + case TableTemplatePackage.TABLE_TEMPLATE__ROW_PATH: + return ROW_PATH_EDEFAULT == null ? rowPath != null : !ROW_PATH_EDEFAULT.equals(rowPath); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == HasColumnsTableTemplate.class) { + switch (derivedFeatureID) { + case TableTemplatePackage.TABLE_TEMPLATE__COLUMNS: return TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == HasColumnsTableTemplate.class) { + switch (baseFeatureID) { + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS: return TableTemplatePackage.TABLE_TEMPLATE__COLUMNS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (rowPath: "); + result.append(rowPath); + result.append(')'); + return result.toString(); + } + +} //TableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateMetricColumnImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateMetricColumnImpl.java new file mode 100644 index 0000000..a59b006 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplateMetricColumnImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Metric Column'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TableTemplateMetricColumnImpl#getOption Option}
  • + *
+ *

+ * + * @generated + */ +public class TableTemplateMetricColumnImpl extends TableTemplateColumnImpl implements TableTemplateMetricColumn { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The cached value of the '{@link #getOption() Option}' reference. + * + * + * @see #getOption() + * @generated + * @ordered + */ + protected MetricValueOption option; + + /** + * + * + * @generated + */ + protected TableTemplateMetricColumnImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.TABLE_TEMPLATE_METRIC_COLUMN; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + public MetricValueOption getOption() { + if (option != null && option.eIsProxy()) { + InternalEObject oldOption = (InternalEObject)option; + option = (MetricValueOption)eResolveProxy(oldOption); + if (option != oldOption) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION, oldOption, option)); + } + } + return option; + } + + /** + * + * + * @generated + */ + public MetricValueOption basicGetOption() { + return option; + } + + /** + * + * + * @generated + */ + public void setOption(MetricValueOption newOption) { + MetricValueOption oldOption = option; + option = newOption; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION, oldOption, option)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__PATH: + return getPath(); + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION: + if (resolve) return getOption(); + return basicGetOption(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__PATH: + setPath((String)newValue); + return; + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION: + setOption((MetricValueOption)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__PATH: + setPath(PATH_EDEFAULT); + return; + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION: + setOption((MetricValueOption)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN__OPTION: + return option != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //TableTemplateMetricColumnImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplatePackageImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplatePackageImpl.java new file mode 100644 index 0000000..8cdb839 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TableTemplatePackageImpl.java @@ -0,0 +1,560 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateFactory; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class TableTemplatePackageImpl extends EPackageImpl implements TableTemplatePackage { + /** + * + * + * @generated + */ + private EClass abstractTableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass hasColumnsTableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass logTableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass tableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass iteratorTableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass timeTableTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass tableTemplateColumnEClass = null; + + /** + * + * + * @generated + */ + private EClass tableTemplateAttributeColumnEClass = null; + + /** + * + * + * @generated + */ + private EClass tableTemplateMetricColumnEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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

This method is used to initialize {@link TableTemplatePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static TableTemplatePackage init() { + if (isInited) return (TableTemplatePackage)EPackage.Registry.INSTANCE.getEPackage(TableTemplatePackage.eNS_URI); + + // Obtain or create and register package + TableTemplatePackageImpl theTableTemplatePackage = (TableTemplatePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof TableTemplatePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new TableTemplatePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + LogsPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theTableTemplatePackage.createPackageContents(); + + // Initialize created meta-data + theTableTemplatePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theTableTemplatePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(TableTemplatePackage.eNS_URI, theTableTemplatePackage); + return theTableTemplatePackage; + } + + /** + * + * + * @generated + */ + public EClass getAbstractTableTemplate() { + return abstractTableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAbstractTableTemplate_TreePath() { + return (EAttribute)abstractTableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAbstractTableTemplate_TablePath() { + return (EAttribute)abstractTableTemplateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getHasColumnsTableTemplate() { + return hasColumnsTableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EReference getHasColumnsTableTemplate_Columns() { + return (EReference)hasColumnsTableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLogTableTemplate() { + return logTableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogTableTemplate_MinLevel() { + return (EAttribute)logTableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLogTableTemplate_MinSeverity() { + return (EAttribute)logTableTemplateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLogTableTemplate_PrefixResourcePath() { + return (EAttribute)logTableTemplateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getLogTableTemplate_Duration() { + return (EAttribute)logTableTemplateEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getLogTableTemplate_AggregationDuration() { + return (EAttribute)logTableTemplateEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getTableTemplate() { + return tableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTableTemplate_RowPath() { + return (EAttribute)tableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getIteratorTableTemplate() { + return iteratorTableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EReference getIteratorTableTemplate_Iterator() { + return (EReference)iteratorTableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTimeTableTemplate() { + return timeTableTemplateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTimeTableTemplate_Duration() { + return (EAttribute)timeTableTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTableTemplateColumn() { + return tableTemplateColumnEClass; + } + + /** + * + * + * @generated + */ + public EClass getTableTemplateAttributeColumn() { + return tableTemplateAttributeColumnEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTableTemplateAttributeColumn_Path() { + return (EAttribute)tableTemplateAttributeColumnEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTableTemplateMetricColumn() { + return tableTemplateMetricColumnEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getTableTemplateMetricColumn_Path() { + return (EAttribute)tableTemplateMetricColumnEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTableTemplateMetricColumn_Option() { + return (EReference)tableTemplateMetricColumnEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public TableTemplateFactory getTableTemplateFactory() { + return (TableTemplateFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + abstractTableTemplateEClass = createEClass(ABSTRACT_TABLE_TEMPLATE); + createEAttribute(abstractTableTemplateEClass, ABSTRACT_TABLE_TEMPLATE__TREE_PATH); + createEAttribute(abstractTableTemplateEClass, ABSTRACT_TABLE_TEMPLATE__TABLE_PATH); + + hasColumnsTableTemplateEClass = createEClass(HAS_COLUMNS_TABLE_TEMPLATE); + createEReference(hasColumnsTableTemplateEClass, HAS_COLUMNS_TABLE_TEMPLATE__COLUMNS); + + logTableTemplateEClass = createEClass(LOG_TABLE_TEMPLATE); + createEAttribute(logTableTemplateEClass, LOG_TABLE_TEMPLATE__MIN_LEVEL); + createEAttribute(logTableTemplateEClass, LOG_TABLE_TEMPLATE__MIN_SEVERITY); + createEAttribute(logTableTemplateEClass, LOG_TABLE_TEMPLATE__PREFIX_RESOURCE_PATH); + createEAttribute(logTableTemplateEClass, LOG_TABLE_TEMPLATE__DURATION); + createEAttribute(logTableTemplateEClass, LOG_TABLE_TEMPLATE__AGGREGATION_DURATION); + + tableTemplateEClass = createEClass(TABLE_TEMPLATE); + createEAttribute(tableTemplateEClass, TABLE_TEMPLATE__ROW_PATH); + + iteratorTableTemplateEClass = createEClass(ITERATOR_TABLE_TEMPLATE); + createEReference(iteratorTableTemplateEClass, ITERATOR_TABLE_TEMPLATE__ITERATOR); + + timeTableTemplateEClass = createEClass(TIME_TABLE_TEMPLATE); + createEAttribute(timeTableTemplateEClass, TIME_TABLE_TEMPLATE__DURATION); + + tableTemplateColumnEClass = createEClass(TABLE_TEMPLATE_COLUMN); + + tableTemplateAttributeColumnEClass = createEClass(TABLE_TEMPLATE_ATTRIBUTE_COLUMN); + createEAttribute(tableTemplateAttributeColumnEClass, TABLE_TEMPLATE_ATTRIBUTE_COLUMN__PATH); + + tableTemplateMetricColumnEClass = createEClass(TABLE_TEMPLATE_METRIC_COLUMN); + createEAttribute(tableTemplateMetricColumnEClass, TABLE_TEMPLATE_METRIC_COLUMN__PATH); + createEReference(tableTemplateMetricColumnEClass, TABLE_TEMPLATE_METRIC_COLUMN__OPTION); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + LogsPackage theLogsPackage = (LogsPackage)EPackage.Registry.INSTANCE.getEPackage(LogsPackage.eNS_URI); + FunctionPackage theFunctionPackage = (FunctionPackage)EPackage.Registry.INSTANCE.getEPackage(FunctionPackage.eNS_URI); + MetricsPackage theMetricsPackage = (MetricsPackage)EPackage.Registry.INSTANCE.getEPackage(MetricsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + abstractTableTemplateEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + logTableTemplateEClass.getESuperTypes().add(this.getAbstractTableTemplate()); + tableTemplateEClass.getESuperTypes().add(this.getAbstractTableTemplate()); + tableTemplateEClass.getESuperTypes().add(this.getHasColumnsTableTemplate()); + iteratorTableTemplateEClass.getESuperTypes().add(this.getAbstractTableTemplate()); + iteratorTableTemplateEClass.getESuperTypes().add(this.getHasColumnsTableTemplate()); + timeTableTemplateEClass.getESuperTypes().add(this.getTableTemplate()); + tableTemplateColumnEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + tableTemplateAttributeColumnEClass.getESuperTypes().add(this.getTableTemplateColumn()); + tableTemplateMetricColumnEClass.getESuperTypes().add(this.getTableTemplateColumn()); + + // Initialize classes, features, and operations; add parameters + initEClass(abstractTableTemplateEClass, AbstractTableTemplate.class, "AbstractTableTemplate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAbstractTableTemplate_TreePath(), theEcorePackage.getEString(), "treePath", null, 0, 1, AbstractTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAbstractTableTemplate_TablePath(), theEcorePackage.getEString(), "tablePath", null, 0, 1, AbstractTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(hasColumnsTableTemplateEClass, HasColumnsTableTemplate.class, "HasColumnsTableTemplate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getHasColumnsTableTemplate_Columns(), this.getTableTemplateColumn(), null, "columns", null, 0, -1, HasColumnsTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logTableTemplateEClass, LogTableTemplate.class, "LogTableTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogTableTemplate_MinLevel(), theLogsPackage.getLogLevel(), "minLevel", null, 0, 1, LogTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogTableTemplate_MinSeverity(), theLogsPackage.getLogSeverity(), "minSeverity", null, 0, 1, LogTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogTableTemplate_PrefixResourcePath(), theEcorePackage.getEString(), "prefixResourcePath", null, 0, 1, LogTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogTableTemplate_Duration(), theEcorePackage.getEString(), "duration", null, 0, 1, LogTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogTableTemplate_AggregationDuration(), theEcorePackage.getEString(), "aggregationDuration", null, 0, 1, LogTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(tableTemplateEClass, TableTemplate.class, "TableTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTableTemplate_RowPath(), theEcorePackage.getEString(), "rowPath", null, 0, 1, TableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(iteratorTableTemplateEClass, IteratorTableTemplate.class, "IteratorTableTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getIteratorTableTemplate_Iterator(), theFunctionPackage.getIterator(), null, "iterator", null, 0, 1, IteratorTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(timeTableTemplateEClass, TimeTableTemplate.class, "TimeTableTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTimeTableTemplate_Duration(), theEcorePackage.getEString(), "duration", null, 0, 1, TimeTableTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(tableTemplateColumnEClass, TableTemplateColumn.class, "TableTemplateColumn", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(tableTemplateAttributeColumnEClass, TableTemplateAttributeColumn.class, "TableTemplateAttributeColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTableTemplateAttributeColumn_Path(), theEcorePackage.getEString(), "path", null, 0, 1, TableTemplateAttributeColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(tableTemplateMetricColumnEClass, TableTemplateMetricColumn.class, "TableTemplateMetricColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getTableTemplateMetricColumn_Path(), theEcorePackage.getEString(), "path", null, 0, 1, TableTemplateMetricColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getTableTemplateMetricColumn_Option(), theMetricsPackage.getMetricValueOption(), null, "option", null, 0, 1, TableTemplateMetricColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "GenModel", "http://www.eclipse.org/emf/2002/GenModel", + "doc", "http://openecomp.org/sirius/doc" + }); + } + +} //TableTemplatePackageImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TimeTableTemplateImpl.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TimeTableTemplateImpl.java new file mode 100644 index 0000000..942b194 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/impl/TimeTableTemplateImpl.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.sirius.manager.tableTemplate.impl; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage; +import org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Time Table Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.sirius.manager.tableTemplate.impl.TimeTableTemplateImpl#getDuration Duration}
  • + *
+ *

+ * + * @generated + */ +public class TimeTableTemplateImpl extends TableTemplateImpl implements TimeTableTemplate { + /** + * The default value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected TimeTableTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return TableTemplatePackage.Literals.TIME_TABLE_TEMPLATE; + } + + /** + * + * + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * + * + * @generated + */ + public void setDuration(String newDuration) { + String oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, TableTemplatePackage.TIME_TABLE_TEMPLATE__DURATION, oldDuration, duration)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case TableTemplatePackage.TIME_TABLE_TEMPLATE__DURATION: + return getDuration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case TableTemplatePackage.TIME_TABLE_TEMPLATE__DURATION: + setDuration((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case TableTemplatePackage.TIME_TABLE_TEMPLATE__DURATION: + setDuration(DURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case TableTemplatePackage.TIME_TABLE_TEMPLATE__DURATION: + return DURATION_EDEFAULT == null ? duration != null : !DURATION_EDEFAULT.equals(duration); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (duration: "); + result.append(duration); + result.append(')'); + return result.toString(); + } + +} //TimeTableTemplateImpl diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateAdapterFactory.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateAdapterFactory.java new file mode 100644 index 0000000..2c46df7 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateAdapterFactory.java @@ -0,0 +1,305 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage + * @generated + */ +public class TableTemplateAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static TableTemplatePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public TableTemplateAdapterFactory() { + if (modelPackage == null) { + modelPackage = TableTemplatePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected TableTemplateSwitch modelSwitch = + new TableTemplateSwitch() { + @Override + public Adapter caseAbstractTableTemplate(AbstractTableTemplate object) { + return createAbstractTableTemplateAdapter(); + } + @Override + public Adapter caseHasColumnsTableTemplate(HasColumnsTableTemplate object) { + return createHasColumnsTableTemplateAdapter(); + } + @Override + public Adapter caseLogTableTemplate(LogTableTemplate object) { + return createLogTableTemplateAdapter(); + } + @Override + public Adapter caseTableTemplate(TableTemplate object) { + return createTableTemplateAdapter(); + } + @Override + public Adapter caseIteratorTableTemplate(IteratorTableTemplate object) { + return createIteratorTableTemplateAdapter(); + } + @Override + public Adapter caseTimeTableTemplate(TimeTableTemplate object) { + return createTimeTableTemplateAdapter(); + } + @Override + public Adapter caseTableTemplateColumn(TableTemplateColumn object) { + return createTableTemplateColumnAdapter(); + } + @Override + public Adapter caseTableTemplateAttributeColumn(TableTemplateAttributeColumn object) { + return createTableTemplateAttributeColumnAdapter(); + } + @Override + public Adapter caseTableTemplateMetricColumn(TableTemplateMetricColumn object) { + return createTableTemplateMetricColumnAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate Abstract Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate + * @generated + */ + public Adapter createAbstractTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate Has Columns Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.HasColumnsTableTemplate + * @generated + */ + public Adapter createHasColumnsTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate Log Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.LogTableTemplate + * @generated + */ + public Adapter createLogTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplate + * @generated + */ + public Adapter createTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate Iterator Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.IteratorTableTemplate + * @generated + */ + public Adapter createIteratorTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate Time Table Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TimeTableTemplate + * @generated + */ + public Adapter createTimeTableTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn Column}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateColumn + * @generated + */ + public Adapter createTableTemplateColumnAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn Attribute Column}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateAttributeColumn + * @generated + */ + public Adapter createTableTemplateAttributeColumnAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn Metric Column}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplateMetricColumn + * @generated + */ + public Adapter createTableTemplateMetricColumnAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //TableTemplateAdapterFactory diff --git a/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateSwitch.java b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateSwitch.java new file mode 100644 index 0000000..20d863e --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore-gen/org/openecomp/ncomp/sirius/manager/tableTemplate/util/TableTemplateSwitch.java @@ -0,0 +1,334 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.sirius.manager.tableTemplate.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.sirius.manager.tableTemplate.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.sirius.manager.tableTemplate.TableTemplatePackage + * @generated + */ +public class TableTemplateSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static TableTemplatePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public TableTemplateSwitch() { + if (modelPackage == null) { + modelPackage = TableTemplatePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case TableTemplatePackage.ABSTRACT_TABLE_TEMPLATE: { + AbstractTableTemplate abstractTableTemplate = (AbstractTableTemplate)theEObject; + T result = caseAbstractTableTemplate(abstractTableTemplate); + if (result == null) result = caseNamedEntity(abstractTableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.HAS_COLUMNS_TABLE_TEMPLATE: { + HasColumnsTableTemplate hasColumnsTableTemplate = (HasColumnsTableTemplate)theEObject; + T result = caseHasColumnsTableTemplate(hasColumnsTableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.LOG_TABLE_TEMPLATE: { + LogTableTemplate logTableTemplate = (LogTableTemplate)theEObject; + T result = caseLogTableTemplate(logTableTemplate); + if (result == null) result = caseAbstractTableTemplate(logTableTemplate); + if (result == null) result = caseNamedEntity(logTableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.TABLE_TEMPLATE: { + TableTemplate tableTemplate = (TableTemplate)theEObject; + T result = caseTableTemplate(tableTemplate); + if (result == null) result = caseAbstractTableTemplate(tableTemplate); + if (result == null) result = caseHasColumnsTableTemplate(tableTemplate); + if (result == null) result = caseNamedEntity(tableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.ITERATOR_TABLE_TEMPLATE: { + IteratorTableTemplate iteratorTableTemplate = (IteratorTableTemplate)theEObject; + T result = caseIteratorTableTemplate(iteratorTableTemplate); + if (result == null) result = caseAbstractTableTemplate(iteratorTableTemplate); + if (result == null) result = caseHasColumnsTableTemplate(iteratorTableTemplate); + if (result == null) result = caseNamedEntity(iteratorTableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.TIME_TABLE_TEMPLATE: { + TimeTableTemplate timeTableTemplate = (TimeTableTemplate)theEObject; + T result = caseTimeTableTemplate(timeTableTemplate); + if (result == null) result = caseTableTemplate(timeTableTemplate); + if (result == null) result = caseAbstractTableTemplate(timeTableTemplate); + if (result == null) result = caseHasColumnsTableTemplate(timeTableTemplate); + if (result == null) result = caseNamedEntity(timeTableTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.TABLE_TEMPLATE_COLUMN: { + TableTemplateColumn tableTemplateColumn = (TableTemplateColumn)theEObject; + T result = caseTableTemplateColumn(tableTemplateColumn); + if (result == null) result = caseNamedEntity(tableTemplateColumn); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.TABLE_TEMPLATE_ATTRIBUTE_COLUMN: { + TableTemplateAttributeColumn tableTemplateAttributeColumn = (TableTemplateAttributeColumn)theEObject; + T result = caseTableTemplateAttributeColumn(tableTemplateAttributeColumn); + if (result == null) result = caseTableTemplateColumn(tableTemplateAttributeColumn); + if (result == null) result = caseNamedEntity(tableTemplateAttributeColumn); + if (result == null) result = defaultCase(theEObject); + return result; + } + case TableTemplatePackage.TABLE_TEMPLATE_METRIC_COLUMN: { + TableTemplateMetricColumn tableTemplateMetricColumn = (TableTemplateMetricColumn)theEObject; + T result = caseTableTemplateMetricColumn(tableTemplateMetricColumn); + if (result == null) result = caseTableTemplateColumn(tableTemplateMetricColumn); + if (result == null) result = caseNamedEntity(tableTemplateMetricColumn); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Abstract Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Abstract Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAbstractTableTemplate(AbstractTableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Has Columns Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Has Columns Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasColumnsTableTemplate(HasColumnsTableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogTableTemplate(LogTableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTableTemplate(TableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Iterator Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Iterator Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIteratorTableTemplate(IteratorTableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Time Table Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Time Table Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTimeTableTemplate(TimeTableTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Column'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Column'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTableTemplateColumn(TableTemplateColumn object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Attribute Column'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Attribute Column'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTableTemplateAttributeColumn(TableTemplateAttributeColumn object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metric Column'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metric Column'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTableTemplateMetricColumn(TableTemplateMetricColumn object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //TableTemplateSwitch diff --git a/ncomp-sirius-manager-model/src/main/xcore/controllerModel.xcore b/ncomp-sirius-manager-model/src/main/xcore/controllerModel.xcore new file mode 100644 index 0000000..d0086d1 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/controllerModel.xcore @@ -0,0 +1,33 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + + +package org.openecomp.ncomp.sirius.manager.controllermodel + +class ControllerModel { + String templateDirectory + String pluginName + String name + String title + String prefix +} \ No newline at end of file diff --git a/ncomp-sirius-manager-model/src/main/xcore/graph.xcore b/ncomp-sirius-manager-model/src/main/xcore/graph.xcore new file mode 100644 index 0000000..d5ae008 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/graph.xcore @@ -0,0 +1,53 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +@GenModel(updateClasspath="false") +package org.openecomp.ncomp.sirius.manager.graph + +annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel + +class GuiGraph { + contains GuiGraphNode[] nodes + contains GuiGraphEdge[] edges +} + +class GuiGraphItem { + String name + String tooltip + String Url +} + +class GuiGraphNode extends GuiGraphItem { + Integer x + Integer y + Integer h + Integer w +} + + +class GuiGraphEdge extends GuiGraphItem { + refers GuiGraphNode x + refers GuiGraphNode y +} + + diff --git a/ncomp-sirius-manager-model/src/main/xcore/gui.xcore b/ncomp-sirius-manager-model/src/main/xcore/gui.xcore new file mode 100644 index 0000000..1b06bf0 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/gui.xcore @@ -0,0 +1,182 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +// package org.openecomp.ncomp.sirius.manager.gui +// TODO NEED TO CHANGE PACKAGE NAME BUT GUI DEPEND ON THE OLD NAME. +package org.openecomp.ncomp.gwt.siriusportal.model + +import org.openecomp.ncomp.sirius.manager.graph.GuiGraph + +annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel + +type Date wraps java.util.Date + +class GuiClientApi { + op GuiTree getTree() + op GuiObject getObject(String path) + op GuiTimeSerie getTimeSerie(String path, String start, String end, String duration) + op GuiTable getTable(String path, String start, String end) + op GuiHtml getHtml(String path, String start, String end) + op GuiGraph getGraph(String path, String start, String end) +} + +class GuiTree { + contains GuiTreeNode[] sections +} + +class GuiTreeNode { + String nodeName + String title // Pretty label, if null then use name + String tooltip + String icon + GuiView view + contains GuiTreeNode[] children +} + +enum GuiView { NONE, OBJECT, TIMESERIES, BIRTREPORT, HTML, TABLE } + +class GuiObject { + contains GuiObjectValue[] values +} + +class GuiNamedObject extends GuiObject { + String objectName +} + +abstract class GuiObjectValue { + String valueName + String tooltip +} + +class GuiObjectValueInteger extends GuiObjectValue { + int i +} + +class GuiObjectValueString extends GuiObjectValue { + String v +} + +class GuiObjectValueReference extends GuiObjectValueString { + String path +} + +class GuiObjectValueTimeSeries extends GuiObjectValueString { + String path +} + +class GuiObjectValueObject extends GuiObjectValue { + contains GuiObject v +} + +class GuiObjectUnNamedList extends GuiObjectValue { + contains GuiObject[] objects +} + +class GuiObjectNamedList extends GuiObjectValue { + contains GuiNamedObject[] objects +} + +class GuiTimeSerie { + String name + String xAxisLabel + String xAxisDateFormat = "MM-dd HH:mm" + String yAxisLabel + Date start + Date end + boolean isRate + contains GuiTimeSerieData[] data +} + +class GuiTimeSerieData { + Date time + double value + Double max + Double min + int num +} + +class GuiTable { + contains GuiTableColumn[] columns + contains GuiTableRow[] rows +} + +class GuiTableColumn { + String colName + String tooltip + String format + int width = "0" // pixels + boolean hidden = "false" + GuiTableColumnType columnType +} + +enum GuiTableColumnType { STRING, DOUBLE, DATE, REF_LIST} + +class GuiTableRow { + contains GuiTableCell[] cells +} + +abstract class GuiTableCell { + String tooltip +} + +class GuiTableCellString extends GuiTableCell { + String value +} + +class GuiTableCellDouble extends GuiTableCell { + double value + String timeseriesPath +} + +class GuiTableCellDate extends GuiTableCell { + Date value +} + +class GuiTableCellReferences extends GuiTableCell { + contains GuiTableCellReference[] refs +} + +class GuiTableCellReference { + String label + String path +} + + +class GuiDiagram { + contains GuiDiagramItem[] items +} + +class GuiDiagramItem { + String tooltip +} + +class GuiDiagramRectangle extends GuiDiagramItem { + int x + int y + int h + int w +} + +class GuiHtml { + String html +} diff --git a/ncomp-sirius-manager-model/src/main/xcore/property.xcore b/ncomp-sirius-manager-model/src/main/xcore/property.xcore new file mode 100644 index 0000000..e3fe1a4 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/property.xcore @@ -0,0 +1,51 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +package org.openecomp.ncomp.sirius.manager.properties + +import org.openecomp.ncomp.core.NamedEntity + + +annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel +annotation 'http://openecomp.org/sirius/doc' as doc + +abstract class AbstractProperty {} + +class Property extends AbstractProperty { + String name + String value +} + +class ModuleProperty extends AbstractProperty, Module { +} + +class Module extends NamedEntity { + String version + contains Module[] subModules +} + +abstract class ModuleContainer { + contains Module[] modules +} + + diff --git a/ncomp-sirius-manager-model/src/main/xcore/server.xcore b/ncomp-sirius-manager-model/src/main/xcore/server.xcore new file mode 100644 index 0000000..de3b243 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/server.xcore @@ -0,0 +1,119 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +package org.openecomp.ncomp.sirius.manager.server + +import org.openecomp.ncomp.core.JsonObject +import org.openecomp.ncomp.core.RemoteContext +import org.openecomp.ncomp.core.function.Function +import org.openecomp.ncomp.core.function.ValuePair +import org.openecomp.ncomp.core.logs.LogMessage +import org.openecomp.ncomp.core.logs.LogMessageRule +import org.openecomp.ncomp.core.metrics.MetricValueOption +import org.openecomp.ncomp.core.metrics.Metric +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty +import org.openecomp.ncomp.sirius.manager.properties.ModuleContainer +import org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate +import org.openecomp.ncomp.core.alerts.AlertingTemplate +import org.openecomp.ncomp.core.metrics.DoubleMetric +import org.openecomp.ncomp.component.Component + +annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel +annotation 'http://openecomp.org/sirius/doc' as doc + +class SouthBoundApiWithProxy extends SouthBoundApi { + op void uploadInfo(RemoteContext cx, ManagementInfo[] info) + +} + +class SouthBoundApi { + @doc(description="This operation allows the clients to report log messages + and overall state of the client") + op void logs( + @doc(description = "This parameter is for internal use and is ignored if set by client.") + RemoteContext cx, + @doc(description = "List of log message to inform the management system about.") + LogMessage[] logs + ) + @doc(description="This operation allows the client VMs to report metrics + and overall state of the VM") + op void metrics( + @doc(description = "This parameter is for internal use and is ignored if set by client.") + RemoteContext cx, + Metric[] metrics + ) + @doc(description = "Used by the BSA Management Agent to report + property key value pairs to the BSA Controller.") + op void properties( + @doc(description = "This parameter is for internal use and is ignored if set by client.") + RemoteContext cx, + AbstractProperty[] l + ) +} + +class ManagementInfo { + String ip + contains Metric[] metrics + contains LogMessage[] logs + contains AbstractProperty[] props +} + +class Response { + ResponseStatus status + String message +} + + +enum ResponseStatus { OK, WARN, ERROR } + + + + +class LoggerInfo { + String name +} + +class AbstractManagementServer extends SouthBoundApiWithProxy { + op DoubleMetric[] getValues(RemoteContext cx, String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) + op DoubleMetric[] getValuesAll(RemoteContext cx, String path, String[] metrics, Long start, Long end, MetricValueOption option, boolean relativeInterval) + op LogMessage[] getMessages(RemoteContext cx, String path, Long start, Long end) + op LoggerInfo getRequestLogger(String userName, String action, String resourcePath, JsonObject context) + op ValuePair[] evaluate(String path, Function function) + op void update(String path, Function function) + contains AbstractManagementServerConfiguration configuration + contains Component component +} + +class AbstractManagementServerConfiguration extends ModuleContainer { + contains LogMessageRule[] rules + contains unordered MetricValueOption[] metricOptions + contains AbstractTableTemplate[] tableTemplates + contains unordered AlertingTemplate[] alertTemplates + contains unordered Function[] functions +} + + + + + + diff --git a/ncomp-sirius-manager-model/src/main/xcore/swagger.xcore b/ncomp-sirius-manager-model/src/main/xcore/swagger.xcore new file mode 100644 index 0000000..29b7601 --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/swagger.xcore @@ -0,0 +1,175 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +package org.openecomp.ncomp.sirius.manager.swagger + +import org.openecomp.ncomp.core.NamedEntity + +annotation 'http://openecomp.org/ncomp/swagger' as swagger + +class SwaggerModel { + String swagger = "2.0" + contains SwaggerInfo info + String host + String basePath + contains SwaggerTag[] tags + String[] schemes + contains SwaggerPath[] paths + contains SwaggerNamedObjectType[] definitions + contains SwaggerExternalDocumentation externalDocs + contains SwaggerSecurityDefinition[] securityDefinitions +} + +class SwaggerInfo { + String description + String version + String title + String termsOfService + contains SwaggerContact contact + contains SwaggerLicense license +} + +class SwaggerContact { + String email +} + +class SwaggerLicense { + String name + String url +} + +class SwaggerTag { + String name + String description + contains SwaggerExternalDocumentation externalDocs +} + +class SwaggerExternalDocumentation { + String description + String url +} + +class SwaggerPath extends NamedEntity { + contains SwaggerOperation[] methods +} + +class SwaggerOperation extends NamedEntity { + String[] tags + String summary + String description + String operationId + String[] consumes + String[] produces + contains SwaggerParameter[] parameters + contains SwaggerResponse[] responses + contains SwaggerSecurityObject[] security + boolean deprecated = "false" +} + +class SwaggerParameter extends NamedEntity { + SwaggerParameterType in + contains SwaggerObjectType ^type +} + +enum SwaggerParameterType { + path, query, header, body, form, formData +} + +class SwaggerResponse extends NamedEntity { + String description + contains SwaggerObjectType schema + contains SwaggerSimpleObjectType[] headers +} + +class SwaggerSecurityObject { + contains SwaggerSecurity[] list +} + +class SwaggerSecurity extends NamedEntity { + String[] roles +} + +class SwaggerSecurityDefinition extends NamedEntity { + String ^type + String authorizationUrl + String flow + SwaggerParameterType in +// contains SwaggerSecurityDefinitionScope[] scopes +} + +class SwaggerSecurityDefinitionScope extends NamedEntity { + String description +} + +class SwaggerObjectType { + boolean many = "false" +} + +class SwaggerReferenceObjectType extends SwaggerNamedObjectType { + @swagger(name="$ref") + boolean required + refers SwaggerObjectType reference +} + +// object +class SwaggerNamedObjectType extends NamedEntity, SwaggerObjectType { + String ^type + String ^default + String description + contains SwaggerXml xml +} + +// object +class SwaggerObjectClassDefinition extends SwaggerNamedObjectType { + String[] required + refers SwaggerObjectType[] allOf + contains SwaggerNamedObjectType[] properties + contains SwaggerObjectType additionalProperties +} + +// string, integer, boolean +class SwaggerSimpleObjectType extends SwaggerNamedObjectType { + boolean required + String format + String minimum + String maximum + String pattern + String example + SwaggerCollectionFormat collectionFormat +} + +class SwaggerXml { + String name + boolean wrapped = "false" +} + +class SwaggerEnumObjectType extends SwaggerSimpleObjectType { + String[] ^enum +} + +enum SwaggerCollectionFormat { + csv, ssv, tsv, pipes, multi +} + + + diff --git a/ncomp-sirius-manager-model/src/main/xcore/table.xcore b/ncomp-sirius-manager-model/src/main/xcore/table.xcore new file mode 100644 index 0000000..ab60bbc --- /dev/null +++ b/ncomp-sirius-manager-model/src/main/xcore/table.xcore @@ -0,0 +1,76 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR 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-sirius-manager-model/src/main/xcore-gen") + +package org.openecomp.ncomp.sirius.manager.tableTemplate + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.logs.LogSeverity +import org.openecomp.ncomp.core.function.Iterator +import org.openecomp.ncomp.core.metrics.MetricValueOption +import org.openecomp.ncomp.core.logs.LogLevel + + +annotation "http://www.eclipse.org/emf/2002/GenModel" as GenModel +annotation 'http://openecomp.org/sirius/doc' as doc + +abstract class AbstractTableTemplate extends NamedEntity { + String treePath // e.g., /dataDepotServers/* + String tablePath // e.g., /reports/${/name} +} + +abstract class HasColumnsTableTemplate { + contains TableTemplateColumn[] columns +} + +class LogTableTemplate extends AbstractTableTemplate { + LogLevel minLevel + LogSeverity minSeverity + String prefixResourcePath // e.g., /dataDepotServers/${/name} + String duration + String aggregationDuration +} + +class TableTemplate extends AbstractTableTemplate, HasColumnsTableTemplate { + String rowPath // e.g., /dataDepotServers/${/name}/databases/*/tables +} + +class IteratorTableTemplate extends AbstractTableTemplate, HasColumnsTableTemplate { + contains Iterator iterator +} + +class TimeTableTemplate extends TableTemplate { + String duration +} + +abstract class TableTemplateColumn extends NamedEntity { +} + +class TableTemplateAttributeColumn extends TableTemplateColumn { + String path // eg. /name, ../../name +} + +class TableTemplateMetricColumn extends TableTemplateColumn { + String path // e.g. updatemanager/updateTime + refers MetricValueOption option +} + diff --git a/ncomp-sirius-manager-server/.classpath b/ncomp-sirius-manager-server/.classpath new file mode 100644 index 0000000..81fc615 --- /dev/null +++ b/ncomp-sirius-manager-server/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-sirius-manager-server/.gitignore b/ncomp-sirius-manager-server/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-sirius-manager-server/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-sirius-manager-server/.project b/ncomp-sirius-manager-server/.project new file mode 100644 index 0000000..7e1648e --- /dev/null +++ b/ncomp-sirius-manager-server/.project @@ -0,0 +1,34 @@ + + + ncomp-sirius-manager-server + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-sirius-manager-server/.settings/org.eclipse.core.resources.prefs b/ncomp-sirius-manager-server/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..839d647 --- /dev/null +++ b/ncomp-sirius-manager-server/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ncomp-sirius-manager-server/.settings/org.eclipse.jdt.core.prefs b/ncomp-sirius-manager-server/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec4300d --- /dev/null +++ b/ncomp-sirius-manager-server/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-sirius-manager-server/.settings/org.eclipse.m2e.core.prefs b/ncomp-sirius-manager-server/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-sirius-manager-server/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-sirius-manager-server/LICENSE.txt b/ncomp-sirius-manager-server/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-sirius-manager-server/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-sirius-manager-server/META-INF/MANIFEST.MF b/ncomp-sirius-manager-server/META-INF/MANIFEST.MF new file mode 100644 index 0000000..0efa0d0 --- /dev/null +++ b/ncomp-sirius-manager-server/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-sirius-manager-server +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.sirius.function, + org.openecomp.ncomp.sirius.gui.tools, + org.openecomp.ncomp.sirius.manager, + org.openecomp.ncomp.sirius.manager.logs, + org.openecomp.ncomp.sirius.manager.metrics, + org.openecomp.ncomp.sirius.manager.properties +Require-Bundle: org.eclipse.emf.common, + ncomp-core-model;bundle-version="0.1.0", + ncomp-sirius-manager-model;bundle-version="0.1.0", + ncomp-sirius-manager-drools;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0", + ncomp-core-types;bundle-version="0.1.0", + operation-utils, + ncomp-utils-java-extra, + ncomp-utils-journaling +Import-Package: junit.framework +Bundle-Vendor: %providerName diff --git a/ncomp-sirius-manager-server/build.properties b/ncomp-sirius-manager-server/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/ncomp-sirius-manager-server/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-sirius-manager-server/pom.xml b/ncomp-sirius-manager-server/pom.xml new file mode 100644 index 0000000..5296b3c --- /dev/null +++ b/ncomp-sirius-manager-server/pom.xml @@ -0,0 +1,170 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-server + 0.1.0-SNAPSHOT + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + 3.1 + + + + + + + + + + + org.openecomp.ncomp.utils + ncomp-utils-java + ${project.version} + + + org.eclipse.jetty + jetty-server + 8.1.17.v20150415 + + + + org.eclipse.jetty + jetty-client + 8.1.17.v20150415 + + + + + org.openecomp.ncomp.core + ncomp-core-model + ${project.version} + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-model + ${project.version} + + + junit + junit + 4.11 + + + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager-drools + ${project.version} + + + org.openecomp.dcae.operation + operation-utils + ${project.version} + + + org.openecomp.ncomp.utils + ncomp-utils-java-extra + ${project.version} + + + org.openecomp.ncomp.utils + ncomp-utils-journaling + ${project.version} + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/function/FunctionUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/function/FunctionUtils.java new file mode 100644 index 0000000..926723d --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/function/FunctionUtils.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.sirius.function; + + + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.json.JSONObject; + +import org.openecomp.ncomp.core.function.*; +import org.openecomp.ncomp.core.types.metrics.MetricAttribute; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.sirius.manager.metrics.MetricManager; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +public class FunctionUtils { + public static final Logger logger = Logger.getLogger(FunctionUtils.class); + + static public EList evaluate(EObject o, String path, Function function) { + return evaluate(o, path, function); + } + + static public EList evaluate(EObject o, String path, Function function, boolean debug) { + EList res = new BasicEList(); + for (EObject o1 : ManagementServer.findAll(o, path)) { + StringValuePair v = FunctionFactory.eINSTANCE.createStringValuePair(); + v.setPath(ManagementServer.object2ref(o1)); + v.setValue(evaluate(o1, function, debug)); + if (debug) + System.err.println("match0 " + v.getPath() + " " + v.getValue()); + res.add(v); + } + return res; + } + + static public void update(EObject o, String path, Function function) { + update(o, path, function); + } + + static public void update(EObject o, String path, Function function, boolean debug) { + for (EObject o1 : ManagementServer.findAll(o, path)) { + if (debug) + System.err.println("update0 " + ManagementServer.object2ref(o1)); + update(o1, function, debug); + } + } + + public static void update(Object o, Function function, boolean debug) { + if (function instanceof RuleUpdateFunction) { + RuleUpdateFunction e1 = (RuleUpdateFunction) function; + for (FunctionUpdateRule r : e1.getRules()) { + if (match(o, r.getMatches(), debug)) { + if (debug) { + System.err.println("match7 " + o + " matched " + r.getMatches()); + } + update(o, r.getUpdates(), debug); + return; + } + } + return; + } + throw new RuntimeException("Unsupported Function: " + function.getClass()); + } + + private static void update(Object o, EList updates, boolean debug) { + for (FunctionUpdate u : updates) { + if (u instanceof FunctionUpdateAttribute) { + FunctionUpdateAttribute u1 = (FunctionUpdateAttribute) u; + path2setValue(o, u1.getPath(), u1.getValue(), debug); + } + } + + } + + public static String evaluate(Object r, Function filter) { + return evaluate(r, filter, false); + } + + static public String evaluate(Object o, Function function, boolean debug) { + if (function instanceof RuleFunction) { + RuleFunction e1 = (RuleFunction) function; + for (FunctionRule r : e1.getRules()) { + if (match(o, r.getMatches(), debug)) + return value(r.getAction()); + } + return null; + } + throw new RuntimeException("Unsupported Function: " + function.getClass()); + } + + private static boolean match(Object o, EList l, boolean debug) { + for (FunctionMatch m : l) { + if (!match(o, m, debug)) + return false; + } + return true; + } + + private static boolean match(Object o, FunctionMatch m, boolean debug) { + if (debug) + System.err.println("match2 " + o + " " + m); + if (m instanceof FunctionMatchAttribute) { + FunctionMatchAttribute m1 = (FunctionMatchAttribute) m; + Object o1 = path2value(o, m1.getPath(), debug); + if (debug) + System.err.println("match4 " + m1 + " " + o1 + " " + (o1 != null ? o1.getClass() : "NULL")); + if (o1 instanceof String) { + String v = (String) o1; + if (debug) + System.err.println("match5 " + v.matches(m1.getMatch())); + return m1.isNegation() ^ v.matches(m1.getMatch()); + } + if (o1 instanceof Enumerator || o1 instanceof Integer || o1 instanceof Long || o1 instanceof Boolean) { + if (debug) + System.err.println("match6 " + o1.toString().matches(m1.getMatch())); + return m1.isNegation() ^ o1.toString().matches(m1.getMatch()); + } + // TODO need to report error but only one for each find. + return false; + } + if (m instanceof FunctionMatchMetric && o instanceof EObject) { + FunctionMatchMetric m1 = (FunctionMatchMetric) m; + Object o1 = path2value(o, m1.getPath(), debug); + if (debug) + System.err.println("match4m " + m1 + " " + o1 + " " + (o1 != null ? o1.getClass() : "NULL")); + if (o1 instanceof MetricAttribute) { + double v = MetricManager.getValue((EObject) o, m1.getPath(), m1.getOption()); + if (debug) + System.err.println("match4mm " + m1 + " " + v); + if (m1.getLowerBound() != null && m1.getLowerBound() > v) + return m1.isNegation() ^ false; + if (m1.getUpperBound() != null && m1.getUpperBound() < v) + return m1.isNegation() ^ false; + return m1.isNegation() ^ true; + } + return false; + } + if (m instanceof FunctionMatchInstanceOf) { + FunctionMatchInstanceOf m1 = (FunctionMatchInstanceOf) m; + try { + Class cls = Class.forName(m1.getEPackage()); + EPackage ePackage = (EPackage) cls.getDeclaredField("eINSTANCE").get(null); + EClass eClass = (EClass) ePackage.getEClassifier(m1.getEName()); + EObject o1 = (EObject) o; + // if (o1.eClass().getName().contains("Location")) { + // System.err.println("YYYY: " + o1.eClass() + " " + eClass + + // " " + o1.eClass().isInstance(eClass)+ " " + + // eClass.isInstance(o1.eClass()) + // + " " + o1.eClass().getESuperTypes().contains(eClass)); + // System.err.println("YYYY: " + eClass.getESuperTypes()); + // System.err.println("YYYY: " + o1.eClass().getESuperTypes()); + // } + // NOTE o1.eClass().isInstance(eClass); does not seem to work. + return o1.eClass().getEAllSuperTypes().contains(eClass); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("bad class name: " + m1.getEPackage() + "@" + m1.getEName()); + } + } + throw new RuntimeException("Unsupported FunctionMatch: " + m.getClass()); + } + + private static Object path2value(Object o, String path, boolean debug) { + if (o instanceof EObject) { + EObject o1 = (EObject) o; + Subject s1 = ManagementServer.find(o1, path); + if (debug) + System.err.println("match1 " + path + " " + s1); +// if (path.contains("/category")) { +// if (o1 instanceof LogMessageState) { +// LogMessageState o2 = (LogMessageState) o1; +// if (debug) +// System.err.println("match1 " + ManagementServer.ecore2json(o2.getCategory(), 5, null, true).toString(2)); +// } +// if (debug) +// System.err.println("match1 " + o1 + " " + ManagementServer.ecore2json(o1, 5, null, true)); +// } + if (s1 == null || s1.o == null || s1.attr == null) { + // TODO need to report error but only one for each find. + return false; + } + return s1.o.eGet(s1.attr); + } + if (o instanceof JSONObject) { + return JsonUtils.getValue((JSONObject) o, path.substring(1).replace("/", ".")); + } + throw new RuntimeException("Unsupported class: " + o.getClass()); + } + + private static void path2setValue(Object o, String path, String value, boolean debug) { + if (o instanceof EObject) { + EObject o1 = (EObject) o; + Subject s1 = ManagementServer.find(o1, path); + if (debug) + System.err.println("match1 " + path + " " + s1); + if (s1 == null || s1.o == null || s1.attr == null) { + // TODO need to report error but only one for each find. + return; + } + s1.o.eSet(s1.attr, ManagementServer.jsonValue2attrValue(s1.attr.getEAttributeType(), value)); + return; + } + if (o instanceof JSONObject) { + throw new RuntimeException("JSON object not supported object type"); + // return JsonUtils.getValue((JSONObject) o, + // path.substring(1).replace("/", ".")); + } + throw new RuntimeException("Unsupported class: " + o.getClass()); + } + + private static String value(FunctionAction action) { + if (action == null) + throw new RuntimeException("null action"); + return action.getValue(); + } +} + diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java new file mode 100644 index 0000000..3d8049a --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiModelUtils.java @@ -0,0 +1,646 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.gui.tools; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.core.function.IteratorUsingFunction; +import org.openecomp.ncomp.core.logs.*; +import org.openecomp.ncomp.core.types.metrics.*; +import org.openecomp.ncomp.core.metrics.*; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.sirius.manager.*; +import org.openecomp.ncomp.sirius.manager.metrics.MetricManager; +import org.openecomp.ncomp.sirius.manager.tableTemplate.*; +import org.openecomp.ncomp.sirius.manager.server.*; +import org.openecomp.ncomp.utils.SortUtil; +import org.openecomp.ncomp.utils.maps.HashMapMapMap; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +public class GuiModelUtils { + public static final Logger logger = Logger.getLogger(GuiModelUtils.class); + static ModelFactory f = ModelFactory.eINSTANCE; + + static GuiTree ecore2GuiTree(EObject ecore, int levels, @SuppressWarnings("rawtypes") Map options) { + GuiTree tree = f.createGuiTree(); + tree.getSections().addAll(ecore2node(ecore, levels, options).getChildren()); + return tree; + } + + @SuppressWarnings("rawtypes") + static void addEcore2GuiTree(GuiTree t, String path, EObject ecore, int levels, Map options) { + Subject s = ManagementServer.find(t, path); + if (s == null || s.o == null) { + logger.warn("Unable to find " + path + " " + t); + return; + } + GuiTreeNode n = (GuiTreeNode) s.o; + addEcore2GuiTree(n, ecore, levels, options); + } + + @SuppressWarnings("rawtypes") + static void addEcore2GuiTree(GuiTreeNode n, EObject ecore, int levels, Map options) { + n.getChildren().addAll(ecore2node(ecore, levels, options).getChildren()); + } + + @SuppressWarnings("rawtypes") + static void addEList2GuiTree(GuiTreeNode n, EList l, int levels, Map options) { + for (EObject ecore : l) { + n.getChildren().add(ecore2node(ecore, levels, options)); + } + } + + static GuiTreeNode addNode2GuiTree(GuiTree t, String path, String name) { + Subject s = ManagementServer.find(t, path); + if (s == null || s.o == null) { + logger.warn("Unable to find " + path + " " + t); + return null; + } + GuiTreeNode n = (GuiTreeNode) s.o; + GuiTreeNode n1 = f.createGuiTreeNode(); + n.getChildren().add(n1); + n1.setNodeName(name); + return n1; + } + + @SuppressWarnings("rawtypes") + private static GuiTreeNode ecore2node(EObject ecore, int levels, Map options) { + if (options == null) + options = new HashMap(); + GuiTreeNode n = f.createGuiTreeNode(); + EAttribute attr = (EAttribute) ecore.eClass().getEStructuralFeature("name"); + if (attr != null) { + n.setNodeName((String) ecore.eGet(attr)); + } + if (n.getNodeName() == null) { + n.setNodeName("NONAME"); + } + for (EReference ref : ecore.eClass().getEAllContainments()) { + Map options1 = newOptions(options, ref.getName()); + int levels1 = newLevels(options1, levels); + if (levels1 == 0) + continue; + GuiTreeNode n1 = f.createGuiTreeNode(); + n1.setNodeName(ref.getName()); + n.getChildren().add(n1); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) ecore.eGet(ref); + for (EObject o : l) + n1.getChildren().add(ecore2node(o, levels1, options1)); + } else { + EObject o = (EObject) ecore.eGet(ref); + if (o != null) { + GuiTreeNode nn = ecore2node(o, levels1, options1); + n1.getChildren().addAll(nn.getChildren()); + } + } + } + return n; + } + + @SuppressWarnings("rawtypes") + private static int newLevels(Map options1, int levels) { + return options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels - 1; + } + + @SuppressWarnings("rawtypes") + private static Map newOptions(Map options, String name) { + Object o = options.get(name); + if (!(o instanceof Map)) + return new HashMap(); + return (Map) o; + } + + @SuppressWarnings("rawtypes") + public static GuiObject ecore2GuiObject(EObject ecore, int levels, Map options) { + GuiObject n = f.createGuiObject(); + add2GuiObject(n, ecore, levels, options); + return n; + + } + + public static GuiObject addNode2GuiObject(GuiObject o, String name) { + GuiObject n = f.createGuiObject(); + GuiObjectValueObject v = f.createGuiObjectValueObject(); + v.setV(n); + v.setValueName(name); + o.getValues().add(v); + return n; + } + + @SuppressWarnings("rawtypes") + public static void add2GuiObject(GuiObject n, EObject ecore, int levels, Map options) { + if (levels == 0) + return; + if (options == null) + options = new HashMap(); + Date now = new Date(); + for (EAttribute attr : ecore.eClass().getEAllAttributes()) { + if (hasChildWithName(n, attr.getName())) + continue; + Object o = ecore.eGet(attr); + if (o instanceof IncreasingULongMetricAttribute) { + IncreasingULongMetricAttribute m = (IncreasingULongMetricAttribute) o; + // System.err.println("HERE88: " + m); + m.getValue(); + String delay = m.last == null ? "" : " [" + DateUtils.delay2String(now.getTime() - m.last.getTime()) + "]"; + try { + addTimeSeries(n, ecore, attr, Double.toString(m == null ? -999999.9 : m.getValue()) + delay); + } catch (Exception e) { + System.err.println("HERE88: " + m + " " + new Date()); + if (m != null) + System.err.println("HERE88: " + m.getValue()); + ManagementServerUtils.printStackTrace(e); + } + continue; + } + if (o instanceof LongMetricAttribute) { + LongMetricAttribute m = (LongMetricAttribute) o; + if (m.getValue() == null) + continue; + String delay = m.last == null ? "" : " [" + DateUtils.delay2String(now.getTime() - m.last.getTime()) + "]"; + addTimeSeries(n, ecore, attr, Long.toString(m.getValue()) + delay); + continue; + } + if (o instanceof DoubleMetricAttribute) { + DoubleMetricAttribute m = (DoubleMetricAttribute) o; + m.getValue(); + String delay = m.last == null ? "" : " [" + DateUtils.delay2String(now.getTime() - m.last.getTime()) + "]"; + addTimeSeries(n, ecore, attr, Double.toString(m.getValue()) + delay); + continue; + } + if (o instanceof DateMetricAttribute) { + DateMetricAttribute m = (DateMetricAttribute) o; + Long t = m.getValue(); + if (t != null) { + Date d = new Date(t); + DateUtils.delay2String(now.getTime() - t); + addTimeSeries(n, ecore, attr, d.toString() + " " + DateUtils.delay2String(now.getTime() - t)); + continue; + } + } + addString(n, attr.getName(), o == null ? "" : ecore.eGet(attr).toString()); + } + for (EReference ref : ecore.eClass().getEAllReferences()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) ecore.eGet(ref); + if (l.size() == 0) { + addString(n, ref.getName(), "Empty"); + continue; + } + if (!ref.isContainment()) { + Map options1 = (Map) options.get(ref.getName()); + int j = 0; + for (EObject o : l) { + if (options1 == null) { + addString(n, ref.getName() + " #" + j++, + "Reference " + o.eClass().getName() + ":" + ManagementServer.object2ref(o)); + continue; + } + // TODO + // int levels1 =options1.containsKey("LEVELS") ? + // (Integer) options1.get("LEVELS") : levels -1; + // add2GuiObject(n1, o, levels1,options1); + } + continue; + } + GuiObjectNamedList n1 = f.createGuiObjectNamedList(); + n1.setValueName(ref.getName()); + n.getValues().add(n1); + int j = 0; + for (EObject o : l) { + GuiNamedObject n2 = f.createGuiNamedObject(); + EAttribute attr = (EAttribute) o.eClass().getEStructuralFeature("name"); + if (attr == null) { + n2.setObjectName("#" + j++); + } else + n2.setObjectName((String) o.eGet(attr)); + add2GuiObject(n2, o, levels - 1, (Map) options.get(ref.getName())); + n1.getObjects().add(n2); + } + } else { + EObject o = (EObject) ecore.eGet(ref); + if (o == null) { + addString(n, ref.getName(), "Null"); + continue; + } + if (!ref.isContainment()) { + Map options1 = (Map) options.get(ref.getName()); + if (options1 == null) { + addString(n, ref.getName(), "Reference " + o.eClass().getName() + ":" + ManagementServer.object2ref(o)); + continue; + } + int levels1 = options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels - 1; + if (options1.containsKey("NAME")) { + // Add another level + GuiObjectValueObject n1 = f.createGuiObjectValueObject(); + n.getValues().add(n1); + n1.setValueName((String) options1.get("NAME")); + n1.setV(f.createGuiObject()); + add2GuiObject(n1.getV(), o, levels1, options1); + continue; + } + add2GuiObject(n, o, levels1, options1); + continue; + } + GuiObjectValueObject n1 = f.createGuiObjectValueObject(); + n.getValues().add(n1); + n1.setValueName(ref.getName()); + n1.setV(f.createGuiObject()); + add2GuiObject(n1.getV(), o, levels - 1, (Map) options.get(ref.getName())); + } + } + } + + private static boolean hasChildWithName(GuiObject n, String name) { + for (GuiObjectValue v : n.getValues()) { + if (v.getValueName().equals(name)) + return true; + } + return false; + } + + private static void addTimeSeries(GuiObject n, EObject ecore, EAttribute attr, String v) { + GuiObjectValueTimeSeries t = f.createGuiObjectValueTimeSeries(); + t.setValueName(attr.getName()); + t.setPath(ManagementServer.object2ref(ecore) + "/" + attr.getName()); + t.setV(v); + n.getValues().add(t); + } + + private static void addString(GuiObject n, String name, String v) { + GuiObjectValueString n1 = f.createGuiObjectValueString(); + n1.setV(v); + n1.setValueName(name); + n.getValues().add(n1); + } + + public static void printTree(GuiTree t) { + for (GuiTreeNode n : t.getSections()) { + printTreeNode(n, ""); + } + } + + private static void printTreeNode(GuiTreeNode t, String indent) { + System.out.println(indent + t.getNodeName()); + for (GuiTreeNode n : t.getChildren()) { + printTreeNode(n, " " + indent); + } + } + + public static String attr2unit(EAttribute attr) { + EAnnotation anno = attr.getEAnnotation("http://openecomp.org/sirius/doc"); + if (anno == null) + return ""; + String unit = anno.getDetails().get("unit"); + return unit == null ? "" : unit; + } + + public static GuiTimeSerie getTimeSerie(ManagementServer s, String path, String start, String end, String duration) { + + GuiTimeSerie t = f.createGuiTimeSerie(); + Date start1 = DateUtils.dateFromString(start); + Date end1 = DateUtils.dateFromString(end); + if (duration == null) + duration = ""; + long duration2 = duration.length() > 0 ? DateUtils.stringToDuration(duration) : 0; + if (duration2 > 0) { + start1.setTime(start1.getTime() / duration2 * duration2); + end1.setTime(end1.getTime() / duration2 * duration2 + duration2); + } + MetricsFactory ff = MetricsFactory.eINSTANCE; + AggregationMetricValueOption option = ff.createAggregationMetricValueOption(); + SequenceMetricValueOption seq = ff.createSequenceMetricValueOption(); + seq.getOptions().add(ff.createBasicMetricValueOption()); + seq.getOptions().add(option); + option.setDuration(duration); + option.setAggregationType(AggregationMetricValueOptionType.AVERAGE); + EList values = s.metrics.getValues(path, start1.getTime(), end1.getTime(), seq,false); + Subject s1 = s.find(path); + for (DoubleMetric d : values) { + GuiTimeSerieData dd; + dd = ModelFactory.eINSTANCE.createGuiTimeSerieData(); + dd.setTime(new Date(d.getTime())); + t.getData().add(dd); + dd.setValue(d.getValue()); + } + t.setName(s1.attr.getName()); + t.setXAxisLabel("GMT"); + t.setYAxisLabel(attr2unit(s1.attr)); + return t; + } + + public static GuiTable logsReport(ManagementServer s, String path, Date start, Date end, LogLevel minLogLevel, LogSeverity minLogSeverity) { + System.err.println(path + " " +start + " " +end + " " +minLogLevel + " " +minLogSeverity); + GuiTableUtil table = new GuiTableUtil(); + GuiTableColumn c; + c = table.addColumn("Time", GuiTableColumnType.STRING); + c.setWidth(20); + c = table.addColumn("Level", GuiTableColumnType.STRING); + c.setWidth(10); + c = table.addColumn("Severity", GuiTableColumnType.STRING); + // c.setHidden(true); + c.setWidth(10); + c = table.addColumn("Path", GuiTableColumnType.STRING); + c.setWidth(80); + c = table.addColumn("Message", GuiTableColumnType.STRING); + for (LogMessage m : s.logs.getMessages(path, start, end)) { + if (minLogLevel != LogLevel.UNKNOWN && m.getLevel().ordinal() < minLogLevel.ordinal()) continue; + if (minLogSeverity != LogSeverity.UNKNOWN && (m.getSeverity() == LogSeverity.UNKNOWN || m.getSeverity().ordinal() > minLogSeverity.ordinal())) continue; + table.newRow(); + table.addCellDate(m.getTime()); + table.addCell(m.getLevel().toString()); + table.addCell(m.getSeverity().toString()); + table.addCell(m.getResourceName()); + table.addCell(m.getMessage().replaceFirst("\\[.*?\\] ","").replaceFirst("[a-zA-Z0-9.]*:[0-9]+$","")); + } + return table.getTable(); + } + + public static GuiTable logsReportHourly(ManagementServer s, String path, Date start, Date end, String duration, LogLevel minLogLevel, LogSeverity minLogSeverity) { + long duration2 = DateUtils.stringToDuration(duration); + GuiTableUtil table = new GuiTableUtil(); + GuiTableColumn c; + c = table.addColumn("Last Time", GuiTableColumnType.STRING); + c.setWidth(20); + c = table.addColumn("First Time", GuiTableColumnType.STRING); + c.setWidth(20); + c.setHidden(true); + c = table.addColumn("Level", GuiTableColumnType.STRING); + c.setWidth(10); + c = table.addColumn("Severity", GuiTableColumnType.STRING); + // c.setHidden(true); + c.setWidth(10); + c = table.addColumn("Path", GuiTableColumnType.STRING); + c.setWidth(80); + c = table.addColumn("Number", GuiTableColumnType.DOUBLE); + c.setWidth(15); + c.setFormat("#,##0"); + c = table.addColumn("Message", GuiTableColumnType.STRING); + HashMap> map = new HashMap>(); + List firstList = new ArrayList(); + for (LogMessage m : s.logs.getMessages(path, start, end)) { + if (minLogLevel != LogLevel.UNKNOWN && m.getLevel().ordinal() < minLogLevel.ordinal()) continue; + if (minLogSeverity != LogSeverity.UNKNOWN && (m.getSeverity() == LogSeverity.UNKNOWN || m.getSeverity().ordinal() > minLogSeverity.ordinal())) continue; + String k = messageKey(m, duration2); + List l = map.get(k); + if (l == null) { + l = new ArrayList(); + map.put(k, l); + firstList.add(m); + } + l.add(m); + } + for (LogMessage m : firstList) { + List l = map.get(messageKey(m, duration2)); + LogMessage first = l.get(l.size() - 1); + table.newRow(); + table.addCellDate(m.getTime()); + table.addCellDate(first.getTime()); + table.addCell(m.getLevel().toString()); + table.addCell(m.getSeverity().toString()); + table.addCell(m.getResourceName()); + table.addCell((double) l.size()); + table.addCell(m.getMessage().replaceFirst("\\[.*?\\] ","").replaceFirst("[a-zA-Z0-9.]*:[0-9]+$","")); + } + return table.getTable(); + } + + private static String messageKey(LogMessage m, long duration2) { + String k = m.getResourceName() + ":" + m.getLevel().toString() + ":" + m.getSeverity().toString() + ":" + (m.getTime() / duration2) + + ":" + m.getMessage().replaceAll("Exchange@[0-9a-f]+", "EEE").replaceAll("[0-9]+", "NNN"); + // System.out.println(m.getMessage() + " -> " + k); + return k; + } + + public static void addTree(GuiTreeUtil tree) { + tree.addSection("reports", GuiView.NONE); + tree.addNode("/reports", "logsReport", GuiView.TABLE); + tree.addNode("/reports", "logsReportHourly", GuiView.TABLE); + tree.addNode("/reports", "logsReportDaily", GuiView.TABLE); + } + + public static GuiTable getTable(ManagementServer s, String path, String start, String end) { + AbstractManagementServer c = (AbstractManagementServer) s.getObject(); + for (AbstractTableTemplate t : c.getConfiguration().getTableTemplates()) { + for (EObject o : s.findAll(t.getTreePath())) { + String treePath = ManagementServer.expandPath(o, t.getTablePath(), "$"); + if (treePath.equals(path)) { + if (t instanceof LogTableTemplate) { + LogTableTemplate logTable = (LogTableTemplate) t; + // TODO handle real parameters. + Date start1 = DateUtils.dateFromString(logTable.getDuration()); + Date end1 = new Date(); + if (end1.before(start1)) { + logger.warn("start after end"); + } + String prefix = ManagementServer.expandPath(o, logTable.getPrefixResourcePath(), "$"); + if (logTable.getAggregationDuration() != null) { + return logsReportHourly(s, prefix, start1, end1, logTable.getAggregationDuration(), logTable.getMinLevel(), logTable.getMinSeverity()); + } else { + return logsReport(s, prefix, start1, end1, logTable.getMinLevel(), logTable.getMinSeverity()); + } + } + if (t instanceof TimeTableTemplate) { + return tableFromTimeTemplate(s,o,(TimeTableTemplate) t); + } + if (t instanceof IteratorTableTemplate) { + return tableFromIteratorTableTemplate(s,o,(IteratorTableTemplate) t); + } + if (t instanceof TableTemplate) { + return tableFromTemplate(s,o,(TableTemplate) t); + } + } + } + } + if (path.startsWith("/reports/logsReportHourly")) { + // TODO handle parameters. + return logsReportHourly(s, "", DateUtils.dateFromString("-24hour"), new Date(), "1hour",LogLevel.DEBUG,LogSeverity.SEV4); + } + if (path.startsWith("/reports/logsReportDaily")) { + // TODO handle parameters. + return logsReportHourly(s, "", DateUtils.dateFromString("-7day"), new Date(), "1day",LogLevel.DEBUG,LogSeverity.SEV4); + } + if (path.startsWith("/reports/logsReport")) { + // TODO handle parameters. + return logsReport(s, "", DateUtils.dateFromString("-24hour"), new Date(),LogLevel.DEBUG,LogSeverity.SEV4); + } + throw new RuntimeException("Unable to create table: " + path); + } + + private static GuiTable tableFromIteratorTableTemplate(ManagementServer s, EObject o, IteratorTableTemplate t) { + System.err.println("tableFromTemplate: " + ManagementServer.object2ref(o) + " " + ManagementServer.object2ref(t)); + GuiTableUtil table = new GuiTableUtil(); + addTemplateColumns(table,t); + if (! (t.getIterator() instanceof IteratorUsingFunction)) { + throw new RuntimeException("Unsupported iterator:" + t.getIterator().getClass()); + } + IteratorUsingFunction ii = (IteratorUsingFunction) t.getIterator(); + for (String path : ii.getPaths()) { + for (EObject row : s.findAll(path)) { + if (ii.isRecursive()) { + for (EObject r : ManagementServer.object2containedObjects(row)) { + if (FunctionUtils.evaluate(r, ii.getFilter()).toLowerCase().equals("true")) + tableAddRow(s,r,table,t); + } + } + else { + if (FunctionUtils.evaluate(row, ii.getFilter()).toLowerCase().equals("true")) + tableAddRow(s,row,table,t); + } + } + } + return table.getTable(); + } + + private static void tableAddRow(ManagementServer s, EObject row, GuiTableUtil table, HasColumnsTableTemplate t) { + table.newRow(); + for (TableTemplateColumn col: t.getColumns()) { + if (col instanceof TableTemplateAttributeColumn) { + addAttributeCell(table,row,(TableTemplateAttributeColumn) col); + continue; + } + if (col instanceof TableTemplateMetricColumn) { + TableTemplateMetricColumn col1 = (TableTemplateMetricColumn) col; + Subject s1 = ManagementServer.find(row,col1.getPath()); + if (s1 == null || s1.o == null|| s1.attr == null) { + table.addCell(-5.0); + continue; + } + Object a = s1.o.eGet(s1.attr); + if (a instanceof MetricAttribute) + table.addCell(s.metrics.getValue(row,col1.getPath(),col1.getOption())); + else + table.addCell(-4.0); + continue; + } + table.addCell("??"); + } + + } + + private static GuiTable tableFromTimeTemplate(ManagementServer s, EObject o, TimeTableTemplate t) { + System.err.println("tableFromTemplate: " + ManagementServer.object2ref(o) + " " + ManagementServer.object2ref(t)); + GuiTableUtil table = new GuiTableUtil(); + table.addColumn("Time", GuiTableColumnType.DATE); + addTemplateColumns(table,t); + List rows = s.findAll(t.getRowPath()); + HashMapMapMap values = new HashMapMapMap(); + Long end = new Date().getTime(); + Long start = end - DateUtils.stringToDuration(t.getDuration()); + for (EObject row : rows) { + for (TableTemplateColumn col: t.getColumns()) { + if (col instanceof TableTemplateMetricColumn) { + TableTemplateMetricColumn col1 = (TableTemplateMetricColumn) col; + Subject s1 = ManagementServer.find(row,col1.getPath()); + if (s1 == null || s1.o == null|| s1.attr == null) + continue; + Object a = s1.o.eGet(s1.attr); + if (!(a instanceof MetricAttribute)) continue; + for (DoubleMetric d : MetricManager.getValues(row,start, end, col1.getPath(),col1.getOption(),false)){ + values.insert(d.getTime(), col, row, d.getValue()); + } + } + } + } + for (long tt : SortUtil.sort(values.keySet())) { + for (EObject row : rows) { + table.newRow(); + table.addCellDate(tt); + for (TableTemplateColumn col: t.getColumns()) { + if (col instanceof TableTemplateAttributeColumn) { + addAttributeCell(table,row,(TableTemplateAttributeColumn) col); + continue; + } + if (col instanceof TableTemplateMetricColumn) { + Double d = values.get(tt,col,row); + table.addCell(d == null ? -4.0 : d); + continue; + } + table.addCell("??"); + } + } + } + return table.getTable(); + } + + private static void addAttributeCell(GuiTableUtil table, EObject row, TableTemplateAttributeColumn col) { + TableTemplateAttributeColumn col1 = (TableTemplateAttributeColumn) col; + if (col1.getPath().equals("$path")) { + table.addCell(ManagementServer.object2ref(row)); + return; + } + if (col1.getPath().equals("$class")) { + table.addCell(row.eClass().getInstanceClassName()); + return; + } + Subject s1 = ManagementServer.find(row, col1.getPath()); + if (s1 == null || s1.o == null || s1.attr == null) + table.addCell("ERROR"); + else + table.addCell(s1.o.eGet(s1.attr)); + } + + private static void addTemplateColumns(GuiTableUtil table, HasColumnsTableTemplate t) { + for (TableTemplateColumn col: t.getColumns()) { + GuiTableColumn c = null; + if (col instanceof TableTemplateAttributeColumn) { + TableTemplateAttributeColumn col1 = (TableTemplateAttributeColumn) col; + c = table.addColumn(col1.getName(), GuiTableColumnType.STRING); + } + if (col instanceof TableTemplateMetricColumn) { + TableTemplateMetricColumn col1 = (TableTemplateMetricColumn) col; + c = table.addColumn(col1.getName(), GuiTableColumnType.DOUBLE); + } + if (c == null) { + c = table.addColumn(col.getName(), GuiTableColumnType.STRING); + } +// c.setWidth(20); + } + } + + private static GuiTable tableFromTemplate(ManagementServer s, EObject o, TableTemplate t) { + System.err.println("tableFromTemplate: " + ManagementServer.object2ref(o) + " " + ManagementServer.object2ref(t)); + GuiTableUtil table = new GuiTableUtil(); + addTemplateColumns(table,t); + for (EObject row : s.findAll(t.getRowPath())) { + tableAddRow(s,row,table,t); + } + return table.getTable(); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiObjectUtil.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiObjectUtil.java new file mode 100644 index 0000000..9dc9f6b --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiObjectUtil.java @@ -0,0 +1,274 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.gui.tools; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +import org.openecomp.ncomp.core.types.metrics.*; +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.Subject; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +public class GuiObjectUtil { + public static final Logger logger = Logger.getLogger(GuiObjectUtil.class); + static ModelFactory f = ModelFactory.eINSTANCE; + + static GuiTree ecore2GuiTree(EObject ecore, int levels, @SuppressWarnings("rawtypes") Map options) { + GuiTree tree = f.createGuiTree(); + tree.getSections().addAll(ecore2node(ecore,levels,options).getChildren()); + return tree; + } + + @SuppressWarnings("rawtypes") + static void addEcore2GuiTree(GuiTree t, String path, EObject ecore, int levels, Map options) { + Subject s = ManagementServer.find(t, path); + if (s == null || s.o == null) { + logger.warn("Unable to find " + path + " " + t); + return; + } + GuiTreeNode n = (GuiTreeNode) s.o; + addEcore2GuiTree(n,ecore,levels,options); + } + @SuppressWarnings("rawtypes") + static void addEcore2GuiTree(GuiTreeNode n, EObject ecore, int levels, Map options) { + n.getChildren().addAll(ecore2node(ecore,levels,options).getChildren()); + } + @SuppressWarnings("rawtypes") + static void addEList2GuiTree(GuiTreeNode n, EList l, int levels, Map options) { + for (EObject ecore: l) { + n.getChildren().add(ecore2node(ecore,levels,options)); + } + } + static GuiTreeNode addNode2GuiTree(GuiTree t, String path, String name) { + Subject s = ManagementServer.find(t, path); + if (s == null || s.o == null) { + logger.warn("Unable to find " + path + " " + t); + return null; + } + GuiTreeNode n = (GuiTreeNode) s.o; + GuiTreeNode n1 = f.createGuiTreeNode(); + n.getChildren().add(n1); + n1.setNodeName(name); + return n1; + } + @SuppressWarnings("rawtypes") + private static GuiTreeNode ecore2node(EObject ecore, int levels, Map options) { + if (options == null) options = new HashMap(); + GuiTreeNode n = f.createGuiTreeNode(); + EAttribute attr = (EAttribute) ecore.eClass().getEStructuralFeature("name"); + if (attr != null) { + n.setNodeName((String) ecore.eGet(attr)); + } + if (n.getNodeName() == null) { + n.setNodeName("NONAME"); + } + for (EReference ref : ecore.eClass().getEAllContainments()) { + Map options1 = newOptions(options,ref.getName()); + int levels1 = newLevels(options1,levels); + if (levels1 == 0) continue; + GuiTreeNode n1 = f.createGuiTreeNode(); + n1.setNodeName(ref.getName()); + n.getChildren().add(n1); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) ecore.eGet(ref); + for (EObject o : l) + n1.getChildren().add(ecore2node(o,levels1,options1)); + } else { + EObject o = (EObject) ecore.eGet(ref); + if (o != null) { + GuiTreeNode nn = ecore2node(o,levels1,options1); + n1.getChildren().addAll(nn.getChildren()); + } + } + } + return n; + } + + @SuppressWarnings("rawtypes") + private static int newLevels(Map options1, int levels) { + return options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels - 1; + } + + @SuppressWarnings("rawtypes") + private static Map newOptions(Map options, String name) { + Object o = options.get(name); + if (! (o instanceof Map)) return new HashMap(); + return (Map) o; + } + + @SuppressWarnings("rawtypes") + public static GuiObject ecore2GuiObject(EObject ecore, int levels, Map options) { + GuiObject n = f.createGuiObject(); + add2GuiObject(n, ecore, levels, options); + return n; + + } + + public static GuiObject addNode2GuiObject(GuiObject o, String name) { + GuiObject n = f.createGuiObject(); + GuiObjectValueObject v = f.createGuiObjectValueObject(); + v.setV(n); + v.setValueName(name); + o.getValues().add(v); + return n; + } + @SuppressWarnings("rawtypes") + public static void add2GuiObject(GuiObject n, EObject ecore, int levels, Map options) { + if (levels == 0) return; + if (options == null) options = new HashMap(); + for (EAttribute attr : ecore.eClass().getEAllAttributes()) { + Object o = ecore.eGet(attr); + if (o instanceof IncreasingULongMetricAttribute) { + IncreasingULongMetricAttribute m = (IncreasingULongMetricAttribute) o; + addTimeSeries(n,ecore,attr,Double.toString(m == null ? -999999.9 : m.getValue())); + continue; + } + if (o instanceof LongMetricAttribute) { + LongMetricAttribute m = (LongMetricAttribute) o; + addTimeSeries(n,ecore,attr,Long.toString(m.getValue())); + continue; + } + if (o instanceof DoubleMetricAttribute) { + DoubleMetricAttribute m = (DoubleMetricAttribute) o; + addTimeSeries(n,ecore,attr,Double.toString(m.getValue())); + continue; + } + if (o instanceof DateMetricAttribute) { + DateMetricAttribute m = (DateMetricAttribute) o; + long t = m.getValue(); + Date d = new Date(t); + Date now = new Date(); + DateUtils.delay2String(now.getTime()-t); + addTimeSeries(n,ecore,attr,d.toString() + " " + DateUtils.delay2String(now.getTime()-t)); + continue; + } + addString(n,attr.getName(),o == null ? "" : ecore.eGet(attr).toString()); + } + for (EReference ref : ecore.eClass().getEAllReferences()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) ecore.eGet(ref); + if (l.size() == 0) { + addString(n,ref.getName(),"Empty"); + continue; + } + if (! ref.isContainment()) { + Map options1 = (Map) options.get(ref.getName()); + for (EObject o : l) { + int j = 0; + if (options1 == null) { + addString(n,ref.getName() + " #" + j, "Reference " + o.eClass().getName() + ":" + ManagementServer.object2ref(o)); + continue; + } +// TODO +// int levels1 =options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels -1; +// add2GuiObject(n1, o, levels1,options1); + } + continue; + } + GuiObjectNamedList n1 = f.createGuiObjectNamedList(); + n1.setValueName(ref.getName()); + n.getValues().add(n1); + for (EObject o : l) { + GuiNamedObject n2 = f.createGuiNamedObject(); + EAttribute attr = (EAttribute) o.eClass().getEStructuralFeature("name"); + if (attr == null) { + logger.warn("Class without name: " + o.eClass().getName()); + continue; + } + n2.setObjectName((String) o.eGet(attr)); + add2GuiObject(n2, o, levels-1,(Map) options.get(ref.getName())); + n1.getObjects().add(n2 ); + } + } + else { + EObject o = (EObject) ecore.eGet(ref); + if (o == null) { + addString(n,ref.getName(),"Null"); + continue; + } + if (! ref.isContainment()) { + Map options1 = (Map) options.get(ref.getName()); + if (options1 == null) { + addString(n,ref.getName(),"Reference " + o.eClass().getName() + ":" + ManagementServer.object2ref(o)); + continue; + } + int levels1 = options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels -1; + if (options1.containsKey("NAME")) { + // Add another level + GuiObjectValueObject n1 = f.createGuiObjectValueObject(); + n.getValues().add(n1 ); + n1.setValueName((String) options1.get("NAME")); + n1.setV(f.createGuiObject()); + add2GuiObject(n1.getV(), o, levels1,options1); + continue; + } + add2GuiObject(n, o, levels1,options1); + continue; + } + GuiObjectValueObject n1 = f.createGuiObjectValueObject(); + n.getValues().add(n1 ); + n1.setValueName(ref.getName()); + n1.setV(f.createGuiObject()); + add2GuiObject(n1.getV(), o, levels-1,(Map) options.get(ref.getName())); + } + } + } + + private static void addTimeSeries(GuiObject n, EObject ecore, EAttribute attr, String v) { + GuiObjectValueTimeSeries t = f.createGuiObjectValueTimeSeries(); + t.setValueName(attr.getName()); + t.setPath(ManagementServer.object2ref(ecore) + "/" + attr.getName()); + t.setV(v); + n.getValues().add(t); + } + + private static void addString(GuiObject n, String name, String v) { + GuiObjectValueString n1 = f.createGuiObjectValueString(); + n1.setV(v); + n1.setValueName(name); + n.getValues().add(n1); + } + + public static void printTree(GuiTree t) { + for (GuiTreeNode n : t.getSections()) { + printTreeNode(n, ""); + } + } + + private static void printTreeNode(GuiTreeNode t, String indent) { + System.out.println(indent + t.getNodeName()); + for (GuiTreeNode n : t.getChildren()) { + printTreeNode(n, " " + indent); + } + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTableUtil.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTableUtil.java new file mode 100644 index 0000000..b883442 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTableUtil.java @@ -0,0 +1,127 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.gui.tools; + +import java.util.Date; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.openecomp.ncomp.gwt.siriusportal.model.*; + +public class GuiTableUtil { + static ModelFactory f = ModelFactory.eINSTANCE; + GuiTable t; + GuiTableRow r = null; + public GuiTableUtil() { + t = f.createGuiTable(); + } + public GuiTableColumn addColumn(String name, GuiTableColumnType type) { + GuiTableColumn c = f.createGuiTableColumn(); + c.setColName(name); + c.setColumnType(type); + t.getColumns().add(c); + return c; + } + public void newRow() { + if (r != null) { + t.getRows().add(r); + r = null; + } + r = f.createGuiTableRow(); + } + public void addCell(Object o) { + if (o instanceof Date) { + GuiTableCellDate c = f.createGuiTableCellDate(); + c.setValue((Date) o); + r.getCells().add(c); + return; + } + if (o instanceof Integer) { + GuiTableCellDouble c = f.createGuiTableCellDouble(); + Integer i = (Integer) o; + c.setValue(i.doubleValue()); + r.getCells().add(c); + return; + } + GuiTableCellString c = f.createGuiTableCellString(); + c.setValue(o != null ? o.toString() : "NULL"); + r.getCells().add(c); + } + public GuiTable getTable() { + if (r != null) t.getRows().add(r); + for (GuiTableRow r : t.getRows()) { + if (t.getColumns().size() != r.getCells().size()) + throw new RuntimeException("Wrong number of cells" + t.getColumns().size() + " != " + r.getCells().size()); + } + return t; + } + public GuiTableCellReferences addCellRef(EObject o, String def) { + GuiTableCellReferences res = f.createGuiTableCellReferences(); + if (o == null) { + addCell(def); + return res; + } + addCellRef(res,o,def); + // TODO removed when GUI is updated + addCell(res.getRefs().get(0).getLabel()); + // r.getCells().add(res); + return res ; + } + @SuppressWarnings("rawtypes") + public GuiTableCellReferences addCellRefs(EList l, String def) { + if (l.size() == 0) { + addCell(def); + return null; + } + StringBuffer buf = new StringBuffer(); + GuiTableCellReferences res = f.createGuiTableCellReferences(); + for (Object o : l) { + GuiTableCellReference ref = addCellRef(res,(EObject) o,def); + buf.append(ref.getLabel()); + buf.append(" "); + } + // TODO removed when GUI is updated + addCell(buf.toString()); + // r.getCells().add(res); + return res ; + } + + private GuiTableCellReference addCellRef(GuiTableCellReferences refs, EObject o, String def) { + GuiTableCellReference ref = f.createGuiTableCellReference(); + ref.setLabel(def); + if (o == null) return ref; + EStructuralFeature ff = o.eClass().getEStructuralFeature("name"); + if (ff instanceof EAttribute) { + EAttribute attr = (EAttribute) ff; + ref.setLabel(o.eGet(attr).toString()); + } + refs.getRefs().add(ref); + return ref; + } + public void addCellDate(long time) { + // TODO needed when using strings for dates. + addCell(String.format("%1$tm/%1$td %1$tH:%1$tM:%1$tS", new Date(time))); + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTimeseriesUtil.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTimeseriesUtil.java new file mode 100644 index 0000000..11efd8d --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTimeseriesUtil.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.sirius.gui.tools; + +public class GuiTimeseriesUtil { + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTreeUtil.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTreeUtil.java new file mode 100644 index 0000000..4f568b1 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/gui/tools/GuiTreeUtil.java @@ -0,0 +1,248 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.gui.tools; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.ConcurrentModificationException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.gwt.siriusportal.model.*; +import org.openecomp.ncomp.sirius.manager.tableTemplate.AbstractTableTemplate; + +public class GuiTreeUtil { + public static final Logger logger = Logger.getLogger(GuiTreeUtil.class); + static ModelFactory f = ModelFactory.eINSTANCE; + GuiTree tree; + HashMap ecore2node = new HashMap(); + private ManagementServer server; + + @SuppressWarnings("rawtypes") + public GuiTreeUtil (ManagementServer server, int levels, Map options) { + this.server = server; + tree = f.createGuiTree(); + tree.getSections().addAll(ecore2node(server.getObject(),levels,options).getChildren()); + } + @SuppressWarnings("rawtypes") + public GuiTreeUtil (ManagementServer server, EObject o, int levels, Map options) { + this.server = server; + tree = f.createGuiTree(); + tree.getSections().addAll(ecore2node(o,levels,options).getChildren()); + } + + @SuppressWarnings("rawtypes") + void addEcore(String path, EObject ecore, int levels, Map options) { + EObject s = find(tree, path,false); + if (s == null) { + logger.warn("Unable to find " + path + " " + tree); + return; + } + GuiTreeNode n = (GuiTreeNode) s; + addEcore(n,ecore,levels,options); + } + @SuppressWarnings("rawtypes") + void addEcore(GuiTreeNode n, EObject ecore, int levels, Map options) { + n.getChildren().addAll(ecore2node(ecore,levels,options).getChildren()); + } + @SuppressWarnings("rawtypes") + void addEList(GuiTreeNode n, EList l, int levels, Map options) { + for (EObject ecore: l) { + n.getChildren().add(ecore2node(ecore,levels,options)); + } + } + public GuiTreeNode addSection(String name, GuiView view) { + GuiTreeNode n1 = f.createGuiTreeNode(); + tree.getSections().add(n1); + n1.setNodeName(name); + n1.setView(view); + return n1; + } + public GuiTreeNode addNode(String path, String name, GuiView view) { + EObject s = find(tree, path,false); + if (s == null) { + logger.warn("Unable to find " + path + " " + tree); + return null; + } + GuiTreeNode n = (GuiTreeNode) s; + GuiTreeNode n1 = f.createGuiTreeNode(); + n.getChildren().add(n1); + n1.setNodeName(name); + n1.setView(view); + return n1; + } + private EObject find(EObject o, String path, boolean create) { + return find(o,path.split("/"),1,create); + } + + private EObject find(EObject o, String[] path, int i, boolean create) { + EList l = null; + if (i == path.length) return o; + String name = path[i]; + if (o instanceof GuiTree) { + GuiTree t = (GuiTree) o; + l = t.getSections(); + } + if (o instanceof GuiTreeNode) { + GuiTreeNode n = (GuiTreeNode) o; + l = n.getChildren(); + } + for (GuiTreeNode n : l) { + if (name.equals(n.getNodeName())) + return find(n,path,i+1,create); + } + if (create) { + GuiTreeNode n1 = f.createGuiTreeNode(); + if (o instanceof GuiTree) { + GuiTree n = (GuiTree) o; + n.getSections().add(n1); + n1.setNodeName(name); + n1.setView(GuiView.NONE); + } + if (o instanceof GuiTreeNode) { + GuiTreeNode n = (GuiTreeNode) o; + n.getChildren().add(n1); + n1.setNodeName(name); + n1.setView(GuiView.NONE); + } + return find(n1,path,i+1,create); + } + return null; + } + + @SuppressWarnings("rawtypes") + private GuiTreeNode ecore2node(EObject ecore, int levels, Map options) { + if (options == null) options = new HashMap(); + GuiTreeNode n = f.createGuiTreeNode(); + if (ecore2node.get(ecore) == null) { + ecore2node.put(ecore, n); + } + EAttribute attr = (EAttribute) ecore.eClass().getEStructuralFeature("name"); + if (attr != null) { + n.setNodeName((String) ecore.eGet(attr)); + } + if (n.getNodeName() == null) { + n.setNodeName("NONAME"); + } + n.setView(GuiView.OBJECT); + for (EReference ref : ecore.eClass().getEAllContainments()) { + Map options1 = newOptions(options,ref.getName()); + int levels1 = newLevels(options1,levels); + if (levels1 == 0) continue; + if (ref.isMany() && ! ManagementServer.refIsNamed(ref)) { + // require NamedEntity + + } + GuiTreeNode n1 = f.createGuiTreeNode(); + n1.setNodeName(ref.getName()); + n.getChildren().add(n1); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) ecore.eGet(ref); + // Try 3 times to get list. + boolean done = false; + for (int i = 0; i < 3 ; i ++) { + try { + List l2 = new ArrayList(); + for (EObject o : l) { + l2.add(ecore2node(o,levels1,options1)); + } + n1.getChildren().addAll(l2); + break; + } catch (ConcurrentModificationException e) { + continue; + } + } + if (! done ) { + logger.error("unable to add list: " + ManagementServer.object2ref(ecore) + "@" + ref.getName()); + } + } else { + EObject o = (EObject) ecore.eGet(ref); + if (o != null) { + GuiTreeNode nn = ecore2node(o,levels1,options1); + n1.setView(GuiView.OBJECT); + n1.getChildren().addAll(nn.getChildren()); + } + } + } + return n; + } + + @SuppressWarnings("rawtypes") + private static int newLevels(Map options1, int levels) { + return options1.containsKey("LEVELS") ? (Integer) options1.get("LEVELS") : levels - 1; + } + + @SuppressWarnings("rawtypes") + private static Map newOptions(Map options, String name) { + Object o = options.get(name); + if (! (o instanceof Map)) return new HashMap(); + return (Map) o; + } + + public void addTables(EList templates) { + for (AbstractTableTemplate t: templates) { + for (EObject o : server.findAll(t.getTreePath())) { + String treePath = ManagementServer.expandPath(o,t.getTablePath(),"$"); + int i = treePath.lastIndexOf("/"); + String prefix = treePath.substring(0,i); + String name = treePath.substring(i+1); + System.err.println("Adding table: " + prefix + " " + name); + if (prefix.equals("/")) { + logger.error("cannot have table as a section"); + continue; + } + else { + find(tree,prefix,true); + addNode(prefix, name, GuiView.TABLE); + } + } + } + } + + + public void printTree() { + for (GuiTreeNode n : tree.getSections()) { + printTreeNode(n, ""); + } + } + + private void printTreeNode(GuiTreeNode t, String indent) { + System.out.println(indent + t.getNodeName() + ":" + t.getView()); + for (GuiTreeNode n : t.getChildren()) { + printTreeNode(n, " " + indent); + } + } + public GuiTree getTree() { + return tree; + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/AbstractClient.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/AbstractClient.java new file mode 100644 index 0000000..a61c02c --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/AbstractClient.java @@ -0,0 +1,199 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.util.HashMap; +import java.util.Properties; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.json.JSONArray; +import org.json.JSONObject; + +import org.openecomp.ncomp.utils.emf.EUtils; + +public abstract class AbstractClient { + public static final Logger logger = Logger.getLogger(AbstractClient.class); + abstract public byte[] httpBinaryTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout); + + public Properties props; + public String language; + public String namespace; + protected int defaultTimeout = 60000; + private static HashMap map1 = new HashMap(); + private static HashMap map2 = new HashMap(); + + public void add(String uri, EObject o) { + map1.put(o, this); + map2.put(o, uri); + } + + static AbstractClient findClient(EObject o) { + return map1.get(o); + } + + public JSONObject operationJson(EObject o, String name, Long timeout, JSONObject json) { + return operationPath2(map2.get(o), name, timeout, json); + } + + public JSONObject operationPath2(String path, String name, Long timeout, JSONObject json) { + HashMap headers = new HashMap(); + headers.put("action", name); + logger.debug("operation: " + name + "\n" + json.toString(2)); + return httpJsonTransaction(path, "PUT", headers, json, timeout); + } + public JSONObject operationOdl(String path, Long timeout, JSONObject json) { + JSONObject json1 = new JSONObject(); + json1.put("input", json); + logger.debug("ODL operation: " + path + "\n" + json1.toString(2)); + return httpJsonTransaction(path, "POST", null, json1, timeout); + } + + public Object operation2(String path, EObject o, String opName, Long timeout, Object[] params) { + EOperation op = EUtils.name2operation(o.eClass(), opName); + if (op == null) + throw new RuntimeException("no such operation: " + opName + " on " + o); + JSONObject res = operationPath2(path, opName, timeout, ManagementServer.params2json(op, params)); + return ManagementServer.json2response(op, res); + } + + public JSONObject operation(String resourcePath, String opName, Long timeout, JSONObject json) { + return operationPath2(resourcePath, opName, timeout, json); + } + + public Object operation(String path, EObject o, String opName, Long timeout, Object... params) { + return operation2(path, o, opName, timeout, params); + } + + public Object operation(EObject o, String opName, Long timeout, Object... params) { + return operation2(map2.get(o), o, opName, timeout, params); + } + + public Object operationPath(String resourcePath, EClass c, String opName, Long timeout, Object... params) { + EOperation op = EUtils.name2operation(c, opName); + if (op == null) { + throw new RuntimeException("Unknown operation " + opName + " on Eclass " + c.getName()); + } + JSONObject res; + JSONObject json1 = ManagementServer.params2json(op, params); + if (language != null && language.equals("restconf")) { + res = operationOdl("/restconf/operations/" + namespace + ":" + opName,timeout,json1); + } + else { + res = operationPath2(resourcePath, op.getName(), timeout, json1 ); + } + return ManagementServer.json2response(op, res); + } + + // abstract public void sendToDataRouter(String feedname, String fileId, + // JSONObject metadata, InputStream is); + + // public void sendToDataRouter(String feedname, String fileId, JSONObject + // metadata, byte[] bytes) { + // ByteArrayInputStream in = new ByteArrayInputStream(bytes); + // sendToDataRouter(feedname, fileId, metadata, in); + // } + + public void create(String resourcePath, String json) { + create(resourcePath, new JSONObject(json)); + } + + public void create(String resourcePath, JSONObject json) { + httpJsonTransaction(resourcePath, "POST", null, json, null); + } + + public void update(String resourcePath, JSONObject json) { + httpJsonTransaction(resourcePath, "PUT", null, json, null); + } + + public void delete(String resourcePath) { + httpJsonTransaction(resourcePath, "DELETE", null, new JSONObject(), null); + } + + public JSONObject method(String resourcePath, String method, JSONObject json) { + return httpJsonTransaction(resourcePath, method, null, json, null); + } + + public byte[] methodAsBinary(String resourcePath, String method, JSONObject json) { + return httpBinaryTransaction(resourcePath, method, null, json, null); + } + + public String methodAsString(String resourcePath, String method, JSONObject json) { + return httpStringTransaction(resourcePath, method, null, json, null); + } + + public JSONObject list(String resourcePath) { + if (language != null && language.equals("rest")) { + return httpJsonTransaction(resourcePath, "GET", null, new JSONObject(), null); + } else { + return list(resourcePath, 1); + } + } + + public JSONObject listAll(String resourcePath) { + return httpJsonTransaction(resourcePath + "?match=regexp", "GET", null, new JSONObject(), null); + } + + public JSONObject listReferences(String resourcePath, boolean recursive) { + return httpJsonTransaction(resourcePath + "?references=" + recursive, "GET", null, new JSONObject(), null); + } + + public JSONObject list(String resourcePath, int levels) { + return httpJsonTransaction(resourcePath + "?levels=" + levels, "GET", null, new JSONObject(), null); + } + + public JSONObject httpJsonTransaction(String path, String method, HashMap headers, JSONObject body) { + return httpJsonTransaction(path, method, headers, body,null); + } + + public JSONObject httpJsonTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout) { + String s = httpStringTransaction(path, method, headers, body, timeout); + if (s == null) return null; + if (s.startsWith("[")) { + JSONArray a = new JSONArray(s); + JSONObject json = new JSONObject(); + json.put("$list", a); + return json; + } else { + JSONObject json = new JSONObject(s); + return json; + } + } + + public String httpStringTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout) { + byte[] b = httpBinaryTransaction(path, method, headers, body, timeout); + if (b == null) return null; + else return new String(b); + } + + public int getDefaultTimeout () { + return defaultTimeout; + } + + public void setDefaultTimeout (int timeout) { + defaultTimeout = timeout; + } + + abstract public String getRemote(); +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicAdaptorProvider.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicAdaptorProvider.java new file mode 100644 index 0000000..8a2a139 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicAdaptorProvider.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +// This is a base class providing the basic (essentially, no) functionality needed +// in an XxxProvider class + +public class BasicAdaptorProvider { + protected ISiriusServer controller; + + public BasicAdaptorProvider (ISiriusServer controller, Object o) { + this.controller = controller; + } + + public void start() { + } + + public static void ecoreSetup() { + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicGuiClientApiProvider.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicGuiClientApiProvider.java new file mode 100644 index 0000000..3a01864 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicGuiClientApiProvider.java @@ -0,0 +1,76 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import org.openecomp.ncomp.gwt.siriusportal.model.GuiClientApi; +import org.openecomp.ncomp.gwt.siriusportal.model.GuiObject; +import org.openecomp.ncomp.sirius.gui.tools.GuiModelUtils; +import org.openecomp.ncomp.sirius.gui.tools.GuiTreeUtil; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; + +public class BasicGuiClientApiProvider extends BasicAdaptorProvider { + + @SuppressWarnings("unused") + private GuiClientApi o; + + public BasicGuiClientApiProvider(ISiriusServer controller, GuiClientApi o) { + super(controller, o); + this.o = o; + } + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTree getTree() { + + GuiTreeUtil tree = new GuiTreeUtil(controller.getServer(), 100, null); + AbstractManagementServer c = (AbstractManagementServer) controller.getServer().getObject(); + if (c.getConfiguration() != null) + tree.addTables(c.getConfiguration().getTableTemplates()); + return tree.getTree(); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiObject getObject(java.lang.String path) { + + Subject subject = ManagementServer.find(controller.getServer().getObject(), path); + if (subject.o == null) { + throw new RuntimeException("unable to find: " + path); + } + GuiObject o = GuiModelUtils.ecore2GuiObject(subject.o, 2, null); + // oPrint(o); + return o; + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTimeSerie getTimeSerie(java.lang.String path, java.lang.String start, java.lang.String end, java.lang.String duration) { + return GuiModelUtils.getTimeSerie(controller.getServer(), path, start, end, duration); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiTable getTable(java.lang.String path, java.lang.String start, java.lang.String end) { + return GuiModelUtils.getTable(controller.getServer(), path, start, end); + } + + public org.openecomp.ncomp.gwt.siriusportal.model.GuiHtml getHtml(java.lang.String path, java.lang.String start, java.lang.String end) { + throw new UnsupportedOperationException(); + } + + public org.openecomp.ncomp.sirius.manager.graph.GuiGraph getGraph(java.lang.String path, java.lang.String start, java.lang.String end) { + throw new UnsupportedOperationException(); + } + + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicManagementServerProvider.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicManagementServerProvider.java new file mode 100644 index 0000000..dd46628 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/BasicManagementServerProvider.java @@ -0,0 +1,130 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.util.Date; +import java.util.concurrent.atomic.AtomicLong; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.json.JSONObject; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.sirius.manager.server.ManagementInfo; +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; + +// This is a base class providing the AbstractManagementServer functionality needed +// in an XxxProvider class + +public class BasicManagementServerProvider extends BasicAdaptorProvider { + private static final Logger logger = Logger.getLogger(BasicManagementServerProvider.class); + private AbstractManagementServer a; + + public BasicManagementServerProvider (ISiriusServer controller, AbstractManagementServer a) { + super(controller, a); + this.a = a; + } + + public void logs(JSONObject cx, EList logs) { + uploadInfo(null, createManagementInfoList(cx, null, logs, null)); + } + + public void properties(JSONObject cx, EList l) { + uploadInfo(null, createManagementInfoList(cx, null, null, l)); + } + + public void metrics(JSONObject cx, EList metrics) { + uploadInfo(null, createManagementInfoList(cx, metrics, null, null)); + } + + AtomicLong numUploads = new AtomicLong(); + public void uploadInfo(JSONObject cx, EList info) { + Date d = new Date(); + numUploads.incrementAndGet(); + if (cx == null) { + for (ManagementInfo i : info) { + if (i.getLogs().size() > 0) { + controller.getServer().logs.updateLogs(a,i.getLogs(),a.getConfiguration().getRules(),logger); + } + if (i.getMetrics().size() > 0) { + controller.getServer().metrics.updateMetrics(a,i.getMetrics()); + } + if (i.getProps().size() > 0) { + controller.getServer().properties.updatePropertries(a,i.getProps()); + } + } + } + logger.info("uploadInfo done: " + (new Date().getTime()-d.getTime())/1000 + " numCurrentUploads= " + numUploads.decrementAndGet()); + } + + private static EList createManagementInfoList(JSONObject context, EList metrics, EList logs, EList properties) { + ManagementInfo m = ServerFactory.eINSTANCE.createManagementInfo(); + EList l = new BasicEList(); + l.add(m); + if (metrics != null) m.getMetrics().addAll(metrics); + if (logs != null) m.getLogs().addAll(logs); + if (properties != null) m.getProps().addAll(properties); + m.setIp(context.getString("remoteIp")); + logger.info("received data from: " + m.getIp() + " #m=" + m.getMetrics().size() + " #l=" + m.getLogs().size() + " #p=" + m.getProps().size()); + return l; + } + + public EList getValues(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + return controller.getServer().metrics.getValues(path, start, end, option, relativeInterval); + } + + public EList getValuesAll(org.json.JSONObject cx, java.lang.String path, EList metrics, java.lang.Long start, java.lang.Long end, org.openecomp.ncomp.core.metrics.MetricValueOption option, boolean relativeInterval) { + return controller.getServer().metrics.getValuesAll(path, metrics, start, end, option, relativeInterval); + } + + public EList getMessages(org.json.JSONObject cx, java.lang.String path, java.lang.Long start, java.lang.Long end) { + return controller.getServer().logs.getMessages(path, new Date(start), new Date(end)); + } + + public org.openecomp.ncomp.sirius.manager.server.LoggerInfo getRequestLogger(java.lang.String userName, java.lang.String action, java.lang.String resourcePath, org.json.JSONObject context) { + LoggerInfo info = ServerFactory.eINSTANCE.createLoggerInfo(); + info.setName(action); + return info; + } + + public EList evaluate(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + return FunctionUtils.evaluate(controller.getServer().getObject(), path, function); + } + + public void update(java.lang.String path, org.openecomp.ncomp.core.function.Function function) { + // TODO IMPLEMENT + throw new UnsupportedOperationException(); + } + + public static void ecoreSetup() { + // TODO Auto-generated method stub + + } + + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/DroolsEventReporter.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/DroolsEventReporter.java new file mode 100644 index 0000000..5a2440e --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/DroolsEventReporter.java @@ -0,0 +1,56 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import org.openecomp.ncomp.component.DroolsObjectChange; +import org.openecomp.ncomp.sirius.manager.drools.DroolsEventListener; + +public class DroolsEventReporter implements DroolsEventListener { + private final ManagementServer server; + private final String name; + + public DroolsEventReporter (ManagementServer server, String name) { + this.server = server; + this.name = name; + } + + @Override + public void recordPolicyFire(String ruleName) { + server.recordPolicyFire(name, ruleName); + } + + @Override + public void recordPolicyObjectInserted(Object o) { + server.recordPolicyObjectChange(name, o, DroolsObjectChange.INSERTED); + } + + @Override + public void recordPolicyObjectDeleted(Object o) { + server.recordPolicyObjectChange(name, o, DroolsObjectChange.DELETED); + } + + @Override + public void recordPolicyObjectUpdated(Object o) { + server.recordPolicyObjectChange(name, o, DroolsObjectChange.UPDATED); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/GenericHttpClient.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/GenericHttpClient.java new file mode 100644 index 0000000..d17f5d9 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/GenericHttpClient.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.sirius.manager; + + +public class GenericHttpClient extends JavaHttpClient { + + public GenericHttpClient(String fileName, String endpoint) { + super(fileName, endpoint); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/HighAvailabilityClient.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/HighAvailabilityClient.java new file mode 100644 index 0000000..f3d96c2 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/HighAvailabilityClient.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import org.apache.log4j.Logger; +import org.json.JSONObject; + +import org.openecomp.ncomp.utils.StringUtil; + +public class HighAvailabilityClient extends AbstractClient { + public static final Logger logger = Logger.getLogger(HighAvailabilityClient.class); + private Jetty8Client current; + private List clients = new ArrayList(); + public AbstractClient all = new AbstractClient() { + @Override + public byte[] httpBinaryTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout) { + return httpBinaryTransactionAll(path, method, headers, body, timeout); + } + + @Override + public String getRemote() { + ArrayList l = new ArrayList(); + for (AbstractClient c : clients) { + l.add(c.getRemote()); + } + return StringUtil.join(l, ","); + } + + }; + public HighAvailabilityClient(String fileName, String endpoint1, String endpoint2) { + clients.add(new Jetty8Client(fileName, endpoint1)); + clients.add(new Jetty8Client(fileName, endpoint2)); + current = clients.get(0); + props = current.props; + language = current.language; + namespace = current.namespace; + } + + protected byte[] httpBinaryTransactionAll(String path, String method, HashMap headers, JSONObject body, Long timeout) { + byte[] res = null; + for (Jetty8Client c : clients) { + try { + res = c.httpBinaryTransaction(path, method, headers, body, timeout); + } + catch (Exception e) { + logger.warn("httpBinaryTransaction failed for: " + path + " " + method + " " + e); + } + } + return res; + } + + @Override + public byte[] httpBinaryTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout) { + try { + return current.httpBinaryTransaction(path, method, headers, body, timeout); + } + catch (Jetty8ClientException e) { + current = current == clients.get(0) ? clients.get(1) : clients.get(0); + logger.warn("switching active client: " + current.getBaseAddress() ); + System.err.println("switching active client: " + current.getBaseAddress() ); + } + return current.httpBinaryTransaction(path, method, headers, body, timeout); + } + + public boolean hasBase() { + if (clients.get(0).getBaseAddress() == null) return false; + if (clients.get(1).getBaseAddress() == null) return false; + return true; + } + + @Override + public String getRemote() { + ArrayList l = new ArrayList(); + for (AbstractClient c : clients) { + l.add(c.getRemote()); + } + return StringUtil.join(l, ","); + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IPolicyEngine.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IPolicyEngine.java new file mode 100644 index 0000000..b2c3f75 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IPolicyEngine.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.sirius.manager; + +public interface IPolicyEngine { + public boolean permit(String subject, String action, String resourcePath); +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IRequestHandler.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IRequestHandler.java new file mode 100644 index 0000000..f1d8020 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/IRequestHandler.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.sirius.manager; + +import java.io.InputStream; + +import org.json.JSONObject; + +public interface IRequestHandler { + Object handleJson(String userName , String action, String resourcePath, JSONObject json, JSONObject context); + Object handleBinary(String userName , String action, String resourcePath, InputStream in); +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusPlugin.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusPlugin.java new file mode 100644 index 0000000..2117a07 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusPlugin.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.sirius.manager; + +public interface ISiriusPlugin { + void start(); +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusServer.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusServer.java new file mode 100644 index 0000000..7bbb8cb --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISiriusServer.java @@ -0,0 +1,27 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +public interface ISiriusServer { + ManagementServer getServer(); +} + \ No newline at end of file diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISwaggerHandler.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISwaggerHandler.java new file mode 100644 index 0000000..d253e25 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ISwaggerHandler.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.sirius.manager; + +public interface ISwaggerHandler { + void updateSwagger(String path, SwaggerUtils swagger); +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java new file mode 100644 index 0000000..88deb35 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/JavaHttpClient.java @@ -0,0 +1,199 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.io.*; +import java.util.*; +import java.net.*; + +import org.apache.log4j.Logger; +import org.json.JSONObject; +import org.apache.commons.codec.binary.Base64; + +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.PropertyUtil; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class JavaHttpClient extends AbstractClient { + public static final Logger logger = Logger.getLogger(JavaHttpClient.class); + String authorization; + String baseAddress; + private boolean debug = false; + + public JavaHttpClient(String fileName, String endpoint) { + try { + props = PropertyUtil.getPropertiesFromClasspath(fileName); + setBaseAddress(props.getProperty(endpoint + ".endpoint")); + if (getBaseAddress() == null) { + logger.error("unable to determine baseAddress for endpoint: " + endpoint + " in " + fileName); + throw new RuntimeException("unable to determine baseAddress for endpoint: " + endpoint + " in " + + fileName); + } + String user = props.getProperty(endpoint + ".user"); + String password = decryptPassword(props.getProperty(endpoint + ".password")); + debug = Boolean.parseBoolean(props.getProperty(endpoint + ".debug", "false")); + if (props.containsKey(endpoint + ".timeout")) { + setDefaultTimeout(Integer.parseInt(props.getProperty(endpoint + ".timeout"))); + } + authorization = "Basic " + Base64.encodeBase64String((user + ":" + password).getBytes()); + authorization = authorization.trim(); + } catch (Exception e) { + logger.error("creating client failed: " + e.toString()); + } + } + + public static String decryptPassword(String s) { + if (s == null) return s; + if (s.startsWith("rsa:")) { + s = CryptoUtils.decryptPrivate(CryptoUtils.getKey("config/server.private"), s.substring(4)); + } + return s; + } + + + public byte[] httpBinaryTransaction(String path, String method, HashMap headers, JSONObject body, + Long timeout) { + byte[] rawbody = null; + if ("DELETE".equals(method) || "GET".equals(method)) { + body = null; + } + if (body != null) { + rawbody = body.toString(2).getBytes(); + if (rawbody.length == 0) { + rawbody = null; + } + } + String url = getBaseAddress() + path; + int tout = defaultTimeout; + if (timeout != null) { + // units? seconds or millis? + tout = (int) timeout.longValue(); + } + HttpURLConnection uc = null; + InputStream is = null; + try { + URL u = new URL(url); + uc = (HttpURLConnection) u.openConnection(); + uc.setConnectTimeout(tout); + uc.setReadTimeout(tout); + if (headers == null) + headers = new HashMap(); + headers.put("Content-type", "application/json"); + headers.put("Authorization", authorization); + for (String n : headers.keySet()) { + uc.setRequestProperty(n, headers.get(n)); + if (debug) { + System.err.println("HTTP REQUEST header: " + n + " " + headers.get(n)); + } + } + uc.setRequestMethod(method); + if (debug) + System.err.println("HTTP REQUEST url: " + method + " " + url); + if (rawbody != null && rawbody.length > 0) { + uc.setRequestProperty("Content-Length", Integer.toString(rawbody.length)); + uc.setFixedLengthStreamingMode(rawbody.length); + uc.setDoOutput(true); + OutputStream os = uc.getOutputStream(); + os.write(rawbody); + os.close(); + if (debug) + System.err.println("HTTP REQUEST boby: " + body); + } + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + int rc = uc.getResponseCode(); + if (rc < 200 || rc >= 300) { + is = uc.getErrorStream(); + if (is != null) + FileUtils.copyStream(is, baos); + if (baos.size() > 0 && debug) { + System.err.println("HTTP ERROR: " + url + " " + baos); + } + throw new Jetty8ClientException("HTTP Request Failed: URL: " + url + " code:" + rc + " msg:" + + uc.getResponseMessage() + " " + baos); + } + is = uc.getInputStream(); + FileUtils.copyStream(is, baos); + if (baos.size() == 0) + return null; + return (baos.toByteArray()); + } catch (RuntimeException re) { +// ManagementServerUtils.printStackTrace(re); + throw re; + } catch (Exception e) { +// ManagementServerUtils.printStackTrace(e); + throw new RuntimeException("http error: " + e, e); + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + } + } + if (uc != null) { + uc.disconnect(); + } + } + } + + public String getBaseAddress() { + return baseAddress; + } + + public void setBaseAddress(String baseAddress) { + this.baseAddress = baseAddress; + } + + public void setDebug(boolean debug) { + this.debug = debug; + } + + public void httpBinaryTransaction(String path, String method, HashMap headers, InputStream i, int j) { + // TODO Auto-generated method stub + + } + + public void httpJsonTransaction(String path, String method, HashMap headers, InputStream i, int j) { + // TODO Auto-generated method stub + + } + + @Override + public String getRemote() { + return getBaseAddress(); + } + + public static void main(String[] args) { + String fileName = args[0]; + String endpoint = args[1]; + JavaHttpClient c = new JavaHttpClient(fileName, endpoint); + String path = args[2]; + String method = args[3]; + JSONObject body = new JSONObject(args[4]); + JSONObject headerJson = new JSONObject(args[5]); + HashMap headers = new HashMap(); + for (Iterator i = headerJson.keys(); i.hasNext();) { + String k = i.next(); + headers.put(k, headerJson.getString(k)); + } + c.httpJsonTransaction(path, method, headers, body); + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Client.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Client.java new file mode 100644 index 0000000..b5eaa4f --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Client.java @@ -0,0 +1,32 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +// Should use GenericHttpClient +@Deprecated +public class Jetty8Client extends JavaHttpClient { + + public Jetty8Client(String fileName, String endpoint) { + super(fileName, endpoint); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientException.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientException.java new file mode 100644 index 0000000..58ce165 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientException.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.sirius.manager; + +class Jetty8ClientException extends RuntimeException { + public Jetty8ClientException(String string) { + super(string); + } + + private static final long serialVersionUID = 1L; + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientOld.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientOld.java new file mode 100644 index 0000000..d3aae2a --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8ClientOld.java @@ -0,0 +1,204 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.util.HashMap; + +import org.apache.log4j.Logger; +import org.eclipse.jetty.client.HttpClient; +import org.eclipse.jetty.client.HttpExchange; +import org.eclipse.jetty.http.ssl.SslContextFactory; +import org.eclipse.jetty.io.Buffer; +import org.eclipse.jetty.io.ByteArrayBuffer; +import org.eclipse.jetty.util.B64Code; +import org.eclipse.jetty.util.StringUtil; +import org.json.JSONObject; + +import org.openecomp.ncomp.utils.CryptoUtils; +import org.openecomp.ncomp.utils.PropertyUtil; + +@SuppressWarnings("deprecation") +public class Jetty8ClientOld extends AbstractClient { + public static final Logger logger = Logger.getLogger(Jetty8ClientOld.class); + HttpClient httpClient; + String authorization; + String baseAddress; + private boolean debug = false; + + public Jetty8ClientOld(String fileName, String endpoint) { + try { + props = PropertyUtil.getPropertiesFromClasspath(fileName); + language = props.getProperty(endpoint + ".language", "somf"); + namespace = props.getProperty(endpoint + ".namespace", null); + setBaseAddress(props.getProperty(endpoint + ".endpoint")); + if (getBaseAddress() == null) { + logger.error("unable to determine baseAddress for endpoint: " + endpoint + " in " + fileName); + throw new RuntimeException("unable to determine baseAddress for endpoint: " + endpoint + " in " + fileName); + } + String user = props.getProperty(endpoint + ".user"); + String password = decryptPassword(props.getProperty(endpoint + ".password")); + debug = Boolean.parseBoolean(props.getProperty(endpoint + ".debug","false")); +// if (debug) +// System.err.println("using " + user + " "+ password + " "+ endpoint + " " + fileName + " " + getBaseAddress()); + authorization = "Basic " + B64Code.encode(user + ":" + password, StringUtil.__ISO_8859_1); + if (props.containsKey(endpoint + ".keyStore")) { + SslContextFactory sslContextFactory = new SslContextFactory(props.getProperty(endpoint + ".keyStore")); + sslContextFactory.setKeyManagerPassword(props.getProperty(endpoint + ".keyManagerPassword")); + sslContextFactory.setKeyStorePassword(props.getProperty(endpoint + ".keyStorePassword")); + // sslContextFactory.setTrustStorePath(probs.getProperty(endpoint.trustStore")); + sslContextFactory.setTrustStorePassword(props.getProperty(endpoint + ".trustStorePassword")); + httpClient = new HttpClient(sslContextFactory); + } else + httpClient = new HttpClient(); + httpClient.start(); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + logger.error("creating client failed: " + e.toString()); + } + } + + private String decryptPassword(String s) { + if (s.startsWith("rsa:")) { + s = CryptoUtils.decryptPrivate(CryptoUtils.getKey("config/server.private"), s.substring(4)); + } + return s; + } + + @Override + public byte[] httpBinaryTransaction(String path, String method, HashMap headers, JSONObject body, Long timeout) { + class Exchange extends HttpExchange { + @SuppressWarnings("unused") + String version; + int code; + String message; + @SuppressWarnings("unused") + String location; + ByteArrayOutputStream content = new ByteArrayOutputStream(); + + @Override + protected void onResponseHeader(Buffer name, Buffer value) { + // System.out.println("HEADER: " + name + " " + value); + if (name.toString().equals("Location")) + location = value.toString(); + } + + @Override + protected void onResponseStatus(Buffer httpVersion, int statusCode, Buffer statusMessage) { + logger.debug("v=" + httpVersion + " code=" + statusCode + " m=" + "statusMessage"); + version = httpVersion.toString(); + code = statusCode; + message = statusMessage.toString(); + } + + @Override + protected void onResponseContent(Buffer content) { + logger.debug("onResponseContent: " + content.toString()); + byte[] b = content.asArray(); + this.content.write(b,0,b.length); + } + } + String url = getBaseAddress() + path; + Exchange exchange = new Exchange(); + exchange.setURL(url); + exchange.setMethod(method); + if (debug) + System.err.println("HTTP REQUEST: " + method + " " + url); + if (headers == null) + headers = new HashMap(); + headers.put("Content-type", "application/json"); + headers.put("Authorization", authorization); + for (String n : headers.keySet()) { + exchange.addRequestHeader(n, headers.get(n)); + if (debug) + System.err.println("HTTP REQUEST header: " + n + " " + headers.get(n)); + } + if (body != null) { + // exchange.setRequestContentSource(new + // ByteArrayInputStream(body.toString().getBytes())); + if (debug) System.err.println("HTTP REQUEST JSON body: " + body.toString(2)); + exchange.setRequestContent(new ByteArrayBuffer(body.toString(2).getBytes())); + } + try { + if (timeout != null && timeout > 0) { + exchange.setTimeout(timeout); + } + httpClient.send(exchange); + int exchangeState = -1; + if (debug) System.err.println("HTTP REQUEST timeout: " + timeout); + exchangeState = exchange.waitForDone(); + if (logger.isDebugEnabled()) + logger.debug("Exchange done: " + exchangeState); + if (debug) System.err.println("HTTP RESPONSE STATE: " + exchangeState + " " + exchange.code); + switch (exchange.code) { + case 200: + case 204: + break; + default: + throw new Jetty8ClientException("HTTP Exchanged Failed: URL: " + url + " state:" + exchangeState + " code:" + exchange.code + + " msg:" + exchange.message); + } + if (debug) System.out.println("HTTP RESPONSE CONTENT: " + exchange.content); + if (exchange.content.size() == 0) + return null; + return exchange.content.toByteArray(); + } catch (Jetty8ClientException e) { + throw e; + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + String body1 = body == null ? "NULL" : body.toString(2); + logger.error("http error: " + url + " body=" + body1 + " ", e); + throw new RuntimeException("http error: " + e, e); + } + } + + public String getBaseAddress() { + return baseAddress; + } + + public void setBaseAddress(String baseAddress) { + this.baseAddress = baseAddress; + } + + public void setDebug(boolean debug) { + this.debug = debug; + } + + public void httpBinaryTransaction(String path, String method, + HashMap headers, InputStream i, int j) { + // TODO Auto-generated method stub + + } + + public void httpJsonTransaction(String path, String method, + HashMap headers, InputStream i, int j) { + // TODO Auto-generated method stub + + } + + @Override + public String getRemote() { + return getBaseAddress(); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Server.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Server.java new file mode 100644 index 0000000..e9774ee --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Jetty8Server.java @@ -0,0 +1,341 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Properties; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.log4j.Logger; +import org.eclipse.jetty.http.ssl.SslContextFactory; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.server.nio.SelectChannelConnector; +import org.eclipse.jetty.server.ssl.SslSelectChannelConnector; +import org.eclipse.jetty.util.B64Code; +import org.eclipse.jetty.util.StringUtil; +import org.json.JSONObject; + +import org.openecomp.logger.EcompLogger; +import org.openecomp.ncomp.utils.PropertyUtil; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +public class Jetty8Server { + public static final Logger logger = Logger.getLogger(Jetty8Server.class); + static final EcompLogger ecomplogger = EcompLogger.getEcompLogger(); + Server server; + private SelectChannelConnector conn1; + private int actualport; + HashMap handlerMap = new HashMap(); + ServerThread thread; + private Properties props; + + class Jetty8ServerHandler extends AbstractHandler { + + private HashMap method2action = new HashMap(); + + { + method2action.put("POST", "CREATE"); + method2action.put("PUT", "UPDATE"); + method2action.put("GET", "LIST"); + method2action.put("DELETE", "DELETE"); + } + + @Override + public void handle(String contextPath, Request jRequest, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + if (request.getMethod().equals("OPTIONS")) { + setResponseHeaders(response); + response.setHeader("Allow", "HEAD,GET,PUT,DELETE,OPTIONS"); + response.setStatus(200); + jRequest.setHandled(true); + return; + } + String userName = checkAuth(contextPath,jRequest); + if (userName == null) { + setResponseHeaders(response); + response.setStatus(403); + jRequest.setHandled(true); + logger.info("Authorization not valid"); + return; + } + String requestId = request.getHeader("X-ECOMP-RequestID"); + if (requestId == null) { + ecomplogger.newRequestId(); + } + else { + ecomplogger.setRequestId(requestId);; + } + String action = request.getHeader("action"); + if (action == null) { + String method = request.getMethod(); + action = method2action.get(method); + } + logger.debug("new request:" + contextPath + " " + request.getMethod() + " " + action); + Object res = null; + String contextPath1 = null; + IRequestHandler handler = null; + for (String prefix : handlerMap.keySet()) { + if (contextPath.startsWith(prefix)) { + contextPath1 = contextPath.substring(prefix.length()); + handler = handlerMap.get(prefix); + } + } + if (handler == null) { + logger.warn("request with no handler: " + contextPath); + return; + } + try { + if ("application/json".equals(jRequest.getContentType()) || jRequest.getContentType() == null) { +// ByteArrayOutputStream s = new ByteArrayOutputStream(); +// FileUtils.copyStream(request.getInputStream(), s); +// System.err.println(s); +// JSONObject json = new JSONObject(new String(s.toByteArray())); + JSONObject json = JsonUtils.stream2json(request.getInputStream()); + res = handler.handleJson(userName, action, contextPath1, json, req2context(contextPath, jRequest, userName)); + } else + throw new ManagerException(HttpServletResponse.SC_BAD_REQUEST, "Cannot use content type: " + + jRequest.getContentType()); + } catch (ManagerException e) { + setResponseHeaders(response); + response.sendError(e.code, e.getMessage()); + ManagementServerUtils.printStackTrace(e); + return; + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + response.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage()); + return; + } + if (res != null) { + setResponseHeaders(response); + if (res instanceof JSONObject) { + JSONObject json1 = (JSONObject) res; + PrintWriter w = response.getWriter(); + w.append(json1.toString(2)); + w.close(); + response.setStatus(200); + jRequest.setHandled(true); + } else + response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Unable to handle output object: " + + res.getClass().getName()); + return; + } + response.setStatus(HttpServletResponse.SC_OK); + jRequest.setHandled(true); + } + + private void setResponseHeaders(HttpServletResponse response) { + for (Object k : props.keySet()) { + if (k instanceof String) { + String s = (String) k; + if (! s.startsWith("server.header")) continue; + response.setHeader(s.substring(14), props.getProperty(s)); + } + } + } + + private JSONObject req2context(String contextPath, Request jRequest, String user) { + JSONObject c = new JSONObject(); + c.put("remoteIp", jRequest.getRemoteAddr()); + c.put("user", user); + JSONObject p = new JSONObject(); + for (Object k : jRequest.getParameterMap().keySet()) { + if (k instanceof String) { + String kk = (String) k; + p.put(kk, jRequest.getParameter(kk)); + } + } + c.put("parameters", p); + c.put("path", contextPath); + return c; + } + } + + public Jetty8Server(String propertyFileName) { + try { + props = PropertyUtil.getPropertiesFromClasspath(propertyFileName); + String portString = props.getProperty("server.port"); + if (portString == null) + return; + int port = Integer.parseInt(portString); + server = new Server(); + if (props.containsKey("server.keyStore")) { + @SuppressWarnings("deprecation") + SslContextFactory f = new SslContextFactory(props.getProperty("server.keyStore")); + f.setKeyStorePassword(props.getProperty("server.keyStorePassword")); + f.setKeyManagerPassword(props.getProperty("server.keyManagerPassword")); + f.setTrustStore(props.getProperty("server.trustStore")); + f.setTrustStorePassword(props.getProperty("server.trustStorePassword")); + logger.info("HTTPS excluded protocols: " + Arrays.asList(f.getExcludeProtocols())); + f.addExcludeProtocols("SSLv1","SSLv2","SSLv3"); + logger.info("HTTPS excluded protocols after fix: " + Arrays.asList(f.getExcludeProtocols())); + SslSelectChannelConnector c = new SslSelectChannelConnector(f); + c.setPort(port); + c.setMaxIdleTime(30000); + server.addConnector(c); + conn1 = c; + logger.info("Adding HTTPS on port: " + port); + } else { + SelectChannelConnector c = new SelectChannelConnector(); + c.setPort(port); + server.addConnector(c); + conn1 = c; + logger.info("Adding HTTP on port: " + port); + } + server.setHandler(new Jetty8ServerHandler()); + // secondary port (assume HTTP) + portString = props.getProperty("server.port2"); + if (portString != null) { + port = Integer.parseInt(portString); + SelectChannelConnector c = new SelectChannelConnector(); + c.setPort(port); + server.addConnector(c); + logger.info("Adding HTTP on secondary port: " + port); + } + } catch (Exception e) { + // TODO Auto-generated catch block + ManagementServerUtils.printStackTrace(e); + } + } + + /** + * In unit testing, we want to start on an operating system selected port number, so we configure a port number of 0, and then use this to find out the real port number + */ + public int getPort() { + return(actualport); + } + /** + * In unit testing, we want to shut down the server + */ + public void stop() { + try { + server.stop(); + } catch (Exception e) { + } + } + + public void start() { + thread = new ServerThread(); + } + + public void join() { + try { + if (server == null) { + logger.warn("Ignore Join: server is NULL"); + return; + } + server.start(); + actualport = conn1.getLocalPort(); + server.join(); + } catch (Exception e) { + // TODO Auto-generated catch block + ManagementServerUtils.printStackTrace(e); + } + } + + public static void main(String[] args) { + new Jetty8Server("server.properties"); + + } + + public void add(String prefix, IRequestHandler h) { + handlerMap.put(prefix, h); + } + + class DummyRequestHandler implements IRequestHandler { + @Override + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, + JSONObject context) { + logger.debug("handleJson: user=" + userName + " action=" + action + " path=" + resourcePath + " json=" + + json); + return null; + } + + @Override + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + logger.info("handleBinary: user=" + userName + " action=" + action + " path=" + resourcePath); + return null; + } + } + + private class ServerThread implements Runnable { + public ServerThread() { + Thread t = new Thread(this, "jetty server"); + t.setDaemon(true); + t.start(); + } + + @Override + public void run() { + try { + server.start(); + actualport = conn1.getLocalPort(); + server.join(); + } catch (Exception e) { + // TODO Auto-generated catch block + ManagementServerUtils.printStackTrace(e); + } + } + } + + private String checkAuth(String contextPath, Request r) { + if (props.containsKey("server.noauth."+ contextPath)) + return "none"; + String s = r.getHeader("Authorization"); + if (s == null) { + logger.warn("Authorization failed: No header"); + return null; + } + String a[] = s.split(" "); + if (a.length != 2) { + logger.warn("Authorization failed: Bad header"); + return null; + } + String s1 = null; + try { + s1 = B64Code.decode(a[1], StringUtil.__ISO_8859_1); + } catch (UnsupportedEncodingException e) { + } + int i = s1.indexOf(":"); + if (i == -1) { + logger.warn("Authorization failed: Bad header"); + return null; + } + String user = s1.substring(0, i); + String pw = s1.substring(i + 1); + String pw2 = props.getProperty("server.user." + user); + boolean valid = pw.equals(JavaHttpClient.decryptPassword(pw2)); + if (!valid) + logger.warn("Authorization: bad PW: " + user +"@" + r.getRemoteAddr() + " " + pw.substring(0, 2)); + return valid ? user : null; + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java new file mode 100644 index 0000000..cdddcf2 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServer.java @@ -0,0 +1,2528 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import static org.openecomp.ncomp.sirius.manager.ManagementServerUtils.printStackTrace; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.ConcurrentModificationException; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Properties; +import java.util.TimeZone; +import java.util.concurrent.atomic.AtomicLong; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EFactory; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EParameter; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.util.EDataTypeEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import org.openecomp.entity.EcompComponent; +import org.openecomp.entity.EcompSubComponent; +import org.openecomp.entity.EcompSubComponentInstance; +import org.openecomp.ncomp.component.Api; +import org.openecomp.ncomp.component.ApiRequestStatus; +import org.openecomp.ncomp.component.ComponentClass; +import org.openecomp.ncomp.component.ComponentFactory; +import org.openecomp.ncomp.component.DroolsObjectChange; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.OperationalState; +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.sirius.manager.drools.DroolsRuntime; +import org.openecomp.ncomp.sirius.manager.logs.LogMessageManager; +import org.openecomp.ncomp.sirius.manager.metrics.MetricManager; +import org.openecomp.ncomp.sirius.manager.properties.PropertyManager; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.LoggerInfo; +import org.openecomp.ncomp.utils.PropertyUtil; +import org.openecomp.ncomp.utils.SortUtil; +import org.openecomp.ncomp.utils.StringUtil; +import org.openecomp.ncomp.webservice.utils.FileUtils; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +public class ManagementServer implements IRequestHandler, ISwaggerHandler { + public static final Logger logger = Logger.getLogger(ManagementServer.class); + private static final String PERSIST = "http://openecomp.org/sirius/persistence"; + private Jetty8Client jettyClient; + private Properties props; + private String directory; + private EObject root; + private IPolicyEngine pe = new SimplePolicyEngine(); + private DroolsRuntime droolsRuntime; + + private EFactory eFactory; + private String eClassName; + private String propertyFileName; + public LogMessageManager logs; + public MetricManager metrics; + public PropertyManager properties; + public boolean isSlave = false; + + public ManagementServer(EFactory eFactory, String eClassName, String directory, String propertyFileName) { + TimeZone.setDefault(TimeZone.getTimeZone("GMT")); + this.eFactory = eFactory; + this.eClassName = eClassName; + this.directory = directory; + this.propertyFileName = propertyFileName; + try { + props = PropertyUtil.getPropertiesFromClasspath(this.propertyFileName); + EcompComponent.initialize(props.getProperty("ecomp.component", "UNKNOWN_COMPONENT")); + EcompSubComponent.initialize(props.getProperty("ecomp.subcomponent", "UNKNOWN_SUBCOMPONENT")); + logs = new LogMessageManager(this); + metrics = new MetricManager(this); + properties = new PropertyManager(this); + } catch (Exception e) { + printStackTrace(e); + System.exit(1); + } + // logger.info("Starting Management Server"); + // jettyClient = new Jetty8Client(); + } + + public ManagementServer() { + // TODO Auto-generated constructor stub + } + + static AtomicLong requestId = new AtomicLong(); + + @Override + public Object handleJson(String userName, String action, String resourcePath, JSONObject json, JSONObject context) { + logger.debug("handleJson: " + userName + " " + action + " " + resourcePath + " " + context.get("remoteIp")); + long start = new Date().getTime(); + String reqId = Long.toString(start) + ":" + requestId.incrementAndGet(); + context.put("requestId", reqId); + Logger logger2 = findRequestLogger(userName, action, resourcePath, context); + if (logger2.isInfoEnabled()) { + JSONObject r = new JSONObject(); + r.put("id", reqId); + r.put("start", start); + r.put("user", userName); + r.put("action", action); + r.put("path", resourcePath); + r.put("req", json); + r.put("context", context); + logger2.info(r.toString()); + } + if (!pe.permit(userName, action, resourcePath)) { + handleJsonReportResult(reqId, start, null, "NOT_PERMITTED", logger2); + throw new RuntimeException("Action not permitted: " + userName + " " + action + " " + resourcePath); + } + Subject subject = find(resourcePath); + if (action.equals("UPDATE")) { + if (subject == null || subject.o == null) { + throw new RuntimeException("Unable to find to update: " + resourcePath); + } + boolean useNulls = false; + if (context != null && context.has("parameters")) { + JSONObject m = (JSONObject) context.get("parameters"); + useNulls = m.has("useNulls"); + } + try { + Object res = update(userName, subject, json, useNulls); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } catch (RuntimeException e) { + handleJsonReportResult(reqId, start, null, "ERROR", logger2); + printStackTrace(e); + throw e; + } + } + if (action.equals("CREATE")) { + String id = null; + if (subject != null) { + if (subject.ref == null || subject.ref.isMany()) { + handleJsonReportResult(reqId, start, null, "CREATE_ON_EXISTING_RESOURCE", logger2); + throw new RuntimeException("resource already exists: " + resourcePath); + } + } else { + int index = resourcePath.lastIndexOf("/"); + id = resourcePath.substring(index + 1, resourcePath.length()); + subject = find(resourcePath.substring(0, index)); + if (subject == null || subject.o == null) { + throw new RuntimeException("unable to find resource"); + } + if (subject.ref == null) + subject.ref = findRefByName(subject.o, id); + else + json.put("name", id); + } + Object res = create(subject, json, !json.has("$nosave")); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + if (action.equals("DELETE")) { + if (subject == null || subject.o == null) { + throw new RuntimeException("Unable to find to delete: " + resourcePath); + } + Object res = delete(subject); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + if (action.equals("LIST")) { + int levels = 1; + if (context != null && context.has("parameters")) { + JSONObject m = (JSONObject) context.get("parameters"); + if (m.has("levels")) + levels = Integer.parseInt((String) m.get("levels")); + if (m.has("match")) { + JSONObject res = new JSONObject(); + res.put("list", list2jsonArray(findAll(resourcePath))); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + if (m.has("references")) { + boolean b = m.getBoolean("references"); + JSONObject res = new JSONObject(); + if (subject == null || subject.o == null) { + throw new RuntimeException("Unable to find object: " + resourcePath); + } + res.put("list", subjectList2jsonArray(findReferences(root, subject.o, b))); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + } + if (subject == null || subject.o == null) { + throw new RuntimeException("Unable to find to list: " + resourcePath); + } + Object res = list(subject, levels); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + if (subject == null || subject.o == null) { + throw new RuntimeException("Unable to find object for operation: " + resourcePath); + } + Object res = operation(subject, action, json, context); + transformResult(subject,action,res); + handleJsonReportResult(reqId, start, res, "OK", logger2); + return res; + } + + private void transformResult(Subject subject, String action, Object res) { + String a = (subject != null && subject.o != null) ? ( subject.o.eClass().getInstanceClassName() + "@" + action ) : action; +// System.out.println("KKKKKKK:" + subject + " " + action + " " + a); +// System.out.println("KKKKKKK:" + res + " " + props.getProperty(a)); + if ((res instanceof JSONObject) && props.getProperty(a + ".replace") != null) { + JSONObject json = (JSONObject) res; + String[] aa = props.getProperty(a + ".replace").split(","); + transformJsonValues(json,aa[0],aa[1]); + } + } + + private void transformJsonValues(JSONObject json, String string1, String string2) { + for (Iterator i = json.keys(); i.hasNext();) { + String key = (String) i.next(); + Object o = json.get(key); + if (o instanceof String) { + json.put(key, ((String) o).replace(string1,string2)); +// System.out.println("KKKKKKK:" + o + " " + json.get(key)); + } + if (o instanceof JSONObject) { + transformJsonValues((JSONObject) o,string1,string2); + } + if (o instanceof JSONArray) { + transformJsonValues((JSONArray) o,string1,string2); + } + } + } + + private void transformJsonValues(JSONArray a, String string1, String string2) { + for (int i = 0; i < a.length(); i++) { + Object o = a.get(i); + if (o instanceof JSONObject) { + transformJsonValues((JSONObject) o,string1,string2); + } + if (o instanceof JSONArray) { + transformJsonValues((JSONArray) o,string1,string2); + } + } + } + + private Logger findRequestLogger(String userName, String action, String resourcePath, JSONObject context) { + String logdir = getProps().getProperty("requestlog.dir", "logs"); + if (root instanceof AbstractManagementServer) { + AbstractManagementServer a = (AbstractManagementServer) root; + LoggerInfo i = a.getRequestLogger(userName, action, resourcePath, context); + return ManagementServerUtils.createLogger("requests-" + i.getName(), "INFO", "%d %5p %m%n", logdir); + } + return ManagementServerUtils.createLogger("requests-" + action, "INFO", "%d %5p %m%n", logdir); + } + + private void handleJsonReportResult(String reqId, long start, Object res, String status, Logger logger2) { + if (logger2.isInfoEnabled()) { + JSONObject r = new JSONObject(); + long duration = new Date().getTime() - start; + r.put("id", reqId); + r.put("duration", duration); + r.put("status", status); + if (res instanceof JSONObject) { + JSONObject j = (JSONObject) res; + r.put("res", j); + } + logger2.info(r.toString()); + } + } + + public void start() throws IOException { + if (directory != null) + root = load(directory); + if (root instanceof IPolicyEngine) { + pe = (IPolicyEngine) root; + } + startRecursively(root); + } + + public static void startRecursively(EObject o) { + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + for (EObject o1 : l) { + startRecursively(o1); + } + } else { + EObject o1 = (EObject) o.eGet(ref); + if (o1 != null) + startRecursively(o1); + } + } + if (o instanceof ISiriusPlugin) { + ISiriusPlugin p = (ISiriusPlugin) o; + p.start(); + } + } + + public EFactory addFactory(EFactory f) { + if (f.getEPackage() == null) { + throw new RuntimeException("Null Package: " + f); + } + String s = f.getEPackage().getNsURI(); + if (!string2factory.containsKey(s)) { + string2factory.put(f.getEPackage().getNsURI(), f); + logger.info("added factory: " + s); + } + return string2factory.get(s); + } + + public void addRuntimeFactories(ISiriusServer server) { + addRuntimeFactories(server, "runtime.properties"); + } + + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void addRuntimeFactories(ISiriusServer server, String runtimepropertyfile) { + String v = null; + try { + Properties p = PropertyUtil.getPropertiesFromClasspath(runtimepropertyfile); + for (Object k : p.keySet()) { + String kk = (String) k; + v = p.getProperty(kk).trim(); + if (kk.startsWith("factory.")) { + try { + Class c = Class.forName(v); + if (v.endsWith("PackageImpl")) { + Method m = c.getMethod("init"); + EPackage p1 = (EPackage) m.invoke(null); + addFactory(p1.getEFactoryInstance()); + } else { + Constructor constructor = c.getConstructor(new Class[] { ISiriusServer.class }); + addFactory((EFactory) constructor.newInstance(server)); + } + logger.info("added runtime factory: " + v); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + } catch (IOException e) { + logger.info("No runtime propertyFile " + runtimepropertyfile); + } + } + + private EObject load(String directory) throws IOException { + return loadObjectFromDirectory(eFactory, eClassName, directory, true); + } + + private EObject loadObjectFromDirectory(EFactory eFactory, String eClassName, String directory, boolean b) + throws IOException { + List refs = new ArrayList(); + EObject res = loadObjectFromDirectory(eFactory, eClassName, directory, true, refs); + updateRefs(res, refs); + return res; + } + + private EObject loadObjectFromDirectory(EFactory f, String cName, String directory, boolean isRoot, List refs) + throws IOException { + String jsonFile = directory + (isRoot ? "/ROOT.json" : ".json"); + JSONObject json; + try { + File file = new File(jsonFile); + if (file.exists()) + json = JsonUtils.file2json(jsonFile); + else + json = new JSONObject(); + } catch (JSONException e) { + // printStackTrace(e,); + throw new RuntimeException("Invalid JSON: " + jsonFile + " " + e); + } + EObject res; + try { + res = loadObjectFromJson(f, cName, directory, json, refs); + handleReference(res, json, refs); + handleTransientAttributes(res, "server"); + } catch (Exception e) { + printStackTrace(e); + throw new RuntimeException("Serialization issue: " + jsonFile, e); + } + return res; + } + + private HashMap string2factory = new HashMap(); + + private EObject loadObjectFromJson(EFactory f, String cName, String directory, JSONObject json, List refs) + throws IOException { + f = addFactory(f); + HashSet used = new HashSet(); + if (json.has("$ecore")) { + used.add("$ecore"); + String pp = json.getJSONObject("$ecore").getString("ePackage"); + if (pp == null) + throw new RuntimeException("Package not found: " + json.toString(2)); + f = string2factory.get(pp); + cName = json.getJSONObject("$ecore").getString("eClass"); + if (f == null) + throw new RuntimeException("Factory not found: " + pp); + } + if (json.has("$class")) { + used.add("$class"); + String v = SomfVersionUpgrade(json.getString("$class")); + int i = v.lastIndexOf("."); + String pp = v.substring(0, i); + f = string2factory.get(pp); + cName = v.substring(i + 1); + if (f == null) { + throw new RuntimeException("Factory not found: " + pp); + } + } + if (f == null) { + throw new RuntimeException("Null Factory: " + json.toString(2)); + } + if (f.getEPackage() == null) { + throw new RuntimeException("Null Package: " + f + " " + json.toString(2)); + } + EClass c = (EClass) f.getEPackage().getEClassifier(cName); + if (c == null) { + logger.error("unable to create class: " + cName + " using factory " + f.getEPackage().getName() + " " + + json.toString(2)); + throw new RuntimeException("Unable to create class " + cName + " using factory " + + f.getEPackage().getName()); + } + EObject o = f.create(c); + // if (json.has("$class")) { + // System.err.println("creating object: " + directory + " " + f + " " + + // c); + // System.err.println(cName + " " + json); + // } + for (EAttribute attr : o.eClass().getEAllAttributes()) { + if (!json.has(attr.getName())) + continue; + if (o instanceof NamedEntity && attr.getName().equals("lastChanged") || o instanceof NamedEntity + && attr.getName().equals("created")) { + used.add(attr.getName()); + continue; + } + used.add(attr.getName()); + Object oJson = json.get(attr.getName()); + if (attr.isMany()) { + if (!(oJson instanceof JSONArray)) { + throw new RuntimeException("expect array of value: " + attr.getName()); + } + JSONArray aJson = (JSONArray) oJson; + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(attr); + for (int i = 0; i < aJson.length(); i++) { + l.add(jsonValue2attrValue(attr.getEAttributeType(), aJson.get(i))); + } + } else { + Object oo = null; + try { + if (attr.getEType().getName().endsWith("MetricAttribute")) { + // metric: use the metric APIs and need to be done after + // object is in the main tree. + } else { + oo = jsonValue2attrValue(attr.getEAttributeType(), oJson); + o.eSet(attr, oo); + } + } catch (Exception e) { + logger.error("Unable to set attr: eClass " + o.eClass().getName() + "@" + attr.getName() + " " + e); + System.err.println("Unable to set attr: eClass " + o.eClass().getName() + "@" + attr.getName() + + " " + attr.getEType().getName() + " " + e + " value=" + oJson + " class=" + + oJson.getClass() + " oo=" + oo + " class=" + (oo != null ? oo.getClass() : "")); + printStackTrace(e); + } + } + } + for (EReference ref : o.eClass().getEAllContainments()) { + if (json.has(ref.getName()) && !jsonHasVersion(json.get(ref.getName()))) { + // use JSON + used.add(ref.getName()); + Object oJson = json.get(ref.getName()); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + EAttribute namingAttr = namingAttribute(ref); + if (oJson instanceof JSONObject) { + if (namingAttr != null) { + JSONObject ooJson = (JSONObject) oJson; + for (Iterator i = ooJson.keys(); i.hasNext();) { + String k = i.next(); + if (k.startsWith("$")) continue; + if (ooJson.get(k) instanceof JSONArray) { + JSONArray a = (JSONArray) ooJson.get(k); + } + if (! (ooJson.get(k) instanceof JSONObject)) { + throw new RuntimeException("expect json of value: " + o.eClass().getName() + "@" + + ref.getName() + "." + k + " " + ooJson.get(k)); + } + JSONObject json2 = (JSONObject) ooJson.get(k); + json2.put(namingAttr.getName(), k); + String dir = directory + "/" + ref.getName(); + l.add(loadObjectFromJson(ref2factory(ref), ref.getEReferenceType().getName(), dir, + json2, refs)); + } + continue; + } + + } + if (!(oJson instanceof JSONArray)) { + throw new RuntimeException("expect object or array of value: " + ref.getName()); + } + JSONArray aJson = (JSONArray) oJson; + for (int i = 0; i < aJson.length(); i++) { + if (aJson.get(i) instanceof JSONObject) { + JSONObject json2 = (JSONObject) aJson.get(i); + if (namingAttr != null && ! json2.has(namingAttr.getName())) { + json2.put(namingAttr.getName(),Integer.toString(i)); + } + String dir = directory + "/" + ref.getName(); + l.add(loadObjectFromJson(ref2factory(ref), ref.getEReferenceType().getName(), dir, json2, + refs)); + } else + throw new RuntimeException("expect json of value: " + o.eClass().getName() + "@" + + ref.getName()); + } + } else { + if (oJson instanceof JSONObject) { + JSONObject json2 = (JSONObject) oJson; + String dir = directory + "/" + ref.getName(); + EObject o2 = loadObjectFromJson(ref2factory(ref), ref.getEReferenceType().getName(), dir, + json2, refs); + o.eSet(ref, o2); + } else if (oJson == null || oJson.getClass().getCanonicalName().equals("org.json.JSONObject.Null")) { + // null + } else + throw new RuntimeException("expect json of value: " + f.getEPackage().getName() + "." + cName + + " " + ref.getName() + " " + oJson.getClass().getCanonicalName()); + } + } else if (directory != null) { + // Look in Directory + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + File file = new File(directory + "/" + ref.getName()); + if (file.isDirectory()) { + EAttribute f1 = namingAttribute(ref); + File[] files = file.listFiles(); + if (files == null) { + logger.error("directory listing failed IO error??: " + file); + continue; + } + for (File file1 : sortFiles(directory, ref, files, json, used)) { + if (file1.getName().endsWith(".json")) { + String name = file1.getName().replace(".json", ""); + String dir2 = directory + "/" + ref.getName() + "/" + name; + EObject oo = loadObjectFromDirectory(ref2factory(ref), ref.getEType().getName(), dir2, + false, refs); + if (f1 != null) + oo.eSet(f1, name); + l.add(oo); + } + } + } + } else { + File file = new File(directory + "/" + ref.getName() + ".json"); + if (file.exists()) { + EObject oo = loadObjectFromDirectory(ref2factory(ref), ref.getEType().getName(), directory + + "/" + ref.getName(), false, refs); + o.eSet(ref, oo); + } + } + } + } + for (Iterator i = json.keys(); i.hasNext();) { + String k = i.next(); + if (used.contains(k)) + continue; + Object o1 = json.get(k); + if (o1 instanceof JSONObject) { + JSONObject json1 = (JSONObject) o1; + if (json1.has("$ref")) + continue; + } + if (o1 instanceof JSONArray) { + JSONArray a1 = (JSONArray) o1; + if (a1.length() == 0) + continue; + Object o2 = a1.get(0); + if (o2 instanceof JSONObject) { + JSONObject json2 = (JSONObject) o2; + if (json2.has("$ref")) + continue; + } + } + if (k.equals("$nosave")) + continue; + logger.warn("JSON value not used: " + k + " " + f.getEPackage().getName() + "." + cName + " " + json.get(k)); + } + return o; + } + + private String SomfVersionUpgrade(String className) { + if (className.equals("org.openecomp.ncomp.sirius.manager.model.StringMetric")) + return "org.openecomp.ncomp.core.metrics.StringMetric"; + if (className.equals("org.openecomp.ncomp.sirius.manager.model.DoubleMetric")) + return "org.openecomp.ncomp.core.metrics.DoubleMetric"; + if (className.equals("org.openecomp.ncomp.sirius.manager.model.LongMetric")) + return "org.openecomp.ncomp.core.metrics.LongMetric"; + if (className.equals("org.openecomp.ncomp.sirius.manager.model.ModuleProperty")) + return "org.openecomp.ncomp.sirius.manager.properties.ModuleProperty"; + return className; + } + + private List sortFiles(String dir, EReference ref, File[] files, JSONObject json, HashSet used) { + // boolean debug = dir.contains("metricOptions"); + List res = new ArrayList(); + Arrays.sort(files); + for (File f : files) { + if (f.getName().endsWith(".json")) + res.add(f); + } + // if (debug) System.err.println("HERE: " + json.toString(2)); + if (ref.isOrdered() && json.has("$order:" + ref.getName())) { + used.add("$order:" + ref.getName()); + try { + JSONArray a = json.getJSONArray("$order:" + ref.getName()); + List files1 = new ArrayList(); + HashMap m = new HashMap(); + for (File f : res) { + m.put(f.getName(), f); + } + for (int i = 0; i < a.length(); i++) { + String n = a.getString(i) + ".json"; + if (m.containsKey(n)) { + files1.add(m.remove(n)); + // if (debug) System.err.println("HERE: added1 " + + // files1.get(files1.size()-1)); + } else { + logger.warn("files does not contain key:" + n + " in " + dir); + } + } + for (String n : SortUtil.sort(m.keySet())) { + files1.add(m.get(n)); + // if (debug) System.err.println("HERE: added2 " + + // files1.get(files1.size()-1)); + logger.warn("order does not contain key:" + n + " in " + dir); + } + return files1; + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + return res; + } + } else { + return res; + } + } + + private HashMap name2properties = new HashMap(); + + private void handleTransientAttributes(EObject o, String path) { + for (EAttribute attr : o.eClass().getEAllAttributes()) { + if (!attr.isTransient()) + continue; + EAnnotation anno = attr.getEAnnotation(PERSIST); + if (anno == null) + continue; + if (attr.isMany()) { + logger.warn("property persistence for list attributes not current supported: " + attr2name(attr)); + continue; + } + String propertyFile = anno.getDetails().get("propertyFile"); + if (propertyFile == null) { + logger.warn("Missing persistence detail propertyFile: " + attr2name(attr)); + continue; + } + Properties p; + if (name2properties.get(propertyFile) == null) { + p = new Properties(); + try { + p = PropertyUtil.getPropertiesFromClasspath(propertyFile); + } catch (IOException e) { + logger.warn("Missing persistence propertyFile: " + propertyFile + " " + e); + } + name2properties.put(propertyFile, p); + } + p = name2properties.get(propertyFile); + String path1 = path + "." + attr.getName(); + String s = p.getProperty(path1); + if (s == null) { + logger.warn("unable to determine value for: " + attr2name(attr) + " path: " + path1 + " file: " + + propertyFile); + } + o.eSet(attr, stringValue2attrValue(attr.getEAttributeType(), s)); + } + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + for (EObject oo : l) { + EStructuralFeature f = oo.eClass().getEStructuralFeature("name"); + if (f instanceof EAttribute) { + EAttribute attr = (EAttribute) f; + Object nn = oo.eGet(attr); + if (!(nn instanceof String)) + continue; + String path1 = path + "." + ref.getName() + "." + nn; + handleTransientAttributes(oo, path1); + } + } + } else { + String path1 = path + "." + ref.getName(); + EObject oo = (EObject) o.eGet(ref); + if (oo != null) + handleTransientAttributes(oo, path1); + } + } + } + + private String attr2name(EAttribute attr) { + StringBuffer b = new StringBuffer(); + b.append(attr.getEContainingClass().getEPackage().getName()); + b.append("::"); + b.append(attr.getEContainingClass().getName()); + b.append("::"); + b.append(attr.getName()); + return b.toString(); + } + + private String ref2name(EReference ref) { + StringBuffer b = new StringBuffer(); + b.append(ref.getEContainingClass().getEPackage().getName()); + b.append("::"); + b.append(ref.getEContainingClass().getName()); + b.append("::"); + b.append(ref.getName()); + return b.toString(); + } + + int j = 0; + public boolean saveOnCreate = true; + + private EFactory ref2factory(EReference ref) { + return ref.getEReferenceType().getEPackage().getEFactoryInstance(); + } + + private EObject loadObjectFromJson(EFactory f, String cName, JSONObject json, List refs) { + try { + return loadObjectFromJson(f, cName, null, json, refs); + } catch (IOException e) { + printStackTrace(e); + } + return null; + } + + static int id = 0; + + public Properties getProps() { + return props; + } + + private EReference findRefByName(EObject o, String name) { + return (EReference) o.eClass().getEStructuralFeature(name); + } + + @SuppressWarnings("unused") + private EAttribute findAttrByName(EObject o, String name) { + return (EAttribute) o.eClass().getEStructuralFeature(name); + } + + public Subject find(String resourcePath) { + return find(root, resourcePath); + } + + static public Subject find(EObject o, String resourcePath) { + return find(o, resourcePath, false); + } + + static public Subject find(EObject o, String resourcePath, boolean allowPartial) { + if (resourcePath.equals("/")) + return new Subject(o); + if (resourcePath.startsWith("../..")) + return (o.eContainer() == null) ? null : find(o.eContainer(), resourcePath.substring(3), allowPartial); + if (resourcePath.startsWith("../")) + return (o.eContainer() == null) ? null : find(o.eContainer(), resourcePath.substring(2), allowPartial); + return find(o, resourcePath.split("/"), 1, allowPartial); + } + + static private Subject find(EObject o, String[] l, int i, boolean allowPartial) { + if (o == null) + return null; + if (i == l.length) + return new Subject(o); + EStructuralFeature f = o.eClass().getEStructuralFeature(l[i]); + if (f instanceof EReference) { + EReference ref = (EReference) f; + if (ref.isMany()) { + if (i + 1 == l.length) + return new Subject(o, ref); + @SuppressWarnings("unchecked") + EList ll = (EList) o.eGet(ref); + for (EObject oo : ll) { + String s = ecoreId(oo); + if (s != null && s.equals(l[i + 1])) + return find(oo, l, i + 2, allowPartial); + } + if (allowPartial) + return new Subject(o, ref); + } else { + EObject oo = (EObject) o.eGet(ref); + if (oo == null && allowPartial) + return new Subject(o, ref); + return find(oo, l, i + 1, allowPartial); + } + } + if (f instanceof EAttribute && i + 1 == l.length) { + return new Subject(o, (EAttribute) f); + } + if (allowPartial) + return new Subject(o); + return null; + } + + public List findAll(String resourcePath) { + return findAll(root, resourcePath); + } + + static public List findAll(EObject o, String resourcePath) { + List res = new ArrayList(); + if (resourcePath.equals("/") || resourcePath.equals("")) { + res.add(o); + } else { + findAll(o, resourcePath.split("/"), resourcePath.startsWith("/") ? 1 : 0, res); + } + return res; + } + + static private void findAll(EObject o, String[] l, int i, List res) { + if (o == null) + return; + if (i == l.length) { + res.add(o); + return; + } + EStructuralFeature f = o.eClass().getEStructuralFeature(l[i]); + if (f instanceof EReference) { + EReference ref = (EReference) f; + if (ref.isMany()) { + if (i + 1 == l.length) + return; + @SuppressWarnings("unchecked") + EList ll = (EList) o.eGet(ref); + for (EObject oo : ll) { + String s = ecoreId(oo); + if (s != null && s.matches(l[i + 1])) + findAll(oo, l, i + 2, res); + } + } else { + findAll((EObject) o.eGet(ref), l, i + 1, res); + } + } + } + + public static EList findReferences(EObject root, EObject o, boolean recursive) { + EList res = new BasicEList(); + if (recursive) { + for (EObject o1 : object2containedObjects(o)) { + // System.err.println(object2ref(root) + " " + object2ref(o1)); + findReferences(root, o1, res); + } + } else + findReferences(root, o, res); + return res; + } + + private static void findReferences(EObject oo, EObject o, EList res) { + if (oo == o) + return; + // if (object2ref(oo).startsWith("/con")) + // System.err.println("XYZZZ: " + object2ref(oo) + " " + object2ref(o)); + for (EReference ref : oo.eClass().getEAllReferences()) { + if (ref.isContainment()) { + for (EObject o1 : ref2objects(oo, ref)) { + findReferences(o1, o, res); + } + } else { + for (EObject o1 : ref2objects(oo, ref)) { + if (o1 == o) { + res.add(new Subject(oo, ref)); + } + } + } + } + + } + + @SuppressWarnings("unchecked") + private static EList ref2objects(EObject o, EReference ref) { + EList res = new BasicEList(); + Object x = o.eGet(ref); + if (ref.isMany()) { + // Try 3 times to create list. + boolean done = false; + for (int i = 0; i < 3; i++) { + try { + res.clear(); + res.addAll((EList) x); + done = true; + break; + } catch (ConcurrentModificationException e) { + if (i == 2) { + logger.error("Failing to create object list: " + object2ref(o) + " @ " + ref.getName(), e); + } + continue; + } + } + if (!done) { + System.err.println("unable to create object list: " + object2ref(o) + "@" + ref.getName()); + + logger.error("unable to create object list: " + object2ref(o) + "@" + ref.getName()); + } + } else { + if (x != null) + res.add((EObject) x); + } + return res; + } + + public static EList object2containedObjects(EObject o) { + EList res = new BasicEList(); + object2containedObjects(o, res); + return res; + } + + private static void object2containedObjects(EObject o, EList res) { + res.add(o); + for (EReference ref : o.eClass().getEAllReferences()) { + if (ref.isContainment()) { + for (EObject o2 : ref2objects(o, ref)) { + object2containedObjects(o2, res); + } + } + } + } + + private Object create(Subject subject, JSONObject json, boolean save) { + EObject o = subject.o; + EReference ref = subject.ref; + if (ref == null) + throw new RuntimeException("Need ref name"); + List refs = new ArrayList(); + EObject oo = loadObjectFromJson(ref2factory(ref), ref.getEReferenceType().getName(), json, refs); + handleReference(oo, json, refs); + updateRefs(root, refs); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList ll = (EList) o.eGet(ref); + ll.add(oo); + } else { + if (o.eGet(ref) != null) + throw new RuntimeException("Cannot create: object already exists"); + o.eSet(ref, oo); + } + String path = "server" + object2ref(oo); + handleTransientAttributes(oo, path.replace("/", ".")); + setCreated(oo); + if (save) { + save(); + } else { + if (logger.isDebugEnabled()) + logger.debug("create not saved: " + object2ref(oo)); + } + if (oo instanceof ISiriusPlugin) { + ISiriusPlugin oo2 = (ISiriusPlugin) oo; + oo2.start(); + } + return null; + } + + public EObject json2ecore(EClass eClass, JSONObject json) { + return json2ecore(eClass, json, true); + } + + public EObject json2ecore(EClass eClass, JSONObject json, boolean refRelativeToRoot) { + List refs = new ArrayList(); + EObject oo = loadObjectFromJson(eClass.getEPackage().getEFactoryInstance(), eClass.getName(), json, refs); + handleReference(oo, json, refs); + updateRefs(refRelativeToRoot ? root : oo, refs); + return oo; + } + + public EObject findAndCreate(EObject o, String path) { + Subject s = findAndCreateSubject(o, path); + if (s.ref == null) + return s.o; + return (EObject) o.eGet(s.ref); + } + + public Subject findAndCreateSubject(EObject o, String path) { + Subject s = find(o, path); + if (s != null && s.o != null) { + return s; + } + int index = path.lastIndexOf("/"); + String id = path.substring(index + 1, path.length()); + if (id.length() == 0) { + throw new RuntimeException("empty string ID: " + object2ref(o) + " " + path); + } + String path1 = path.substring(0, index); + Subject s1 = findAndCreateSubject(o, path1); + if (s1 == null || s1.o == null) { + throw new RuntimeException("unable to find resource: " + object2ref(o) + " " + path); + } + s = find(o, path); + if (s == null) { + JSONObject json = new JSONObject(); + json.put("$nosave", true); // TODO + if (s1.ref != null && s1.ref.isMany()) { + json.put("name", id); + } + if (s1.ref == null) { + s1.ref = findRefByName(s1.o, id); + } + // System.err.println("PP creating: " + object2ref(o) + " " + path); + // Thread.dumpStack(); + create(s1, json, true); + return find(o, path); + } else + return s; + } + + public Object update(String userName, Subject subject, JSONObject json, boolean useNulls) { + EObject o = subject.o; + EReference ref = subject.ref; + if (json == null) + throw new RuntimeException("Need object to update"); + if (o == null || ref != null) + throw new RuntimeException("Need object to update"); + List refs = new ArrayList(); + EObject oo = loadObjectFromJson(o.eClass().getEPackage().getEFactoryInstance(), o.eClass().getName(), json, + refs); + handleReference(oo, json, refs); + List deleted = new ArrayList(); + merge(o, oo, useNulls ? null : json, json.has("$updateEnumWithDefault"), deleted); + for (EObject o1 : deleted) { + if (!json.has("$forcedUpdate")) + checkIfDeleteIsAllowed(o1); + if (!pe.permit(userName, "DELETE", object2ref(o1))) { + throw new RuntimeException("Update Action results in DELETE not permitted: " + userName + " " + + object2ref(o1)); + } + } + if (deleted.size() > 0) + logger.warn("update deletes: " + objects2ref(deleted)); + updateRefs(root, refs); + merge(o, oo, useNulls ? null : json, json.has("$updateEnumWithDefault"), null); + updateMetricValues(o, json); + if (saveOnCreate && !json.has("$nosave")) + save(); + return null; + } + + private void updateMetricValues(EObject o, JSONObject json) { + // String xx = json == null ? "NULL" : json.toString(2); + // System.err.println("HERE: " + object2ref(o) + " " + (xx.length() > + // 1000 ? xx.subSequence(0, 500)+"...." : xx)); + if (json == null) + return; + NamedEntity o1 = (o instanceof NamedEntity) ? (NamedEntity) o : null; + boolean changed = false; + for (EAttribute attr : o.eClass().getEAllAttributes()) { + if (!attr.getEType().getName().endsWith("MetricAttribute")) + continue; + if (!json.has(attr.getName())) + continue; + metrics.updateMetric(o, attr, json.get(attr.getName())); + changed = true; + } + // handle containment references + for (EReference ref : o.eClass().getEAllReferences()) { + if (!ref.isContainment()) + continue; + Object o2 = o.eGet(ref); + if (o2 == null) + continue; + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o2; + for (EObject o3 : l) { + if (o3 instanceof NamedEntity) + updateMetricValues(o3, findJsonInNamedList(o3, findJsonWithName(json, ref.getName()))); + } + } else { + EObject o3 = (EObject) o2; + updateMetricValues(o3, findJsonWithName(json, ref.getName())); + } + } + if (changed && o1 != null) + o1.setLastChanged(new Date()); + } + + public static void merge(EObject o, EObject oo, JSONObject json, boolean updateEnumWithDefault, + List deleted) { + boolean makeChange = deleted == null; + NamedEntity o1 = (o instanceof NamedEntity) ? (NamedEntity) o : null; + boolean changed = false; + if (json != null && json.has("$useNull")) + json = null; + for (EAttribute attr : oo.eClass().getEAllAttributes()) { + if (!makeChange) + continue; // TODO verify errors + EStructuralFeature f = o.eClass().getEStructuralFeature(attr.getName()); + if (!(f instanceof EAttribute)) + continue; + EAttribute attr1 = (EAttribute) f; + if (attr.getEType() != attr1.getEType()) + continue; + if (attr.getName().equals("name")) + continue; // for now. do not merge name. + Object o2 = oo.eGet(attr); + if (json != null && !json.has(attr.getName())) + continue; + // TODO handle EEnums better. If o2 is the default value do not + // update + if (!updateEnumWithDefault && attr1.getEType() instanceof EEnum) { + EEnum enum1 = (EEnum) attr1.getEType(); + if (enum1.getDefaultValue() == o2) + continue; + } + Object o3 = o.eGet(attr1); + if (!objectEquals(o2, o3)) { + o.eSet(attr1, o2); + if (o1 != null) + changed = true; + } + } + // handle non-containment references + for (EReference ref : oo.eClass().getEAllReferences()) { + if (!makeChange) + continue; // TODO verify errors + if (ref.isContainment() || ref.isContainer()) + continue; + EStructuralFeature f = o.eClass().getEStructuralFeature(ref.getName()); + if (!(f instanceof EReference)) + continue; + EReference ref1 = (EReference) f; + if (ref.getEType() != ref1.getEType()) { + logger.warn("merge cannot handle different type: " + ref.getEType() + " " + ref1.getEType()); + continue; + } + Object o2 = oo.eGet(ref); + if (json != null && !json.has(ref.getName())) + continue; + if (ref.isMany() && json != null && !json.has(ref.getName())) { + @SuppressWarnings("unchecked") + EList l = (EList) o2; + if (l.size() == 0) + continue; + } + Object o3 = o.eGet(ref1); + if (!objectEquals(o2, o3)) { + o.eSet(ref1, o2); + if (o1 != null) + changed = true; + } + } + // handle containment references + for (EReference ref : oo.eClass().getEAllReferences()) { + if (!ref.isContainment()) + continue; + EStructuralFeature f = o.eClass().getEStructuralFeature(ref.getName()); + if (!(f instanceof EReference)) + continue; + EReference ref1 = (EReference) f; + if (ref.getEType() != ref1.getEType()) { + logger.warn("merge containment cannot handle different type: " + ref.getEType() + " " + ref1.getEType()); + throw new RuntimeException("merge containment cannot handle different type: " + ref.getEType() + " " + + ref1.getEType()); + } + Object o2 = oo.eGet(ref); + if (json != null && !json.has(ref.getName())) + continue; + if (ref.isMany() && json != null && !json.has(ref.getName())) { + @SuppressWarnings("unchecked") + EList l = (EList) o2; + if (l.size() == 0) + continue; + } + Object o3 = o.eGet(ref1); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l2 = (EList) o2; + @SuppressWarnings("unchecked") + EList l3 = (EList) o3; + EList l4 = new BasicEList(); + if (l2.size() != l3.size()) + changed = true; + for (EObject oo2 : l2) { + EObject oo3 = findInNamedList(l3, oo2); + if (oo3 != null) + merge(oo3, oo2, findJsonInNamedList(oo3, findJsonWithName(json, ref.getName())), + updateEnumWithDefault, deleted); + else { + if (makeChange) { + oo3 = EcoreUtil.copy(oo2); + setCreated(oo3); + changed = true; + } + } + l4.add(oo3); + } + for (EObject oo3 : l3) { + // System.err.println("XXYYZZ: " + objects2ref(l4) + " " + + // object2ref(oo3) + " " + + // objects2ref(l4).contains(object2ref(oo3)) + " " + + // l4.contains(oo3)); + if (l4.contains(oo3)) + continue; + // oo3 deleted + if (makeChange) + changed = true; + else + deleted.add(oo3); + } + if (makeChange) { + l3.clear(); + l3.addAll(l4); + } + } else { + if (o3 == null && o2 == null) + continue; + if (o3 == null && o2 != null) { + if (makeChange) { + EObject o4 = EcoreUtil.copy((EObject) o2); + if (o2.getClass() != o4.getClass()) { + // TODO issue when o2 is a SOMF provided object. The + // Type of o4 is not done right. + System.err.println("Object copy does not preserve class: " + o2.getClass() + " -> " + + o4.getClass()); + } + setCreated(o4); + o.eSet(ref1, o4); + changed = true; + } + continue; + } + if (o3 != null && o2 == null) { + if (makeChange) { + o.eSet(ref1, null); + changed = true; + } else + deleted.add((EObject) o3); + continue; + } + merge((EObject) o3, (EObject) o2, findJsonWithName(json, ref.getName()), updateEnumWithDefault, deleted); + } + } + if (changed && o1 != null) + o1.setLastChanged(new Date()); + } + + private static void setCreated(EObject o) { + if (o == null) + return; + if (o instanceof NamedEntity) { + NamedEntity n = (NamedEntity) o; + n.setCreated(new Date()); + } + // handle containment references + for (EReference ref : o.eClass().getEAllReferences()) { + if (!ref.isContainment()) + continue; + Object o1 = o.eGet(ref); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o1; + for (EObject o2 : l) + setCreated(o2); + } else + setCreated((EObject) o1); + } + } + + private static JSONObject findJsonWithName(JSONObject json, String name) { + return (json != null && json.has(name)) ? json.getJSONObject(name) : null; + } + + private static JSONObject findJsonInNamedList(EObject o, Object json) { + if (o instanceof NamedEntity) { + NamedEntity o1 = (NamedEntity) o; + if (json instanceof JSONObject) { + JSONObject json1 = (JSONObject) json; + if (json1.has(o1.getName())) { + return json1.getJSONObject(o1.getName()); + } + } + } + return null; + } + + public static EObject findInNamedList(EList l, String name) { + if (name == null) + return null; + for (EObject o2 : l) { + NamedEntity n2 = (o2 instanceof NamedEntity) ? (NamedEntity) o2 : null; + if (n2 != null && name.equals(n2.getName())) + return o2; + } + return null; + } + + private static EObject findInNamedList(EList l, EObject o) { + if (o instanceof NamedEntity) + return findInNamedList(l, ((NamedEntity) o).getName()); + return null; + } + + private static boolean objectEquals(Object o1, Object o2) { + if (o1 == null && o2 == null) + return true; + if (o1 != null && o2 == null) + return false; + if (o2 == null && o1 != null) + return false; + return o2.equals(o1); + } + + private Object delete(Subject subject) { + if (subject == null || subject.o == null) + throw new RuntimeException("Object does not exists"); + if (subject.ref != null) { + for (EObject o : ref2objects(subject.o, subject.ref)) { + checkIfDeleteIsAllowed(o); + } + if (subject.ref.isMany()) { + @SuppressWarnings("unchecked") + EList ll = (EList) subject.o.eGet(subject.ref); + ll.clear(); + } else { + subject.o.eSet(subject.ref, null); + } + return null; + } + if (subject.o.eContainmentFeature() == null) + throw new RuntimeException("Cannot delete root object"); + checkIfDeleteIsAllowed(subject.o); + if (subject.o.eContainmentFeature() instanceof EReference) { + EReference ref = subject.o.eContainmentFeature(); + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList ll = (EList) subject.o.eContainer().eGet(ref); + ll.remove(subject.o); + } else { + subject.o.eContainer().eSet(ref, null); + } + } + if (saveOnCreate) + save(); + return null; + } + + private void checkIfDeleteIsAllowed(EObject o) { + // System.err.println("checkIfDeleteIsAllowed: " + o + " size=" + + // findReferences(root, o, true).size()); + if (findReferences(root, o, true).size() > 0) { + throw new RuntimeException("Unable to delete object (references exists): " + object2ref(o)); + } + } + + private Object list(Subject subject, int levels) { + if (subject == null) { + return null; + } + if (subject.ref == null) { + return ecore2json(subject.o, levels, null, true); + } + + // isMany ref need to return a list of IDs + JSONObject json = new JSONObject(); + json.put(subject.ref.getName(), ecorelist2jsonArray(subject.o, subject.ref)); + return json; + } + + private static Object ecorelist2jsonArray(EObject o, EReference ref) { + JSONArray a = new JSONArray(); + @SuppressWarnings("unchecked") + EList ll = (EList) o.eGet(ref); + for (EObject oo : ll) { + a.put(ecoreId(oo)); + } + return a; + } + + private static Object ecorelist2jsonNodeArray(EObject o, EReference ref) { + JSONObject json = new JSONObject(); + JSONArray a = new JSONArray(); + json.put("$children", a); + json.put("$ordered", ref.isOrdered()); + @SuppressWarnings("unchecked") + EList ll = (EList) o.eGet(ref); + for (EObject oo : ll) { + a.put(ecoreId(oo)); + } + return json; + } + + private static Object ecore2jsonNode(EObject o, EReference ref) { + JSONObject json = new JSONObject(); + json.put("$isNull", o == null); + json.put("$child", ref.getName()); + json.put("$required", ref.isRequired()); + return json; + } + + private static JSONArray list2jsonArray(List ll) { + JSONArray a = new JSONArray(); + for (EObject oo : ll) { + a.put(object2ref(oo)); + } + return a; + } + + private static JSONArray subjectList2jsonArray(List ll) { + JSONArray a = new JSONArray(); + for (Subject subject : ll) { + JSONObject o = new JSONObject(); + o.put("path", object2ref(subject.o)); + o.put("ref", subject.ref.getName()); + a.put(o); + } + return a; + } + + public static JSONObject ecore2json(EObject o, int levels, EClass defaultClass, boolean showTransient) { + return ecore2json(o, levels, defaultClass, showTransient, false, true); + } + + public static JSONObject ecore2json(EObject o, int levels, EClass defaultClass, boolean showTransient, + boolean showNaming, boolean showEmptyLists) { + JSONObject json = new JSONObject(); + if (defaultClass == null && o.eContainer() != null) + defaultClass = (EClass) o.eContainingFeature().getEType(); + if (levels == -2000) { + json.put("$name", o.eContainer() == null ? "/" : object2ref(o)); + json.put("$class", o.eClass().getEPackage().getNsURI() + "." + o.eClass().getName()); + json.put("$time", new Date().getTime()); + json.put("$version", "1.10.0"); + } else if (o.eClass() != defaultClass) { + // object class id not default class + json.put("$class", o.eClass().getEPackage().getNsURI() + "." + o.eClass().getName()); + } + // json.put("$implClass", o.getClass().getName()); + EAttribute namingAttr = namingAttribute(o.eContainmentFeature()); + for (EAttribute attr : o.eClass().getEAllAttributes()) { + if (!showTransient && attr.isTransient()) + continue; + if (attr.getEAnnotation(PERSIST) != null) + continue; + if (!showNaming && attr == namingAttr) + continue; + // if (o instanceof NamedEntity && + // attr.getName().equals("lastChanged")) + // continue; + // if (o instanceof NamedEntity && attr.getName().equals("created")) + // continue; + if (attr.isMany()) { + if (attr.getEType().getInstanceTypeName().equals("org.eclipse.emf.ecore.util.FeatureMap$Entry")) + continue; + JSONArray a = new JSONArray(); + json.put(attr.getName(), a); + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(attr); + if (l == null) { + logger.warn("attribute list returned null: " + object2ref(o) + " " + attr.getName()); + continue; + } + for (Object oo : l) { + a.put(attr2jsonValue(levels, oo, attr.getEType())); + } + } else { + // System.out.println("HERE 99: " + o + " " + attr + " " + + // o.eGet(attr)); + json.put(attr.getName(), attr2jsonValue(levels, o.eGet(attr), attr.getEType())); + } + } + for (EReference ref : o.eClass().getEAllReferences()) { + if (ref.isContainment() || ref.isContainer()) + continue; + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + JSONArray a = new JSONArray(); + for (EObject oo : l) { + JSONObject json1 = new JSONObject(); + json1.put("$ref", oo == null ? "NULL" : object2ref(oo)); + a.put(json1); + } + json.put(ref.getName(), a); + } else { + EObject oo = (EObject) o.eGet(ref); + if (oo == null) + continue; + JSONObject json1 = new JSONObject(); + json1.put("$ref", object2ref(oo)); + json.put(ref.getName(), json1); + } + } + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + if (levels == 0) { + json.put(ref.getName(), ecorelist2jsonArray(o, ref)); + continue; + } + if (levels < -1000) { + json.put(ref.getName(), ecorelist2jsonNodeArray(o, ref)); + continue; + } + if (levels < 0) + continue; + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + if (!showEmptyLists && l.size() == 0) + continue; + EAttribute f = namingAttribute(ref); + if (f != null) { + JSONObject json1 = new JSONObject(); + json.put(ref.getName(), json1); + for (EObject oo : l) { + String nn; + if (oo.eGet(f) instanceof EDataTypeEList) { + @SuppressWarnings("rawtypes") + EDataTypeEList xx = (EDataTypeEList) oo.eGet(f); + nn = xx.toString(); + System.err.println(oo.eClass().getName() + " " + f.getName() + " " + xx); + continue; + } else + nn = (String) oo.eGet(f); + if (nn == null) { + logger.warn("name is null " + oo + " " + f); + continue; + } + if (json1.has(nn)) { + System.err.println("name is already used " + nn + " " + object2ref(o) + "@" + f.getName()); + continue; + } + json1.put( + nn, + ecore2json(oo, levels - 1, ref.getEReferenceType(), showTransient, showNaming, + showEmptyLists)); + } + } else { + JSONArray a = new JSONArray(); + json.put(ref.getName(), a); + for (EObject oo : l) { + a.put(ecore2json(oo, levels - 1, ref.getEReferenceType(), showTransient)); + } + } + } else { + EObject oo = (EObject) o.eGet(ref); + if (oo != null || levels < -1) { + if (levels == 0) + json.put(ref.getName(), new JSONObject()); + else if (levels < -1000) + json.put(ref.getName(), ecore2jsonNode(oo, ref)); + else if (levels > 0) + json.put( + ref.getName(), + ecore2json(oo, levels - 1, ref.getEReferenceType(), showTransient, showNaming, + showEmptyLists)); + } + + } + } + return json; + } + + private static EAttribute namingAttribute(EReference ref) { + if (ref == null || !ref.isMany()) + return null; + EStructuralFeature f = ref.getEReferenceType().getEStructuralFeature("name"); + if (f instanceof EAttribute) { + EAttribute ff = (EAttribute) f; + if (ff.getEType().getInstanceClass().getName().equals("java.lang.String")) { + return ff; + } + } + return null; + } + + public static String object2ref(EObject oo) { + if (oo.eContainer() == null) { + return ""; + } + if (!(oo.eContainingFeature() instanceof EReference)) { + System.err.println("XXXX: oo=" + oo + " fea=" + oo.eContainingFeature()); + throw new RuntimeException("eContainingFeature not an reference: " + oo); + } + EReference ref = (EReference) oo.eContainingFeature(); + StringBuffer b = new StringBuffer(); + b.append(object2ref(oo.eContainer())); + b.append("/"); + b.append(ref.getName()); + if (ref.isMany()) { + b.append("/"); + b.append(ecoreId(oo)); + } + return b.toString(); + } + + public static List objects2ref(Collection l) { + List res = new ArrayList(); + for (EObject o : l) { + res.add(object2ref(o)); + } + return res; + } + + public static String relativeObject2ref(EObject o1, EObject oo) { + if (o1 == oo) + return ""; + if (oo.eContainer() == null) { + return null; + } + EReference ref = (EReference) oo.eContainingFeature(); + StringBuffer b = new StringBuffer(); + b.append(relativeObject2ref(o1, oo.eContainer())); + b.append("/"); + b.append(ref.getName()); + if (ref.isMany()) { + b.append("/"); + b.append(ecoreId(oo)); + } + return b.toString(); + } + + @SuppressWarnings({ "rawtypes" }) + private Object operation(Subject subject, String action, JSONObject json, JSONObject context) { + EObject o = subject.o; + EClass eClass = o.eClass(); + EOperation op = null; + for (EOperation op1 : eClass.getEAllOperations()) { + if (op1.getName().equals(action)) { + op = op1; + break; + } + } + if (op == null) + throw new RuntimeException("No such operation:" + action); + try { + List argTypes = new ArrayList(); + List args = new ArrayList(); + for (EParameter p : op.getEParameters()) { + if (p.getEType().getName().equals("RemoteContext")) { + // special case for getting context information (e.g. remote + // IP) to operations. + if (json.has(p.getName())) + context.put("remote", json.get(p.getName())); + args.add(context); + argTypes.add(JSONObject.class); + continue; + } + if (!json.has(p.getName())) { + logger.warn("Operation " + PropertyUtil.replaceForLogForcingProtection(action) + " has missing parameter:" + p.getName()); + } + Object oo = null; + if (p.isMany()) { + EList l = new BasicEList(); + oo = l; + if (json.has(p.getName())) { + Object o2 = json.get(p.getName()); + if (!(o2 instanceof JSONArray)) { + throw new RuntimeException("parameter need to be a Json array:" + p.getName()); + } + JSONArray a = (JSONArray) o2; + for (int i = 0; i < a.length(); i++) { + Object o3 = a.get(i); + if (p.getEType() instanceof EClass) { + EClass eClass1 = (EClass) p.getEType(); + if (!(o3 instanceof JSONObject)) + throw new RuntimeException("parameter need to be a Json object:" + p.getName()); + EObject ooo = parameterObjectFromJson(eClass1, (JSONObject) o3); + l.add(ooo); + } + if (p.getEType() instanceof EDataType) { + l.add(jsonValue2attrValue((EDataType) p.getEType(), o3)); + } + } + } + args.add(oo); + argTypes.add(EList.class); + } else { + if (json.has(p.getName())) { + Object o2 = json.get(p.getName()); + if (p.getEType() instanceof EClass) { + EClass eClass1 = (EClass) p.getEType(); + if (!(o2 instanceof JSONObject)) + throw new RuntimeException("parameter need to be a Json object:" + p.getName()); + EObject ooo = parameterObjectFromJson(eClass1, (JSONObject) o2); + oo = ooo; + } + if (p.getEType() instanceof EDataType) { + EDataType eType = (EDataType) p.getEType(); + oo = jsonValue2attrValue(eType, o2); + } + + } + args.add(oo); + argTypes.add(p.getEType().getInstanceClass()); + } + } + Class c = subject.o.getClass(); + Method m = c.getMethod(action, argTypes.toArray(new Class[argTypes.size()])); + // System.err.println("YYYY: " + o + " " + subject + " " + action + + // " " + m + " " + argTypes); + Object oo = m.invoke(o, args.toArray(new Object[args.size()])); + JSONObject res = new JSONObject(); + if (oo instanceof EList) { + EList l = (EList) oo; + JSONArray a = new JSONArray(); + for (Object ooo : l) { + if (ooo instanceof EObject) { + EObject eo = (EObject) ooo; + a.put(ecore2json(eo, 100, (EClass) op.getEType(), true, true, true)); + } else { + a.put(attr2jsonValue(0, ooo, op.getEType())); + } + } + res.put("returns", a); + } else if (oo instanceof EObject) { + EObject eo = (EObject) oo; + res.put("returns", ecore2json(eo, 100, (EClass) op.getEType(), true, true, true)); + } else { + res.put("returns", oo == null ? null : attr2jsonValue(0, oo, op.getEType())); + } + return res; + } catch (Exception e) { + JSONObject res = new JSONObject(); + if (e instanceof InvocationTargetException && e.getCause() instanceof Exception) { + e = (Exception) e.getCause(); + } + res.put("exception", e.toString()); + // res.put("location", e.getStackTrace()[1].toString()); + res.put("directory", props.get("user.dir")); + res.put("user", props.get("user.name")); + res.put("hostname", props.get("user.hostname")); + res.put("port", props.get("server.port")); + res.put("class", eClassName); + res.put("action", action); + res.put("request", json); + res.put("context", context); + if (e instanceof ManagementServerError) { + ManagementServerError ee = (ManagementServerError) e; + res.put("remote", ee.getJson()); + } else + printStackTrace(e); + List args = new ArrayList(); + for (EParameter p : op.getEParameters()) { + args.add(p.getEType().getName()); + } + logger.error(PropertyUtil.replaceForLogForcingProtection("operation " + action + "(" + StringUtil.join(args, ",") + ") failed requestId: " + + context.getString("requestId") + " " + e)); + throw new ManagerException(500, "operation failed: " + action + "\n" + res.toString(2)); + } + } + + private EObject parameterObjectFromJson(EClass eClass1, JSONObject json) { + if (json.has("$ref")) { + String path = (String) json.get("$ref"); + if (path.equals("NULL")) + return null; + if (path.equals("")) + return null; + Subject s = find(root, path); + if (s.o == null) + return null; + if (!eClass1.isInstance(s.o)) { + throw new RuntimeException("Bad type expected: " + eClass1.getName() + " " + path); + } + return s.o; + } + List refs = new ArrayList(); + EObject ooo = loadObjectFromJson(eClass1.getEPackage().getEFactoryInstance(), eClass1.getName(), json, refs); + updateRefs(ooo, refs); + return ooo; + } + + @Override + public Object handleBinary(String userName, String action, String resourcePath, InputStream in) { + if (!pe.permit(userName, action, resourcePath)) + throw new RuntimeException("Action not permitted: " + userName + " " + action + " " + resourcePath); + return null; + } + + public Jetty8Client getJettyClient() { + return jettyClient; + } + + public void shutdown() { + // TODO Auto-generated method stub + + } + + public EObject getObject() { + return root; + } + + public void setObject(EObject root) { + this.root = root; + } + + int i = 0; + + public void save() { + int j = i++; + // System.err.println("XXXX save start:" + j); + save(root, "ROOT", directory, true, root.eClass()); + // System.err.println("XXXX save done:" + j); + lastSave = new Date(); + } + + private Date lastSave = null; + + public synchronized void save(long ms) { + Date now = new Date(); + if (lastSave == null || lastSave.getTime() + ms < now.getTime()) + save(); + } + + public void save(EObject o, String id, String directory, boolean singleton, EClass defClass) { + JSONObject json = ecore2json(o, -1, defClass, false); + String fname = directory + (o.eContainer() == null ? "/ROOT" : "") + ".json"; + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + HashSet names = new HashSet(); + // Try 3 times to save list. + boolean saved = false; + for (int i = 0; i < 3; i++) { + try { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + JSONArray a = new JSONArray(); + for (EObject oo : l) { + String n = ecoreId(oo); + if (names.contains(n)) { + System.err.println("name is already used " + n + " " + object2ref(o) + "@" + + ref.getName()); + } + names.add(n); + a.put(n); + String dir2 = directory + "/" + ref.getName() + "/" + n; + save(oo, null, dir2, false, ref.getEReferenceType()); + } + if (ref.isOrdered()) + json.put("$order:" + ref.getName(), a); + saved = true; + break; + } catch (ConcurrentModificationException e) { + // ManagementServerUtils.printStackTrace(e); + // logger.error("ConcurrentModificationException: " + + // o.eClass().getName() + "@" + ref.getName()); + continue; + } + } + if (!saved) { + System.err.println("unable to save object list: " + object2ref(o) + "@" + ref.getName()); + logger.error("unable to save object list: " + object2ref(o) + "@" + ref.getName()); + } + // delete no longer existing objects. + File dir = new File(directory + "/" + ref.getName()); + File[] files = dir.listFiles(); + if (files == null) + continue; + for (File f : files) { + if (f.isDirectory() && !names.contains(f.getName())) { + FileUtils.deleteDirectory(f); + } + if (f.getName().endsWith(".json")) { + String n = f.getName().substring(0, f.getName().length() - 5); + if (!names.contains(n)) { + f.delete(); + } + } + } + } else { + String dir2 = directory + "/" + ref.getName(); + EObject oo = (EObject) o.eGet(ref); + if (oo == null) { + File f = new File(dir2); + if (f.exists()) + FileUtils.deleteDirectory(f); + f = new File(dir2 + ".json"); + if (f.exists()) + f.delete(); + } else + save(oo, ecoreId(oo), dir2, true, ref.getEReferenceType()); + } + } + storeJson(fname, json); + } + + HashMap cache = new HashMap(); + + private synchronized void storeJson(String fname, JSONObject json) { + // TODO cache the data so we do no need to write the same all the time + // but need to support deletion of files and directory. See save(..) + // above. + // String s = json.toString(); + // if (s.equals(cache.get(fname))) return; + try { + OutputStreamWriter w = FileUtils.filename2writer(fname + ".tmp"); + w.append(json.toString(2)); + w.close(); + File f1 = new File(fname); + File f2 = new File(fname + ".tmp"); + f2.renameTo(f1); + } catch (IOException e) { + // TODO Auto-generated catch block + printStackTrace(e); + } + } + + private static String ecoreId(EObject oo) { + EStructuralFeature f = oo.eClass().getEStructuralFeature("name"); + if (f instanceof EAttribute) { + EAttribute attr = (EAttribute) f; + return (String) oo.eGet(attr); + } + if (oo.eContainer() != null) { + if (oo.eContainmentFeature().isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) oo.eContainer().eGet(oo.eContainmentFeature()); + return Integer.toString(l.indexOf(oo)); + } else { + return oo.eContainmentFeature().getName(); + } + } + return "id" + id++; + } + + // private String jsonId(JSONObject json2) { + // if (json2.has("name")) + // return json2.getString("name"); + // return "id" + id++; + // } + + public static Object attr2jsonValue(int levels, Object o, EClassifier eClassifier) { + if (!(eClassifier instanceof EDataType)) + return null; + EDataType t = (EDataType) eClassifier; + EFactory f = t.getEPackage().getEFactoryInstance(); + // TODO handle int and doubles. + if (levels == -3 && o == null) { + JSONObject json = new JSONObject(); + json.put("$isNull", true); + return json; + } + return f.convertToString(t, o); + } + + public static Object jsonValue2attrValue(EDataType t, Object value) { + EFactory f = t.getEPackage().getEFactoryInstance(); + // System.err.println("XXXYYZZ: " + t + " value=" + value + " " + + // value.getClass()); + if (value instanceof String && t.getInstanceClass().equals(Date.class)) { + try { + return new Date(Long.parseLong((String) value)); + } catch (NumberFormatException e) { + } + } + if (value instanceof String) { + String s = (String) value; + return f.createFromString(t, s); + } + if (value instanceof Long && t.getInstanceClass().equals(Date.class)) { + Long l = (Long) value; + return new Date(l); + } + if (value instanceof Integer && t.getInstanceClass().equals(Date.class)) { + long l = (Integer) value; + return new Date(l); + } + if (t.getInstanceClass().equals(Long.class) && value instanceof Integer) { + return Long.valueOf((Integer) value); + } + if (t.getInstanceClass().equals(long.class) && value instanceof Integer) { + return Long.valueOf((Integer) value); + } + if (t.getInstanceClass().equals(Long.class) && value instanceof Integer) { + return Long.valueOf((Integer) value); + } + if (t.getInstanceClass().equals(long.class) && value instanceof Integer) { + return Long.valueOf((Integer) value); + } + if (t.getInstanceClass().equals(String.class) && value instanceof Integer) { + return Integer.toString((int) value); + } + if (t.getInstanceClass().equals(String.class) && value instanceof Double) { + return Double.toString((double) value); + } + if (t.getInstanceClass().equals(String.class) && value instanceof Long) { + return Long.toString((long) value); + } + if (t.getInstanceClass().equals(String.class) && value instanceof Boolean) { + return Boolean.toString((boolean) value); + } + if (value instanceof Integer || value instanceof Double || value instanceof Long || value instanceof Boolean) { + return value; + } + return null; + } + + private Object stringValue2attrValue(EDataType t, String s) { + EFactory f = t.getEPackage().getEFactoryInstance(); + return f.createFromString(t, s); + } + + class Ref { + public Ref(EObject o, EReference ref, Object object) { + super(); + this.o = o; + this.ref = ref; + this.json = (JSONObject) object; // TODO handle error cases + } + + EObject o; + EReference ref; + JSONObject json; + + @Override + public String toString() { + return "Ref [o=" + o + ", ref=" + ref + ", json=" + json + "]"; + } + } + + private void handleReference(EObject o, JSONObject json, List refs) { + // System.out.println ("AAAAupdate : " + object2ref(o) + " " + + // json.toString(2)); + for (EReference ref : o.eClass().getEAllReferences()) { + if (!json.has(ref.getName())) + continue; + if (ref.isContainer()) + continue; + if (ref.isContainment()) { + if (json.has("$version") || jsonHasVersion(json.get(ref.getName()))) + continue; + if (ref.isMany()) { + Object x = json.get(ref.getName()); + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + if (x instanceof JSONObject) { + EAttribute f = namingAttribute(ref); + JSONObject o1 = (JSONObject) x; + for (EObject oo : l) { + handleReference(oo, o1.getJSONObject((String) oo.eGet(f)), refs); + } + } else { + JSONArray a = (JSONArray) x; + int i = 0; + for (EObject oo : l) { + handleReference(oo, a.getJSONObject(i), refs); + i++; + } + } + } else { + EObject oo = (EObject) o.eGet(ref); + if (oo == null) continue; + Object oo1 = json.get(ref.getName()); + if (oo1 != null && oo1.getClass().getCanonicalName().equals("org.json.JSONObject.Null")) { + oo1 = null; + } + if (oo1 instanceof JSONObject || oo1 == null) { + handleReference(oo, (JSONObject) oo1, refs); + continue; + } + throw new RuntimeException("Unable to handle reference: " + ref.getName() + + " " + oo1.getClass().getCanonicalName()); + } + continue; + } + // is reference + if (ref.isMany()) { + Object aa = json.get(ref.getName()); + if (aa instanceof JSONArray) { + JSONArray a = (JSONArray) aa; + for (int i = 0; i < a.length(); i++) { + refs.add(new Ref(o, ref, a.get(i))); + } + } + } else { + refs.add(new Ref(o, ref, json.get(ref.getName()))); + } + + } + // System.out.println ("AAAAupdate : " + object2ref(o) + " " + refs); + } + + private boolean jsonHasVersion(Object object) { + if (object instanceof JSONObject) { + JSONObject json = (JSONObject) object; + if (json.has("$version") || json.has("$child") || json.has("$children")) + return true; + for (Iterator i = json.keys(); i.hasNext();) { + String s = i.next(); + if (jsonHasVersion(json.get(s))) + return true; + } + } + if (object instanceof JSONArray) { + JSONArray a = (JSONArray) object; + for (int i = 0; i < a.length(); i++) { + if (jsonHasVersion(a.get(i))) + return true; + } + } + return false; + } + + private void updateRefs(EObject res, List refs) { + for (Ref x : refs) { + // System.out.println("REF: " + ref2name(x.ref) + " " + x.json); + // TODO handle error better. + if (!x.json.has("$ref")) + continue; + String path = (String) x.json.get("$ref"); + if (path.equals("NULL")) + continue; + if (path.equals("")) + continue; + EObject root1 = res; + if (x.json.has("$refroot")) { + // Not tested + String rootpath = (String) x.json.get("$refroot"); + System.err.println("XXXX using new root: " + rootpath); + if (!rootpath.equals("NULL") && !rootpath.equals("")) { + Subject s1 = find(root, rootpath); + System.err.println("XXXX using new root: " + s1); + if (s1 == null || s1.o != null) { + root1 = s1.o; + System.err.println("XXXX using new root: " + root1); + } + } + } + Subject s = find(root1, path); + if (s == null || s.ref != null) { + logger.warn("Unable to determine reference for:" + PropertyUtil.replaceForLogForcingProtection(path)); + continue; + } + if (x.ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) x.o.eGet(x.ref); + l.add(s.o); + } else { + try { + // System.out.println("XXX:" + object2ref(x.o) + " " + + // object2ref(s.o)); + x.o.eSet(x.ref, s.o); + } catch (Exception e) { + // System.out.println("Bad Reference:" + x.o); + // System.out.println("Bad Reference:" + x.ref + " " + + // x.ref.getEContainingClass()); + // System.out.println("Bad Reference:" + s.o); + logger.warn("Bad Reference:" + path + " " + x.json + " " + e); + } + } + } + } + + public static JSONObject params2json(EOperation operation, Object[] params) { + if (params.length != operation.getEParameters().size()) { + String n = operation.getEContainingClass().getName() + "@" + operation.getName(); + throw new RuntimeException("Wrong number of arguments for " + n + " got " + params.length + " expected " + + operation.getEParameters().size()); + } + JSONObject json = new JSONObject(); + for (int i = 0; i < params.length; i++) { + EParameter p = operation.getEParameters().get(i); + if (p.getEType() instanceof EClass) { + EClass eClass = (EClass) p.getEType(); + if (p.isMany()) { + @SuppressWarnings("unchecked") + List l = (List) params[i]; + JSONArray a = new JSONArray(); + for (Object oo : l) { + a.put(object2json(oo, 100, eClass, true)); + } + json.put(p.getName(), a); + } else { + json.put(p.getName(), object2json(params[i], 100, eClass, true)); + } + + } else { + if (p.isMany()) { + JSONArray a = new JSONArray(); + json.put(p.getName(), a); + @SuppressWarnings("unchecked") + List l = (List) params[i]; + for (Object oo : l) { + a.put(attr2jsonValue(0, oo, p.getEType())); + } + } else + json.put(p.getName(), attr2jsonValue(0, params[i], p.getEType())); + } + } + return json; + } + + private static JSONObject object2json(Object o, int i, EClass eClass, boolean b) { + if (o instanceof EObject) { + return ecore2json((EObject) o, i, eClass, b); + } + if (o instanceof JSONObject) { + return (JSONObject) o; + } + if (o == null) + return null; + throw new RuntimeException("Unable to convert object to json: " + o); + } + + static ManagementServer staticServer = new ManagementServer(); + + public static Object json2response(EOperation operation, JSONObject res) { + if (res == null) + return null; + if (res.length() == 0) + return null; // TODO Handle this better. + if (res.has("returns")) { + if (operation.getEType() instanceof EClass) { + EClass eClass = (EClass) operation.getEType(); + if (operation.isMany()) { + EList l = new BasicEList(); + JSONArray a = res.getJSONArray("returns"); + for (int i = 0; i < a.length(); i++) { + l.add(staticServer.json2ecore(eClass, a.getJSONObject(i))); + } + return l; + } else { + return staticServer.json2ecore(eClass, res.getJSONObject("returns")); + } + } else { + EDataType eType = (EDataType) operation.getEType(); + if (operation.isMany()) { + EList l = new BasicEList(); + JSONArray a = res.getJSONArray("returns"); + for (int i = 0; i < a.length(); i++) { + l.add(jsonValue2attrValue(eType, a.get(i))); + } + return l; + } else { + return jsonValue2attrValue(eType, res.get("returns")); + } + } + } + throw new ManagementServerError("remote error", res); + } + + public static String expandPath(EObject o, String pattern, String prefix) { + // E.g. "foobar/${@name}" + String x = prefix.equals("$") ? "\\" : ""; + Pattern p = Pattern.compile("(" + x + prefix + "\\{.*?})"); + Matcher m = p.matcher(pattern); + StringBuffer s = new StringBuffer(); + while (m.find()) { + String k = m.group(1); + String k1 = k.substring(2, k.length() - 1); + try { + Subject subject = find(o, k1); + if (subject == null || subject.o == null || subject.attr == null) + throw new RuntimeException("unable to resolve path: " + k1 + " on " + o); + m.appendReplacement(s, (String) subject.o.eGet(subject.attr)); + } catch (Exception e) { + logger.warn("bad expansion: " + e); + m.appendReplacement(s, x + k); + } + } + m.appendTail(s); + return s.toString(); + } + + public static OperationalState getOperationalState(EObject a) { + if (a instanceof HasOperationalState) { + HasOperationalState o1 = (HasOperationalState) a; + if (o1.getOperationalState() == OperationalState.SUSPENDED) + return OperationalState.SUSPENDED; + } + if (a.eContainer() != null) { + if (getOperationalState(a.eContainer()) == OperationalState.SUSPENDED) + return OperationalState.SUSPENDED; + } + return OperationalState.OPERATIONAL; + } + + public static boolean isSuspended(EObject o, String message) { + if (getOperationalState(o) == OperationalState.SUSPENDED) { + logger.warn("Suspended: " + message); + return true; + } + return false; + } + + public static boolean refIsNamed(EReference ref) { + // System.err.println("ZZZ : " + ref + " " + ref.getEReferenceType() + // + " " + + // ref.getEReferenceType().isSuperTypeOf(ModelPackage.eINSTANCE.getNamedEntity()) + // + " " + + // ModelPackage.eINSTANCE.getNamedEntity().isSuperTypeOf(ref.getEReferenceType()) + // ); + return true; + } + + public DroolsRuntime getDroolsRuntime() { + return droolsRuntime; + } + + public void setDroolsRuntime(DroolsRuntime droolsRuntime) { + this.droolsRuntime = droolsRuntime; + } + + // ECOMP on ECOMP + public void recordApi(String parentTransactionId, EObject o, String action, ApiRequestStatus status, long duration, + Object... params) { + if (!(root instanceof AbstractManagementServer)) + return; + Api api = findApi(o, action); + switch (status) { + case ERROR: + metrics.addIncreasingULongMetric(api, "numberOfErrorRequests", 1L, false); + break; + case START: + metrics.addIncreasingULongMetric(api, "numberOfRequests", 1L, false); + break; + case OKAY: + metrics.addIncreasingULongMetric(api, "numberOfCompletedRequests", 1L, false); + metrics.setLongMetric(api, "lastRequestDuration", duration, false); + break; + case INPROGRESS: + break; + default: + break; + } + } + + public void recordPolicyFire(String droolsRuntime, String ruleName) { + } + + public void recordPolicyObjectChange(String droolsRuntime, Object o, DroolsObjectChange changeType) { + } + + private synchronized Api findApi(EObject o, String action) { + AbstractManagementServer a = (AbstractManagementServer) root; + if (a.getComponent() == null) { + a.setComponent(ComponentFactory.eINSTANCE.createComponent()); + } + String n = o.eClass().getInstanceClassName(); + ComponentClass c = (ComponentClass) findWithName(a.getComponent().getClasses(), n); + if (c == null) { + c = ComponentFactory.eINSTANCE.createComponentClass(); + c.setName(n); + a.getComponent().getClasses().add(c); + } + Api api = (Api) findWithName(c.getApis(), action); + if (api == null) { + api = ComponentFactory.eINSTANCE.createApi(); + api.setName(action); + c.getApis().add(api); + } + return api; + } + + public static EObject findWithName(EList l, String name) { + for (NamedEntity n : l) { + if (n.getName().equals(name)) + return n; + } + return null; + } + + @SuppressWarnings("unchecked") + public static void copy(EObject o, EObject o1) { + for (EAttribute attr1 : o1.eClass().getEAllAttributes()) { + EStructuralFeature f = o.eClass().getEStructuralFeature(attr1.getName()); + System.out.println("DDDDD " + attr1 + " f=" + f); + if (f instanceof EAttribute) { + EAttribute attr = (EAttribute) f; + System.out.println("DDDDD " + attr + " " + o.eGet(attr)); + o1.eSet(attr1, o.eGet(attr)); + } + } + for (EReference ref1 : o1.eClass().getEAllContainments()) { + EStructuralFeature f = o.eClass().getEStructuralFeature(ref1.getName()); + if (f instanceof EReference) { + EReference ref = (EReference) f; + if (ref1.isMany()) + o1.eSet(ref1, EcoreUtil.copyAll((EList) o.eGet(ref))); + else + o1.eSet(ref1, EcoreUtil.copy((EObject) o.eGet(ref))); + } + } + + } + + public static JSONObject ensureHardUpdate(EObject o2, int levels) { + JSONObject json = ManagementServer.ecore2json(o2, 1000, null, true); + ensureHardUpdate(json, levels); + return json; + } + + private static void ensureHardUpdate(JSONObject json, int levels) { + if (levels <= 0) { + json.put("$useNull", 1); + return; + } + for (Iterator i = json.keys(); i.hasNext();) { + Object o = json.get(i.next()); + if (o instanceof JSONObject) { + ensureHardUpdate((JSONObject) o, levels - 1); + } + if (o instanceof JSONArray) { + JSONArray a = (JSONArray) o; + for (int j = 0; j < a.length(); j++) { + if (a.get(j) instanceof JSONObject) { + ensureHardUpdate((JSONObject) a.get(j), levels - 1); + } + } + } + + } + } + + public static void decryptPasswords(EObject o) { + for (EAttribute attr : o.eClass().getEAllAttributes()) { + if (! attr.getEType().getName().equals("EString")) continue; + if (attr.isMany()) continue; + String v = (String) o.eGet(attr); + if (v != null && v.startsWith("rsa:")) { + o.eSet(attr, JavaHttpClient.decryptPassword(v)); + } + } + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + for (EObject oo : l) { + decryptPasswords(oo); + } + } else { + EObject oo = (EObject) o.eGet(ref); + decryptPasswords(oo); + } + } + } + + public JSONObject getSwaggerJson() { + try { + SwaggerUtils swagger = new SwaggerUtils(); + ISwaggerHandler handler = this; + if (root instanceof ISwaggerHandler) { + handler = (ISwaggerHandler) root; + } + System.err.println("SWAGGER: Start"); + handler.updateSwagger("/resources", swagger); + System.err.println("SWAGGER: Done"); + JSONObject json = swagger.toJson(); + System.err.println("SWAGGER: " + json.toString(2)); + return json; + } catch (Exception e) { + System.err.println("SWAGGER: Error" + e); + e.printStackTrace(); + throw e; + } + } + + @Override + public void updateSwagger(String path, SwaggerUtils swagger) { + swagger.addTag(path, "Server Configuration",root); + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerError.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerError.java new file mode 100644 index 0000000..1b083f1 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerError.java @@ -0,0 +1,43 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import org.json.JSONObject; + +public class ManagementServerError extends RuntimeException { + private static final long serialVersionUID = 1L; + private JSONObject json; + public ManagementServerError(String string, JSONObject res) { + super(string); + setJson(res); + } + @Override + public String toString() { + return super.toString() + " " + getJson().toString(2); + } + public JSONObject getJson() { + return json; + } + public void setJson(JSONObject json) { + this.json = json; + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerUtils.java new file mode 100644 index 0000000..3bdd458 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagementServerUtils.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.sirius.manager; + +import java.io.IOException; +import java.util.Date; +import java.util.HashMap; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.PatternLayout; +import org.apache.log4j.RollingFileAppender; + +public class ManagementServerUtils { + public static final Logger logger = Logger.getLogger(ManagementServerUtils.class); + + public static void printStackTrace(Exception e) { + System.err.println(new Date().toString() + " " + e); + e.printStackTrace(); + } + + static HashMap name2logger = new HashMap(); + public static Logger createLogger(String name, String level, String pattern) { + return(createLogger(name, level, pattern, "logs")); + } + public static synchronized Logger createLogger(String name, String level, String pattern, String logdir) { + if (name2logger.get(name) == null) { + Logger l = Logger.getLogger(name); + try { + RollingFileAppender a; + a = new RollingFileAppender(new PatternLayout(pattern), logdir + "/" + name + ".log", true); + a.setName(name); + a.setMaxFileSize("50MB"); + a.setMaxBackupIndex(5); + Level ll = Level.toLevel(level.toUpperCase()); + a.setThreshold(ll); + a.setAppend(true); + a.activateOptions(); + l.addAppender(a); + l.setLevel(ll); + l.setAdditivity(false); + } catch (IOException e) { + logger.error("unable to create logger:" + e); + e.printStackTrace(); + } + name2logger.put(name, l); + } + return name2logger.get(name); + } + + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagerException.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagerException.java new file mode 100644 index 0000000..73d71e8 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ManagerException.java @@ -0,0 +1,32 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +public class ManagerException extends RuntimeException { + private static final long serialVersionUID = 6430311726555738610L; + int code; + public ManagerException(int code,String message) { + super(message); + this.code = code; + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ModuleReporter.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ModuleReporter.java new file mode 100644 index 0000000..f68a7e6 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/ModuleReporter.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.sirius.manager; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.sirius.manager.properties.AbstractProperty; +import org.openecomp.ncomp.sirius.manager.properties.Module; +import org.openecomp.ncomp.sirius.manager.properties.ModuleProperty; +import org.openecomp.ncomp.sirius.manager.properties.PropertiesFactory; +import org.openecomp.ncomp.sirius.manager.server.SouthBoundApi; +import org.openecomp.ncomp.utils.StringUtil; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class ModuleReporter implements Runnable { + public static final Logger logger = Logger.getLogger(ModuleReporter.class); + private SouthBoundApi api; + private List submodules = new ArrayList(); + private ModuleReporter parent; + private String jarName; + private String name; + private String version; + private String file; + private String command; + private Properties props; + + + public ModuleReporter(SouthBoundApi api, String name, String jarName) { + super(); + this.api = api; + this.name = name; + this.jarName = jarName; + } + public ModuleReporter(SouthBoundApi api, String name, String jarName, String file, String command, String version) { + super(); + this.api = api; + this.name = name; + this.jarName = jarName; + this.file = file; + this.command = command; + this.version = version; + } + public void addSubmodule(String jarName) { + addSubmodule(jarName,jarName,null,null,"${version}"); + } + public void addSubmodule(String name, String jarName, String file, String command, String version) { + ModuleReporter m=new ModuleReporter(null, name, jarName, file, command, version); + submodules.add(m); + m.parent = this; + } + + public void start() { + Thread t = new Thread(this,"module reporter: " + name); + t.start(); + } + + @Override + public void run() { + boolean first = true; + while (true) { + try { +// System.err.println("HERE: "); + if (!first) Thread.sleep(300000); // sleep 5 minutes. + else first = false; + EList l = new BasicEList(); + ModuleProperty m = PropertiesFactory.eINSTANCE.createModuleProperty(); + m.setName(name); + m.setVersion(version()); + for (ModuleReporter s : submodules) { + Module m1 = PropertiesFactory.eINSTANCE.createModule(); + m1.setName(s.name); + m1.setVersion(s.version()); + m.getSubModules().add(m1); + } +// System.err.println("HERE: " + ManagementServer.ecore2json(m, 100, null, true).toString(2)); + l.add(m); + api.properties(null, l); + } + catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } + } + } + private String version() { + InputStream inputStream; + if (jarName == null && file == null && command == null) { + if (parent == null || parent.props == null) + return "unable to determine version for " + name + " no parent information"; + return StringUtil.expandUsingProperties(version, parent.props, "$"); + } + if (jarName != null ) + inputStream = ModuleReporter.class.getClassLoader().getResourceAsStream(jarName + ".buildinfo"); + else { + if (file != null) { + inputStream = FileUtils.filename2stream(file, null); + if (inputStream == null) logger.warn("unable to find file " + file); + } + else { + inputStream = FileUtils.cmd2stream(command); + if (inputStream == null) logger.warn("unable to run command " + command); + } + } + if (inputStream == null) { + return "unable to determine version for " + name; + } + props = new Properties(); + try { + props.load(inputStream); + inputStream.close(); + } catch (Exception e) { + logger.warn("No build info for module: " + name); + ManagementServerUtils.printStackTrace(e); + return "unable to determine version for " + name; + } + return StringUtil.expandUsingProperties(version, props, "$"); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SimplePolicyEngine.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SimplePolicyEngine.java new file mode 100644 index 0000000..5c85f6c --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SimplePolicyEngine.java @@ -0,0 +1,34 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import org.apache.log4j.Logger; + +public class SimplePolicyEngine implements IPolicyEngine { + public static final Logger logger = Logger.getLogger(SimplePolicyEngine.class); + @Override + public boolean permit(String subject, String action, String resourcePath) { + logger.debug("Policy: " + subject + " " + action + " " + resourcePath); + return true; + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Subject.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Subject.java new file mode 100644 index 0000000..fdb045a --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/Subject.java @@ -0,0 +1,57 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; + +public class Subject { + @Override + public String toString() { + return "Subject [o=" + o + ", ref=" + ref + ", attr=" + attr + "]"; + } + public Subject(EObject o, EReference ref) { + this.o = o; + this.ref = ref; + } + public Subject(EObject o, String refName) { + this.o = o; + ref = (EReference) o.eClass().getEStructuralFeature(refName); + if (ref == null) { + throw new RuntimeException("No such ref " + refName + " in type " + o.eClass().getName()); + } + } + + public Subject(EObject o) { + this.o = o; + } + + public Subject(EObject o, EAttribute attr) { + this.o = o; + this.attr = attr; + } + + public EObject o; + public EReference ref = null; + public EAttribute attr = null; +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SwaggerUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SwaggerUtils.java new file mode 100644 index 0000000..b4581b9 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/SwaggerUtils.java @@ -0,0 +1,919 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager; + +// TODO +// operations - need to handle body parameter definitions +// create object - HTTP access control (CORS) issue +// update object - HTTP access control (CORS) issue +// ignore subtrees eg. /foo/component/droolsRuntimes +// handle AbstractManagementServer generically. +// Swagger annotations +// Swagger definitions +// Better handle inheritance + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStreamWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EPackage.Registry; +import org.eclipse.emf.ecore.EParameter; +import org.eclipse.emf.ecore.EReference; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import org.openecomp.ncomp.component.ComponentFactory; +import org.openecomp.ncomp.sirius.manager.server.AbstractManagementServer; +import org.openecomp.ncomp.sirius.manager.server.ServerFactory; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerFactory; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerModel; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerNamedObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerOperation; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameter; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerParameterType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerPath; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType; +import org.openecomp.ncomp.sirius.manager.swagger.SwaggerTag; +import org.openecomp.ncomp.webservice.utils.FileUtils; +import org.openecomp.ncomp.webservice.utils.JsonUtils; + +public class SwaggerUtils { + + SwaggerModel m; + Map done = new HashMap(); + private boolean rootTagAdded = false; + + public SwaggerUtils() { + m = SwaggerFactory.eINSTANCE.createSwaggerModel(); + try { + JSONObject json = new JSONObject(getTemplate("swagger-api.json")); + ManagementServer s1 = new ManagementServer(); + s1.setObject(SwaggerFactory.eINSTANCE.createSwaggerModel()); + m = json2swagger(s1, json); + } catch (Exception e) { + m = SwaggerFactory.eINSTANCE.createSwaggerModel(); + } + } + + public static void main(String[] args) throws IOException { +// test("/home/ncomp/swagger.json2"); + // testClass(ServerPackage.eINSTANCE.getAbstractManagementServer()); + test2(); + + } + + private static void test2() { + SwaggerUtils u = new SwaggerUtils(); + AbstractManagementServer s = ServerFactory.eINSTANCE.createAbstractManagementServer(); + s.setConfiguration(ServerFactory.eINSTANCE.createAbstractManagementServerConfiguration()); + s.setComponent(ComponentFactory.eINSTANCE.createComponent()); + u.addTag("/foo/configuration", "The Config Tag"); + u.addTag("/foo/component", "The Component Tag"); + u.addTag("/foo", "The Foo Tag"); + u.autoAdd("/foo", s.eClass(), 2); + System.out.println(u.toJson().toString(2)); + } + + @SuppressWarnings("unused") + private static void test(String test) throws IOException { + JSONObject json0 = JsonUtils.file2json(test); + JSONObject json = JsonUtils.file2json(test); + ManagementServer s = new ManagementServer(); + s.setObject(SwaggerFactory.eINSTANCE.createSwaggerModel()); + SwaggerModel m = json2swagger(s, json); + JSONObject json1 = swagger2json(m); + // System.out.println(json1.toString(2)); + OutputStreamWriter w = FileUtils.filename2writer("target/after.json"); + w.append(json1.toString(2)); + w.close(); + w = FileUtils.filename2writer("target/before.json"); + w.append(json0.toString(2)); + w.close(); + } + + private static void testClass(EClass c) throws JSONException, IOException { + SwaggerModel m = SwaggerFactory.eINSTANCE.createSwaggerModel(); + try { + JSONObject json = new JSONObject(getTemplate("swagger-api.json")); + ManagementServer s1 = new ManagementServer(); + s1.setObject(SwaggerFactory.eINSTANCE.createSwaggerModel()); + m = json2swagger(s1, json); + } catch (Exception e) { + throw new RuntimeException("Unable to create initial Swagger object: " + e, e); + } + Map done = new HashMap(); + eclass2swagger("/foo", c, m, done); + System.out.print(swagger2json(m).toString(2)); + } + + private static SwaggerModel json2swagger(ManagementServer s, JSONObject json) throws IOException { + JSONObject paths = json.getJSONObject("paths"); + for (Iterator i1 = paths.keys(); i1.hasNext();) { + String k = i1.next(); + JSONObject methods = paths.getJSONObject(k); + JSONObject json1 = new JSONObject(); + paths.put(k, json1); + json1.put("methods", methods); + for (Iterator i2 = methods.keys(); i2.hasNext();) { + String k2 = i2.next(); + JSONObject method = methods.getJSONObject(k2); + if (method.has("parameters")) { + JSONArray parameters = method.getJSONArray("parameters"); + JSONObject parameters1 = new JSONObject(); + method.put("parameters", parameters1); + for (int i3 = 0; i3 < parameters.length(); i3++) { + JSONObject parameter = parameters.getJSONObject(i3); + JSONObject parameter1 = new JSONObject(); + parameters1.put(parameter.getString("name"), parameter1); + parameter1.put("type", parameter); + parameter1.put("in", parameter.getString("in")); + parameter.remove("in"); + handleParameter(parameter); + } + } + if (method.has("security")) { + JSONArray security = method.getJSONArray("security"); + JSONArray a = new JSONArray(); + method.put("security", a); + for (int i3 = 0; i3 < security.length(); i3++) { + JSONObject security1 = security.getJSONObject(i3); + JSONObject j3 = new JSONObject(); + JSONObject j31 = new JSONObject(); + j3.put("list", j31); + a.put(j3); + for (Iterator i4 = security1.keys(); i4.hasNext();) { + String k4 = i4.next(); + JSONObject j4 = new JSONObject(); + j4.put("name", k4); + j4.put("roles", security1.getJSONArray(k4)); + j31.put(k4, j4); + } + } + } + if (method.has("responses")) { + JSONObject responses = method.getJSONObject("responses"); + for (Iterator i3 = responses.keys(); i3.hasNext();) { + String k3 = i3.next(); + JSONObject response = responses.getJSONObject(k3); + if (response.has("schema")) { + handleParameter(response.getJSONObject("schema")); + } + } + + } + } + } + if (json.has("definitions")) { + JSONObject definitions = json.getJSONObject("definitions"); + for (Iterator i2 = definitions.keys(); i2.hasNext();) { + String k2 = i2.next(); + JSONObject objectType = definitions.getJSONObject(k2); + handleParameter(objectType); + JSONObject properties = objectType.getJSONObject("properties"); + for (Iterator i3 = properties.keys(); i3.hasNext();) { + String k3 = i3.next(); + JSONObject property = properties.getJSONObject(k3); + handleParameter(property); + } + } + } + OutputStreamWriter w = FileUtils.filename2writer("target/middle.json"); + w.append(json.toString(2)); + w.close(); + // System.err.println(json.toString(2)); + s.update("", s.find("/"), json, true); + System.err.println("SWAGGER: " + "=============================================="); + s.update("", s.find("/"), json, true); + // SwaggerModel res = (SwaggerModel) + // s.json2ecore(SwaggerPackage.eINSTANCE.getSwaggerModel(), json); + return (SwaggerModel) s.getObject(); + } + + private static void handleParameter(JSONObject parameter) { + if (parameter.has("items")) { + parameter.put("many", "true"); + JSONObject items = parameter.getJSONObject("items"); + copy(items, parameter, "type"); + copy(items, parameter, "enum"); + copy(items, parameter, "default"); + copy(items, parameter, "$ref"); + parameter.remove("items"); + } + if (parameter.has("schema")) { + JSONObject schema = parameter.getJSONObject("schema"); + if (schema.has("$ref")) { + copy(schema, parameter, "$ref"); + if (schema.has("type") && schema.getString("type").equals("array")) + parameter.put("many", "true"); + } else { + JSONObject items = schema.getJSONObject("items"); + parameter.put("many", "true"); + copy(items, parameter, "$ref"); + } + parameter.remove("schema"); + } + + if (parameter.has("enum")) { + parameter.put("$class", "org.openecomp.ncomp.sirius.manager.swagger.SwaggerEnumObjectType"); + return; + } + if (parameter.has("$ref")) { + JSONObject r = new JSONObject(); + r.put("$ref", parameter.getString("$ref").substring(1)); + parameter.put("reference", r); + parameter.remove("$ref"); + parameter.put("$class", "org.openecomp.ncomp.sirius.manager.swagger.SwaggerReferenceObjectType"); + return; + } + if (parameter.has("type") && parameter.get("type").equals("object")) { + parameter.put("$class", "org.openecomp.ncomp.sirius.manager.swagger.SwaggerObjectClassDefinition"); + return; + } + parameter.put("$class", "org.openecomp.ncomp.sirius.manager.swagger.SwaggerSimpleObjectType"); + if (parameter.has("additionalProperties")) { + handleParameter(parameter.getJSONObject("additionalProperties")); + } + + } + + private static JSONObject swagger2json(SwaggerModel m) throws IOException { + JSONObject json = ManagementServer.ecore2json(m, 1000, null, true); + OutputStreamWriter w = FileUtils.filename2writer("target/middle2.json"); + w.append(json.toString(2)); + w.close(); + convertFromObjectToArray(json, "tags", "name"); + json.remove("$class"); + // paths + JSONObject paths = json.getJSONObject("paths"); + for (Iterator i1 = paths.keys(); i1.hasNext();) { + String k = i1.next(); + JSONObject methods1 = paths.getJSONObject(k); + JSONObject methods = methods1.getJSONObject("methods"); + paths.put(k, methods); + for (Iterator i2 = methods.keys(); i2.hasNext();) { + String k2 = i2.next(); + JSONObject method = methods.getJSONObject(k2); + removeDefault(method, "deprecated", "false"); + if (method.has("deprecated")) + method.put("deprecated", true); + method.remove("lastChanged"); + removeEmptyList(method, "consumes"); + removeEmptyList(method, "produces"); + if (method.has("parameters")) { + JSONObject parameters = method.getJSONObject("parameters"); + for (Iterator i3 = parameters.keys(); i3.hasNext();) { + String k3 = i3.next(); + JSONObject parameter = parameters.getJSONObject(k3); + handleParameter2(parameter); + } + convertFromObjectToArray(method, "parameters", "name"); + } + // security + // System.err.println("SWAGGER: " + "METHOD: " + + // method.toString(2)); + JSONArray security = method.getJSONArray("security"); + JSONArray a = new JSONArray(); + method.put("security", a); + for (int i3 = 0; i3 < security.length(); i3++) { + JSONObject ss = security.getJSONObject(i3).getJSONObject("list"); + JSONObject jj = new JSONObject(); + a.put(jj); + for (Iterator i4 = ss.keys(); i4.hasNext();) { + String k4 = i4.next(); + ss.getJSONObject(k4); + jj.put(k4, ss.getJSONObject(k4).getJSONArray("roles")); + } + } + removeEmptyList(method, "security"); + // responses + JSONObject responses = method.getJSONObject("responses"); + for (Iterator i3 = responses.keys(); i3.hasNext();) { + String k3 = i3.next(); + JSONObject response = responses.getJSONObject(k3); + response.remove("lastChanged"); + if (response.has("schema")) { + handleDefinition2(response.getJSONObject("schema")); + } + JSONObject headers = response.getJSONObject("headers"); + for (Iterator i4 = headers.keys(); i4.hasNext();) { + String k4 = i4.next(); + handleDefinition2(headers.getJSONObject(k4)); + } + removeEmptyObject(response, "headers"); + } + } + } + // definitions + if (json.has("definitions")) { + JSONObject definitions = json.getJSONObject("definitions"); + for (Iterator i2 = definitions.keys(); i2.hasNext();) { + String k2 = i2.next(); + JSONObject objectType = definitions.getJSONObject(k2); + handleDefinition2(objectType); + if (objectType.has("properties")) { + JSONObject properties = objectType.getJSONObject("properties"); + for (Iterator i3 = properties.keys(); i3.hasNext();) { + String k3 = i3.next(); + JSONObject property = properties.getJSONObject(k3); + handleParameter2(property); + handleXml(property); + } + } + handleXml(objectType); + removeEmptyList(objectType, "required"); + removeEmptyList(objectType, "allOf"); + } + } + // System.err.println(json.toString(2)); + + return json; + } + + private static void handleXml(JSONObject json) { + if (json.has("xml")) { + JSONObject xml = json.getJSONObject("xml"); + removeDefault(xml, "wrapped", "false"); + if (xml.has("wrapped")) + xml.put("wrapped", true); + } + } + + private static void handleParameter2(JSONObject parameter) { + parameter.remove("lastChanged"); + removeDefault(parameter, "required", "false"); + removeEmptyList(parameter, "allOf"); + if (parameter.has("$class") + && (parameter.getString("$class").endsWith("SwaggerSimpleObjectType") + || parameter.getString("$class").endsWith("SwaggerEnumObjectType") || parameter.getString( + "$class").endsWith("SwaggerReferenceObjectType"))) { + handleDefinition2(parameter); + return; + } + JSONObject type = parameter.getJSONObject("type"); + handleDefinition2(type); + parameter.remove("type"); + copy(type, parameter, "default"); + copy(type, parameter, "description"); + if (type.has("required") && type.getString("required").equals("true")) + parameter.put("required", true); + if (parameter.has("in") && parameter.getString("in").equals("body")) { + JSONObject schema = new JSONObject(); + if (type.has("items")) { + schema.put("type", "array"); + JSONObject ref = new JSONObject(); + schema.put("items", ref); + ref.put("$ref", type.getJSONObject("items").get("$ref")); + } else { + schema.put("$ref", type.get("$ref")); + } + parameter.put("schema", schema); + } else { + copy(type, parameter, "type"); + copy(type, parameter, "enum"); + move(type, parameter, "format"); + moveInt(type, parameter, "minimum"); + moveInt(type, parameter, "maximum"); + if (type.has("items")) { + parameter.put("type", "array"); + } + copy(type, parameter, "items"); + copy(type, parameter, "collectionFormat"); + } + if (parameter.has("additionalProperties")) { + handleDefinition2(parameter.getJSONObject("additionalProperties")); + } + removeEmptyList(parameter, "comsumes"); + removeEmptyList(parameter, "produces"); + parameter.remove("lastChanged"); + } + + private static void handleDefinition2(JSONObject definition) { + definition.remove("lastChanged"); + removeDefault(definition, "required", "false"); + if (definition.has("reference")) { + definition.put("$ref", "#" + definition.getJSONObject("reference").getString("$ref")); + definition.remove("reference"); + definition.remove("type"); + } + if (definition.getBoolean("many")) { + JSONObject items = new JSONObject(); + definition.put("items", items); + move(definition, items, "type"); + move(definition, items, "enum"); + move(definition, items, "default"); + move(definition, items, "$ref"); + move(definition, items, "format"); + move(definition, items, "minimum"); + move(definition, items, "maximum"); + definition.put("type", "array"); + } + removeDefault(definition, "collectionFormat", "csv"); + + definition.remove("many"); + definition.remove("$class"); + } + + private static void removeEmptyList(JSONObject json, String key) { + if (json.has(key) && json.getJSONArray(key).length() == 0) { + json.remove(key); + } + } + + private static void removeEmptyObject(JSONObject json, String key) { + if (json.has(key) && json.getJSONObject(key).length() == 0) { + json.remove(key); + } + } + + private static void removeDefault(JSONObject json, String key, Object value) { + if (json.has(key) && value.equals(json.get(key))) + json.remove(key); + } + + private static void convertFromObjectToArray(JSONObject res, String key, String name) { + JSONObject j = res.getJSONObject(key); + JSONArray a = new JSONArray(); + for (Iterator i1 = j.keys(); i1.hasNext();) { + String k = i1.next(); + JSONObject j1 = new JSONObject(); + j1.put(name, k); + a.put(JsonUtils.merge(j1, j.getJSONObject(k))); + } + res.put(key, a); + } + + private static void copy(JSONObject from, JSONObject to, String key) { + if (from.has(key)) + to.put(key, from.get(key)); + } + + private static void move(JSONObject from, JSONObject to, String key) { + if (from.has(key)) { + to.put(key, from.get(key)); + from.remove(key); + } + } + + private static void moveInt(JSONObject from, JSONObject to, String key) { + if (from.has(key)) { + to.put(key, from.getInt(key)); + from.remove(key); + } + } + + @SuppressWarnings("unused") + private static void moveBoolean(JSONObject from, JSONObject to, String key) { + if (from.has(key)) { + to.put(key, from.getBoolean(key)); + from.remove(key); + } + } + + public static JSONObject server2json(ManagementServer s) { + try { + return swagger2json(server2swagger(s)); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("Unable to create Swagger object"); + } + + } + + private static SwaggerModel server2swagger(ManagementServer s) { + SwaggerModel m = SwaggerFactory.eINSTANCE.createSwaggerModel(); + try { + JSONObject json = new JSONObject(getTemplate("swagger-api.json")); + ManagementServer s1 = new ManagementServer(); + s1.setObject(SwaggerFactory.eINSTANCE.createSwaggerModel()); + m = json2swagger(s1, json); + } catch (Exception e) { + throw new RuntimeException("Unable to create initial Swagger object: " + e, e); + } + Map done = new HashMap(); + eclass2swagger("/resources", s.getObject().eClass(), m, done); + return m; + } + + static List allEClasses = null; + + private static List findSubClasses(EClass c) { + List res = new ArrayList(); + if (allEClasses == null) { + allEClasses = new ArrayList(); + Registry i = EPackage.Registry.INSTANCE; + for (String x : i.keySet()) { + System.err.println("SWAGGER: " + x + " " + i.get(x)); + if (i.get(x) instanceof EPackage) { + EPackage p = (EPackage) i.get(x); + for (EClassifier c1 : p.getEClassifiers()) { + if (c1 instanceof EClass) { + EClass c2 = (EClass) c1; + allEClasses.add(c2); + } + } + } + } + } + for (EClass c1 : allEClasses) { + if (c.isSuperTypeOf(c1)) + res.add(c1); + } + return res; + } + + private static String getTemplate(String resource) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + byte[] data = new byte[65536]; + InputStream is = SwaggerUtils.class.getClassLoader().getResourceAsStream(resource); + if (is == null) { + throw new RuntimeException("Unable to find resource: " + resource); + } + int i; + try { + while ((i = is.read(data)) > 0) { + baos.write(data, 0, i); + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (is != null) + is.close(); + } + return (new String(baos.toByteArray())); + } + + private static void eclass2swagger(String path, EClass eClass, SwaggerModel m, Map done) { + String key = "eclass:" + eClass.getEPackage().getNsURI() + ":" + eClass.getName(); + System.err.println("SWAGGER: " + key + " " + path); + if (done.containsKey(key)) + return; + done.put(key, ""); + String tag = eclass2tag(eClass, m, done); + SwaggerPath p = SwaggerFactory.eINSTANCE.createSwaggerPath(); + p.setName(path); + m.getPaths().add(p); + p.getMethods().add(method("get", tag, "List object of type: " + eClass.getName())); + for (EReference ref : eClass.getEAllContainments()) { + for (EClass c1 : findSubClasses(ref.getEReferenceType())) { + eclass2swagger(path + "/" + ref.getName(), c1, m, done); + } + } + } + + public void autoAdd(String path, EClass eClass, int levels) { + autoAdd(path, eClass, levels, new ArrayList()); + } + + public void autoAdd(String path, EClass eClass, int levels, List pathVars) { + if (levels < 0) + return; + String key = "eclassAtPath:" + eClassName(eClass) + "@" + path; + if (done.containsKey(key)) + return; + // System.err.println("SWAGGER: " + key + " " + path); + done.put(key, ""); + String tag = path2tag(path); + SwaggerPath p = SwaggerFactory.eINSTANCE.createSwaggerPath(); + p.setName(path); + m.getPaths().add(p); + p.getMethods().add(listObjectMethod(tag, eClass, pathVars)); + p.getMethods().add(createObjectMethod(tag, eClass, pathVars)); + p.getMethods().add(updateObjectMethod(tag, eClass, pathVars)); + p.getMethods().add(deleteObjectMethod(tag, eClass, pathVars)); + for (EOperation op : eClass.getEAllOperations()) { + operationObjectMethod(path, tag, eClass, pathVars, op); + } + for (EReference ref : eClass.getEAllContainments()) { + addListObjectPath(path, pathVars, ref); + List l = findSubClasses(ref.getEReferenceType()); + List l2 = new ArrayList(); + for (EClass c1 : l) { + String key2 = "eclass:recursion:" + tag + ":" + eClassName(eClass) + ":" + eClassName(c1); + if (done.containsKey(key2)) + continue; + done.put(key2, ""); + l2.add(c1); + } + int index = 0; + for (EClass c1 : l2) { + List vars = new ArrayList(); + vars.addAll(pathVars); + String v = pathVar(ref, l2, index++); + if (v.length() > 0) + vars.add(v.substring(2, v.length() - 1)); + autoAdd(path + "/" + ref.getName() + v, c1, levels - 1, vars); + } + } + // System.err.println("SWAGGER: DONE " + key + " " + path); + } + + private void addListObjectPath(String path, List pathVars, EReference ref) { + if (!ref.isMany()) + return; + String path1 = path + "/" + ref.getName(); + String tag = path2tag(path1); + SwaggerPath p = SwaggerFactory.eINSTANCE.createSwaggerPath(); + p.setName(path1); + m.getPaths().add(p); + SwaggerOperation method = method("get", tag, "List " + ref.getName() + " names"); + addPathParameters(method, pathVars); + p.getMethods().add(method); + } + + private void addPathParameters(SwaggerOperation method, List pathVars) { + for (String v : pathVars) { + addParameter(method, v, SwaggerParameterType.PATH, "string", null, null); + } + } + + private SwaggerOperation listObjectMethod(String tag, EClass c, List pathVars) { + SwaggerOperation method = method("get", tag, "List object of type: " + c.getName()); + addPathParameters(method, pathVars); + addParameter(method, "levels", SwaggerParameterType.QUERY, "string", "1", "The number of levels return"); + return method; + } + + private SwaggerOperation createObjectMethod(String tag, EClass c, List pathVars) { + SwaggerOperation method = method("post", tag, "Create new object of type: " + c.getName()); + addPathParameters(method, pathVars); + addBodyParameter(method, c); + return method; + } + + private void addBodyParameter(SwaggerOperation method, EClass c) { + SwaggerParameter p = SwaggerFactory.eINSTANCE.createSwaggerParameter(); + p.setName("body"); + p.setIn(SwaggerParameterType.BODY); + SwaggerReferenceObjectType type = SwaggerFactory.eINSTANCE.createSwaggerReferenceObjectType(); + type.setRequired(true); + type.setReference(findDefinition(c)); + p.setType(type); + type.setDescription("JSON representation of " + c.getName()); + method.getParameters().add(p); + } + + private SwaggerObjectClassDefinition findDefinition(EClass c) { + String key = "definition:" + eClassName(c); + if (done.containsKey(key)) + return (SwaggerObjectClassDefinition) done.get(key); + + SwaggerObjectClassDefinition res = SwaggerFactory.eINSTANCE.createSwaggerObjectClassDefinition(); + + res.setName(c.getName()); + for (EAttribute attr: c.getEAllAttributes()) { + SwaggerSimpleObjectType p = newSimpleType("string", attr.isRequired()); + // TODO fix more stuff here + p.setName(attr.getName()); + res.getProperties().add(p); + } + m.getDefinitions().add(res); + done.put(key,res); + return res ; + } + + private SwaggerObjectClassDefinition operationDefinition(EOperation op) { + SwaggerObjectClassDefinition res = SwaggerFactory.eINSTANCE.createSwaggerObjectClassDefinition(); + res.setName(op.getEContainingClass().getName() + "@" + op.getName()); + for (EParameter param: op.getEParameters()) { + SwaggerSimpleObjectType p = newSimpleType("string", param.isRequired()); + // TODO fix more stuff here + p.setName(param.getName()); + res.getProperties().add(p); + } + m.getDefinitions().add(res); + return res; + } + + private SwaggerOperation updateObjectMethod(String tag, EClass c, List pathVars) { + SwaggerOperation method = method("put", tag, "Update existing object of type: " + c.getName()); + addPathParameters(method, pathVars); + addBodyParameter(method, c); + return method; + } + + private SwaggerOperation deleteObjectMethod(String tag, EClass c, List pathVars) { + SwaggerOperation method = method("delete", tag, "Delete existing object of type: " + c.getName()); + addPathParameters(method, pathVars); + return method; + } + + private SwaggerOperation operationObjectMethod(String path, String tag, EClass c, List pathVars, EOperation op) { + SwaggerOperation method = method("put", tag, "Delete existing object of type: " + c.getName()); + addParameter(method, "action", SwaggerParameterType.HEADER, "string", op.getName(), null); + addPathParameters(method, pathVars); + SwaggerPath p = SwaggerFactory.eINSTANCE.createSwaggerPath(); + p.setName(path + "/_ACTION/" + op.getName()); + m.getPaths().add(p); + p.getMethods().add(method); + + + // TODO this makes the toJson() crash. + SwaggerParameter parameter = SwaggerFactory.eINSTANCE.createSwaggerParameter(); + parameter.setName("body"); + parameter.setIn(SwaggerParameterType.BODY); + SwaggerReferenceObjectType type = SwaggerFactory.eINSTANCE.createSwaggerReferenceObjectType(); + type.setRequired(true); + type.setReference(operationDefinition(op)); + parameter.setType(type); + type.setDescription("JSON representation of " + c.getName()); + method.getParameters().add(parameter); + +// SwaggerObjectClassDefinition type = SwaggerFactory.eINSTANCE.createSwaggerObjectClassDefinition(); +// parameter.setType(type); +// type.setDescription("JSON representation of parameters to " + op.getName()); +// for (EParameter p1 : op.getEParameters()) { +// type.getProperties().add(eparam2property(p1)); +// } + + return method; + } + + @SuppressWarnings("unused") + private SwaggerNamedObjectType eparam2property(EParameter p1) { + SwaggerSimpleObjectType p = newSimpleType("string", p1.isRequired()); + return p; + } + + private static void addParameter(SwaggerOperation method, String name, SwaggerParameterType ptype, String type, + String def, String description) { + SwaggerParameter p = SwaggerFactory.eINSTANCE.createSwaggerParameter(); + p.setName(name); + p.setIn(ptype); + SwaggerSimpleObjectType stype = newSimpleType(type, def == null); + p.setType(stype); + stype.setDescription(description); + method.getParameters().add(p); + } + + private String pathVar(EReference ref, List l, int index) { + String indexName = l.size() == 1 ? "" : Integer.toString(index); + if (!ref.isMany()) + return indexName.equals("") ? "" : "{" + indexName + "}"; + String name = ref.getName(); + if (name.endsWith("ies")) + name = name.substring(0, name.length() - 3) + "y"; + else if (name.endsWith("es")) + name = name.substring(0, name.length() - 2); + else if (name.endsWith("s")) + name = name.substring(0, name.length() - 1); + return "/{" + name + indexName + "}"; + } + + private String eClassName(EClass eClass) { + return eClass.getEPackage().getNsURI() + ":" + eClass.getName(); + } + + private String path2tag(String path) { + String res = null; + String tagName = path2tagName(path); + System.err.println("path=" + path + " tagName=" + tagName); + for (SwaggerTag tag : m.getTags()) { + if (!tagName.startsWith(tag.getName())) + continue; + if (res != null && tag.getName().length() < res.length()) + continue; + res = tag.getName(); + } + if (res == null) { + if (!rootTagAdded) { + rootTagAdded = true; + addTag("ROOT", "Anything else"); + } + res = "ROOT"; + } + return res; + } + + private String path2tagName(String path) { + // SWAGGER does not support / in tags + if (path.contains("/")) + return path.substring(1).replace("/", "-"); + return path; + } + + private static SwaggerOperation method(String name, String tag, String description) { + SwaggerOperation res = SwaggerFactory.eINSTANCE.createSwaggerOperation(); + res.setName(name); + res.setDescription(description); + res.getTags().add(tag); + // SwaggerParameter p = + // SwaggerFactory.eINSTANCE.createSwaggerParameter(); + // p.setName("Authorization"); + // p.setIn(SwaggerParameterType.HEADER); + // p.setType(newSimpleType("string",true)); + // res.getParameters().add(p); + addParameter(res, "Authorization", SwaggerParameterType.HEADER, "string", null, "Basic HTTP Authorization"); + addParameter(res, "X-ECOMP-RequestID", SwaggerParameterType.HEADER, "string", null, "ECOMP Request ID"); + return res; + } + + private static SwaggerSimpleObjectType newSimpleType(String type, boolean required) { + SwaggerSimpleObjectType res = SwaggerFactory.eINSTANCE.createSwaggerSimpleObjectType(); + res.setRequired(required); + res.setType(type); + return res; + } + + private static String eclass2tag(EClass eClass, SwaggerModel m, Map done) { + String key = "tag:" + eClass.getEPackage().getNsURI(); + if (done.containsKey(key)) + return (String) done.get(key); + SwaggerTag tag = SwaggerFactory.eINSTANCE.createSwaggerTag(); + tag.setName(eClass.getEPackage().getNsURI()); + m.getTags().add(tag); + done.put(key, tag.getName()); + return tag.getName(); + } + + public void autoAddApi(String path, EObject o) { + System.err.println("SWAGGER: autoAddApi " + path + " " + o + " \n"); + // Thread.dumpStack(); + if (alreadyDone("auto-add-api: " + path + " : " + o.hashCode())) + return; + if (o instanceof ISwaggerHandler) { + ISwaggerHandler handler = (ISwaggerHandler) o; + handler.updateSwagger(path, this); + } else + autoAdd(path, o.eClass(), 1000); + System.err.println("SWAGGER: autoAddApi DONE" + path + " " + o); + } + + /** + * Adds Swagger Tag to Model + * + * @param path + * The resource path that this tag represent + * @param description + * Tag Description + */ + public void addTag(String path, String description) { + String key = "tag:" + path; + if (done.containsKey(key)) + return; + SwaggerTag tag = SwaggerFactory.eINSTANCE.createSwaggerTag(); + tag.setName(path2tagName(path)); + tag.setDescription(description); + m.getTags().add(tag); + done.put(key, tag.getName()); + } + + public void addTag(String path, String description, EObject o) { + addTag(path, description); + autoAddApi(path, o); + } + + /** + * @return JSON representation of Swagger Model + */ + public JSONObject toJson() { + try { + return swagger2json(m); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("Unable to convert Swagger Model to Json: " + e); + } + } + + private boolean alreadyDone(String key) { + if (done.containsKey(key)) + return true; + System.err.println("SWAGGER: " + key); + done.put(key, ""); + return false; + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageManager.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageManager.java new file mode 100644 index 0000000..cd5798f --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageManager.java @@ -0,0 +1,285 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.logs; + +import java.io.File; +import java.util.Date; +import java.util.HashMap; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; + +import org.openecomp.ncomp.core.logs.*; +import org.openecomp.ncomp.sirius.function.FunctionUtils; +import org.openecomp.ncomp.sirius.manager.*; +import org.openecomp.ncomp.utils.journaling.JournalingList; + +public class LogMessageManager { + public static final Logger logger = Logger.getLogger(LogMessageManager.class); + public static final Logger logger2 = Logger.getLogger("org.openecomp.ncomp.sirius.manager.uploaded"); + private HashMap logs = new HashMap(); + private JournalingList allLogs = null; + private ManagementServer s; + + public LogMessageManager(ManagementServer s) { + super(); + this.s = s; + } + + public synchronized void addLogMessage(EObject o, Message m) { + o2logs(o).add(m); + } + + public synchronized void addLogMessage(EObject o, LogMessage m) { + Message m1 = new Message(m); + addLogMessage(o, m1); + } + + public synchronized EList getMessages(EObject o, Date start, Date end) { + return o2logs(o).getMessages(start, end); + } + + private LogMessageStore o2logs(EObject o) { + return path2logs(ManagementServer.object2ref(o)); + } + + private LogMessageStore path2logs(String path) { + initLogs(); + LogMessageStore store = logs.get(path); + if (store == null) { + String dir = s.getProps().getProperty("logs.dir", "data/logs") + path; + store = new LogMessageStore(dir, path); + logs.put(path, store); + if (!allLogs.contains(path)) { + allLogs.add(path); + allLogs.save(); + } + } + return store; + } + + @SuppressWarnings("unchecked") + private void initLogs() { + if (allLogs == null) { + String file = s.getProps().getProperty("logs.dir", "data/logs") + "/allLogs.dat"; + allLogs = JournalingList.create(new File(file)); + } + } + + public synchronized EList getMessages(String prefixPath, Date start, Date end) { + EList res = new BasicEList(); + initLogs(); + for (String p : allLogs) { + // TODO THIS DOES NOT WORK + // if (!p.startsWith(prefixPath)) + // continue; + for (LogMessage m : path2logs(p).getMessages(start, end)) { + if (m.getResourceName().startsWith(prefixPath)) + res.add(m); + } + } + return LogMessageStore.sortMessages(res); + } + + public synchronized void save() { + for (LogMessageStore s : logs.values()) + s.logs.save(); + } + + public void updateLogs(EObject s, EList logs, EList rules, Logger logger) { + String path = ManagementServer.object2ref(s); + for (LogMessage log : logs) { + if (log.getTime() < 140646778200L) { + logger.warn("Metric time is too old:" + new Date(log.getTime())); + log.setTime(new Date().getTime()); + } + // System.err.println "new log $log $path" + if (log.getResourceName() == null) { + log.setResourceName(path); + } else { + if (log.getResourceName().startsWith("/")) { + log.setResourceName(path + log.getResourceName()); + } else { + log.setResourceName(path + "/" + log.getResourceName()); + } + } +// if (log.getCategory() == null) { +// setCategory(log); +// } + updateLogMessage(log, rules); + String m = "resource=" + log.getResourceName() + " severity=" + log.getSeverity() + " " + log.getMessage(); + updateServer(log); + switch (log.getLevel()) { + case INFO: + logger2.info(m); + break; + case WARN: + logger2.warn(m); + break; + case ERROR: + logger2.error(m); + break; + case FATAL: + logger2.fatal(m); + break; + default: + break; + } + addLogMessage(s, log); + } + save(60000L); // save every minute + } + + private void updateServer(LogMessage log) { + LogMessageContainer o = findLogContainer(log); + if (o == null) return; + updateLogStatsContainer(o,log); + } + + private LogMessageContainer findLogContainer(LogMessage log) { + Subject subject = ManagementServer.find(s.getObject(), log.getResourceName(), true); + LogMessageContainer c = null; + if (subject != null && subject.o != null) { + EObject oo = subject.o; + while (oo != null) { + if (oo instanceof LogMessageContainer) { + c = (LogMessageContainer) oo; + break; + } + oo = oo.eContainer(); + } + } + if (c == null) { + logger.warn("unable to find LogMessageContainer for: " + log.getResourceName()); + return null; + } + return c; + } + + private LogMessageCategory findLogCategory(String name, LogMessage log) { + LogMessageContainer c = findLogContainer(log); + if (c == null) return null; + LogMessageCategory cat = null; + for (LogMessageCategory cat1 : c.getLogMessageCategories()) { + if (cat1.getName().equals(name)) { + cat = cat1; + break; + } + } + if (cat == null) { + cat = LogsFactory.eINSTANCE.createLogMessageCategory(); + cat.setName(name); + c.getLogMessageCategories().add(cat); + } + return cat; + } + + private void updateLogStatsContainer(EObject o, LogMessage log) { + if (o instanceof LogMessageContainer) { + LogMessageContainer c = (LogMessageContainer) o; + updateLogStats(c.getLogMessageStats(),log.getSeverity().toString(),log.getSeverity(),null,LogSeverity.UNKNOWN); + updateLogStats(c.getLogMessageStats(),"ALL",null,null,LogSeverity.UNKNOWN); + } + if (o.eContainer() != null) + updateLogStatsContainer(o.eContainer(), log); + } + + private void updateLogStats(EList l, String n, LogSeverity sev, LogLevel level, LogSeverity minLogSeverity) { + if (minLogSeverity != null && minLogSeverity != LogSeverity.UNKNOWN && (sev == null || sev == LogSeverity.UNKNOWN || sev.ordinal() > minLogSeverity.ordinal())) return; + LogMessageStats stats = (LogMessageStats) ManagementServer.findInNamedList(l, n); + if (stats == null) { + stats = LogsFactory.eINSTANCE.createLogMessageStats(); + stats.setName(n); + stats.setLevel(level); + stats.setSeverity(sev); + l.add(stats); + } + if (stats.getCount() == null) + s.metrics.initAttribute(stats,"count"); + if (stats.getCount() != null) + stats.getCount().increase(1L,false); + } + + @SuppressWarnings("unused") + private void setCategory(LogMessage log) { + log.setCategory(log.getMessage().replaceAll("Exchange@[0-9a-f]+", "EEE").replaceAll("[0-9]+", "NNN")); + } + + long lastUpdate = 0; + + private void save(long i) { + long now = new Date().getTime(); + if (lastUpdate + i < now) { + save(); + lastUpdate = new Date().getTime(); + } + + } + + private void updateLogMessage(LogMessage log, EList rules) { + if (rules == null) + return; + logger.debug("Log:" + log); + for (LogMessageRule r : rules) { + logger.debug("Rule:" + r); + if (r.isDisabled()) + continue; + try { + if (r.getMessageFilter() != null && !log.getMessage().matches(r.getMessageFilter())) + continue; + if (r.getResourcePathFilter() != null && !log.getResourceName().matches(r.getResourcePathFilter())) + continue; + } catch (Exception e) { + r.setDisabled(true); + logger.error("error in log message rule (now disabled): " + e); + } + if (r.getLevel() != LogLevel.UNKNOWN && log.getLevel() != r.getLevel()) + continue; + if (r.getSeverity() != LogSeverity.UNKNOWN && log.getSeverity() != r.getSeverity()) + continue; + LogMessageCategory cat = findLogCategory(r.getName(), log); + if (r.getNewLevel() != LogLevel.UNKNOWN) + log.setLevel(r.getNewLevel()); + if (r.getNewSeverity() != LogSeverity.UNKNOWN) + log.setSeverity(r.getNewSeverity()); + updateLogStats(cat.getStats(),"ALL",null,null,null); + if (r.getUpdateFunction() != null) { +// System.err.println("XYZ : " + log + " " + r.getUpdateFunction() + " " + findLogCategory(r.getName(),log)); + LogMessageState logState = LogsFactory.eINSTANCE.createLogMessageState(); + logState.setLog(log); + logState.setCategory(cat); + logState.setSuspended(ManagementServer.isSuspended(cat, null)); + FunctionUtils.update(logState, r.getUpdateFunction(), false); +// System.err.println("XYZ : " + log); + } + logger.debug("Rule matched:" + r); + String n = log.getSeverity().toString() + ":" + log.getLevel().toString(); + updateLogStats(cat.getStats(),n,log.getSeverity(),log.getLevel(),LogSeverity.SEV3); + // should break but SOMF does not handle list order correctly. + // Note SOMF does now handle order. + } + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageStore.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageStore.java new file mode 100644 index 0000000..2d1c10d --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageStore.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.sirius.manager.logs; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.Date; +import java.util.List; + +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.utils.SortUtil; +import org.openecomp.ncomp.utils.journaling.JournalingDateObject; +import org.openecomp.ncomp.utils.journaling.JournalingList; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +public class LogMessageStore { + + JournalingDateObject> logs; + public LogMessageStore(String dir, String path) { + logs = new JournalingDateObject>(dir, JournalingList.class); + } + + public void add(Message m) { + logs.get(m.time).add(m); + } + + public EList getMessages(Date start, Date end) { + List res = new ArrayList(); + for (Date d: DateUtils.dateRange(start, end, DateUtils.stringToDuration("1day"))) { + for (Message m : logs.get(d)) { + if (m.time.before(start) || m.time.after(end)) continue; + res.add(m.toLogMessage()); + } + } + return sortMessages(res); + } + + public static EListsortMessages(Collection l) { + return new BasicEList(SortUtil.sort(l, comp)); + } + + private static Comparator comp = new Comparator() { + @Override + public int compare(LogMessage t1, LogMessage t2) { + return - ((Long)t1.getTime()).compareTo(t2.getTime()); + } + }; + + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageSuppressor.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageSuppressor.java new file mode 100644 index 0000000..80c7eb9 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogMessageSuppressor.java @@ -0,0 +1,109 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.logs; + +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; + +public class LogMessageSuppressor { + + public interface ILogMessageHandler { + void handleLog(LogMessage m); + } + + private ILogMessageHandler handler; + + class LogMessageContainer { + public LogMessageContainer(LogMessage m) { + this.m = m; + d = new Date(); + } + + Date d; + LogMessage m; + int num = 0; + } + + public LogMessageSuppressor(ILogMessageHandler handler1, long duration1) { + super(); + this.duration = duration1; + this.handler = handler1; + Thread t = new Thread("log message suppressor") { + @Override + public void run() { + while (true) { + try { + Thread.sleep(30000); + synchronized (LogMessageSuppressor.this) { + long now = new Date().getTime(); + List remove = new ArrayList(); + for (String k : map.keySet()) { + LogMessageContainer c = map.get(k); + if (c.d.getTime() + duration < now) { + remove.add(k); + } + } + for (String k : remove) { + LogMessageContainer c = map.remove(k); + if (c.num > 1) { + c.m.setMessage(c.m.getMessage() + " Suppressed messages: " + c.num + " in last " + duration / 1000 + + " seconds"); + handler.handleLog(c.m); + } + } + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } + } + } + }; + t.start(); + } + + long duration; + HashMap map = new HashMap(); + + public synchronized void add(LogMessage m) { + String k = messageKey(m); + LogMessageContainer d = map.get(k); + if (d == null) { + handler.handleLog(m); + d = new LogMessageContainer(m); + map.put(k, d); + } + d.num ++; + } + + private String messageKey(LogMessage m) { + String k = m.getResourceName() + ":" + m.getLevel().toString() + ":" + (m.getTime() / duration) + ":" + + m.getMessage().replaceAll("Exchange@[0-9a-f]+", "EEE").replaceAll("[0-9]+", "NNN"); + // System.out.println(m.getMessage() + " -> " + k); + return k; + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogScanner.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogScanner.java new file mode 100644 index 0000000..ff30a9a --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/LogScanner.java @@ -0,0 +1,104 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.logs; + +import java.io.File; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +import org.openecomp.ncomp.core.logs.LogConfiguration; +import org.openecomp.ncomp.core.logs.LogFile; +import org.openecomp.ncomp.core.logs.LogPattern; +import org.openecomp.ncomp.utils.StringMatcher; +import org.openecomp.ncomp.utils.StringUtil; +import org.openecomp.ncomp.utils.extra.FileTail.NewLineHandler; + +public class LogScanner implements NewLineHandler { + interface LogMessageHandler { + void newLog(Message msg); + void fixFilePermissions(File file); + } + + private LogMessageHandler handler; + private LogConfiguration config; + private String directory; + + public LogScanner(LogMessageHandler handler, LogConfiguration config, String directory) { + this.handler = handler; + this.config = config; + this.directory = directory; + init(); + } + + private void init() { + for (LogFile f : config.getFiles()) { + List l = new ArrayList(); + for (LogPattern p : f.getPatterns()) { + PatternUtility m = new PatternUtility(); + m.f = f; + m.p = p; + m.m = new StringMatcher(p.getPattern()); + l.add(m); + } + new org.openecomp.ncomp.utils.extra.FileTail(f.getFilename(), directory, null, null, null, this, l); + } + + } + + @Override + public void newLine(String file, String line, Object context) { + @SuppressWarnings("unchecked") + List l = (List) context; + HashMap h = new HashMap(); + Date date = new Date(); + for (PatternUtility m : l) { + if (m.m.match(line, h, date)) { + String level = expand(m.p.getLevel(), "${level}", h); + String severity = expand(m.p.getSeverity(), "${severity}", h); + String message = expand(m.p.getMessage(), "${message}", h); + String path = expand(m.p.getPath(), "${message}", h); + Message msg = new Message(level, severity, message, path, date); + handler.newLog(msg); + } + } + + } + + private String expand(String str, String def, HashMap h) { + if (str == null) str = def; + return StringUtil.expandUsingMap(str, h, "$"); + } + + private class PatternUtility { + StringMatcher m; + LogFile f; + LogPattern p; + } + + @Override + public void fixFilePermissions(File file) { + handler.fixFilePermissions(file); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/Message.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/Message.java new file mode 100644 index 0000000..a4e3586 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/logs/Message.java @@ -0,0 +1,102 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.logs; + +import java.io.Serializable; +import java.util.Date; + +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.LogsFactory; + +public class Message implements Serializable { + @Override + public String toString() { + return "Message [level=" + level + ", severity=" + severity + ", message=" + message + ", path=" + path + ", time=" + time + + ", creationTime=" + creationTime + "]"; + } + private static final long serialVersionUID = 1L; + public Message(){} + public Message(LogLevel level, LogSeverity severity, String message, Date time) { + super(); + this.level = level; + this.severity = severity; + this.message = message; + this.time = time; + creationTime = new Date(); + } + public Message(LogMessage m) { + level = m.getLevel(); + severity = m.getSeverity(); + message = m.getMessage(); + time = new Date(m.getTime()); + path = m.getResourceName(); + creationTime = new Date(); + } + public Message(String level2, String severity2, String message2, String path2, Date time) { + level = LogLevel.valueOf(level2); + severity = LogSeverity.valueOf(severity2); + this.message = message2; + this.path = path2; + this.time = time; + creationTime = new Date(); + } + private LogLevel level; + private LogSeverity severity; + private String message; + private String path; + Date time; + private Date creationTime; + + public LogLevel getLevel() { + return level; + } + + public LogSeverity getSeverity() { + return severity; + } + + public String getMessage() { + return message; + } + public String getPath() { + return path; + } + public Date getTime() { + return time; + } + + public Date getCreationTime() { + return creationTime; + } + + public LogMessage toLogMessage() { + LogMessage m = LogsFactory.eINSTANCE.createLogMessage(); + m.setLevel(level); + m.setSeverity(severity); + m.setMessage(message); + m.setResourceName(path); + m.setTime(time.getTime()); + return m; + } +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricManager.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricManager.java new file mode 100644 index 0000000..1ca5e7f --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricManager.java @@ -0,0 +1,605 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.metrics; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EAnnotation; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.openecomp.ncomp.component.Api; +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOption; +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType; +import org.openecomp.ncomp.core.metrics.BasicMetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricsFactory; +import org.openecomp.ncomp.core.metrics.SequenceMetricValueOption; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.DoubleMetricMeasurement; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.MetricAttribute; +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.sirius.manager.*; +import org.openecomp.ncomp.utils.SortUtil; +import org.openecomp.ncomp.utils.StringUtil; +import org.openecomp.ncomp.utils.journaling.JournalingList; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +public class MetricManager { + public static final Logger logger = Logger.getLogger(MetricManager.class); + ManagementServer server; + private HashMap path2store = new HashMap(); + private JournalingList allStores = null; + + @SuppressWarnings("unchecked") + public MetricManager(ManagementServer s) { + super(); + this.server = s; + String dir = s.getProps().getProperty("metrics.dir"); + if (dir == null) + return; + String file = dir + "/allStores.dat"; + allStores = JournalingList.create(new File(file)); + // TODO initialize old stores in separate thread. + initManager(); + } + + private void initManager() { + final Thread t = new Thread("init metrics") { + @Override + public void run() { + while (server.getObject() == null) { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + ManagementServerUtils.printStackTrace(e); + } + } + logger.info("Starting initializing Metric Stores"); + List l = new ArrayList(allStores); + for (String path : l) { + Subject s = ManagementServer.find(server.getObject(), "/" + path); + if (s == null || s.o == null) { + continue; + } + MetricStore store = getStore(s.o); + store.initStore(); + } + logger.info("Done initializing Metric Stores"); + } + }; + t.start(); + Thread t1 = new Thread("record metrics") { + @Override + public void run() { + // wait for initialization to complete before starting to record + try { + t.join(); + } catch (InterruptedException e1) { + logger.warn("Failure while waiting for thread initialization to complete: " + e1); + } + while (true) { + try { + Thread.sleep(60000); + updateMetrics(server.getObject()); + } catch (Exception e) { + logger.warn("recording metrics " + e); + e.printStackTrace(); + } + } + } + + }; + t1.start(); + } + private void updateMetrics(EObject o) { + for (EAttribute attr : o.eClass().getEAllAttributes()) { + Object a = o.eGet(attr); + if (a instanceof MetricAttribute) { + MetricAttribute m = (MetricAttribute) a; + m.record(); + } + } + for (EReference ref : o.eClass().getEAllContainments()) { + if (ref.isMany()) { + @SuppressWarnings("unchecked") + EList l = (EList) o.eGet(ref); + for (EObject o1 : l) { + updateMetrics(o1); + } + } + else { + EObject o1 = (EObject) o.eGet(ref); + if (o1 != null) updateMetrics(o1); + } + } + + } + + public MetricStore getStore(EObject o) { + String path = ManagementServer.object2ref(o); + MetricStore store = path2store.get(path); + if (store == null) { + // path2metric[cc] = [:] + String dir = server.getProps().getProperty("metrics.dir", "data/metrics"); + store = new MetricStore(dir + path, o, this); + path2store.put(path, store); + if (!allStores.contains(path)) { + allStores.add(path); + allStores.save(); + } + } + return store; + } + + public void updateMetric(EObject o, EAttribute attr, Object value) { + MetricStore store = findStore(o); + String path = ManagementServer.relativeObject2ref(store.getObject(), o); + if (path == null) { + System.err.println("Internal error in findStore (null path): " + store.getObject() + " " + o); + System.err.println(store.getObject().eContainer() + " " + o.eContainer()); + System.err.println(ManagementServer.object2ref(store.getObject()) + " " + ManagementServer.object2ref(o)); + return; + // throw new + // RuntimeException("Internal error in findStore (null path): " + + // store.getObject() + " " + o); + } + path = path + "/" + attr.getName(); + String t = attr.getEType().getName(); + // System.err.println("adding " + path + " " + t + " " + value); + if (t.equals("IncreasingULongMetricAttribute")) { + store.addLongValue(path, new Date(), value2long(value), t, false); + } else if (t.equals("LongMetricAttribute")) { + store.addLongValue(path, new Date(), value2long(value), t, false); + } else if (t.equals("DoubleMetricAttribute")) { + store.addDoubleValue(path, new Date(), value2double(value), t); + } else if (t.equals("DateMetricAttribute")) { + store.addLongValue(path, new Date(), value2long(value), t, false); + } else if (t.equals("StringMetricAttribute")) { + logger.warn("Unsuppported metric: " + t); + } + } + + private Double value2double(Object value) { + if (value instanceof Double) { + return (Double) value; + } + if (value instanceof Integer) { + Integer i = (Integer) value; + return i.doubleValue(); + } + if (value instanceof Long) { + Long i = (Long) value; + return i.doubleValue(); + } + if (value instanceof String) { + return Double.parseDouble((String) value); + } + throw new RuntimeException("Unable to convert value to double: " + value + " " + value.getClass()); + } + + private long value2long(Object value) { + if (value instanceof Long) { + return (Long) value; + } + if (value instanceof Integer) { + Integer i = (Integer) value; + return i.longValue(); + } + if (value instanceof String) { + return Long.parseLong((String) value); + } + throw new RuntimeException("Unable to convert value to long: " + value + " " + value.getClass()); + } + + private MetricStore findStore(EObject o) { + if (o.eContainer() == null) + return getStore(o); + EAnnotation anno = o.eClass().getEAnnotation("http://openecomp.org/sirius/store"); + if (anno != null) + return getStore(o); + return findStore(o.eContainer()); + } + + public void updateMetrics(EObject s, EList metrics) { + MetricStore store = getStore(s); + for (Metric m : metrics) { + if (m.getTime() < 140646778200L) { + logger.warn("Metric time is too old:" + new Date(m.getTime())); + m.setTime(new Date().getTime()); + } + try { + String x = m.getResourceName() + "/" + m.getMetricName(); + // if (x.contains("qfsFilesystems")) System.err.println("ZZZ: " + // + x + " " + m); + if (m instanceof DoubleMetric) { + DoubleMetric dm = (DoubleMetric) m; + store.addDoubleValue(x, new Date(m.getTime()), dm.getValue(), null); + continue; + } + if (m instanceof LongMetric) { + LongMetric lm = (LongMetric) m; + store.addLongValue(x, new Date(m.getTime()), lm.getValue(), null, lm.isDelta()); + continue; + } + logger.warn("unknown metric: " + m); + } catch (Exception e) { + logger.warn("unable to update metric " + m + " " + e); + ManagementServerUtils.printStackTrace(e); + } + } + store.save(30000); + } + + public EList getValues(String path, Long start, Long end, MetricValueOption option, boolean relativeInterval) { + return getValues(server.getObject(), start, end, path, option, relativeInterval); + } + + public static EList getValues(EObject o, Long start, Long end, String path, MetricValueOption option, + boolean relativeInterval) { + Subject s = ManagementServer.find(o, path); + if (s == null || s.o == null || s.attr == null) + throw new RuntimeException("Bad Path: " + path + " " + o); + if (start == null) + throw new RuntimeException("No start parameter"); + if (end == null) + throw new RuntimeException("No end parameter"); + Object a = s.o.eGet(s.attr); + if (!(a instanceof MetricAttribute)) { + if (a == null) + throw new RuntimeException("Null Attribute: " + s.o.eClass().getName() + "@" + s.attr.getName()); + else + throw new RuntimeException("Not a metric Attribute: " + s.o.eClass().getName() + "@" + s.attr.getName()); + } + return getValues((MetricAttribute) a, s.attr, start, end, ManagementServer.object2ref(o) + path, option, false); + } + + public static double getValue(EObject o, String path, MetricValueOption option) { + Subject s = ManagementServer.find(o, path); + if (s == null || s.attr == null) + throw new RuntimeException("Bad Path: " + path); + Object a = s.o.eGet(s.attr); + if (!(a instanceof MetricAttribute)) { + throw new RuntimeException("Not a metric Attribute: " + s.o.eClass().getName() + "@" + s.attr.getName()); + } + long d = option2duration(option); + MetricAttribute aa = (MetricAttribute) a; + if (d > 0) { + long end = new Date().getTime(); + long start = end - d; + EList l = getValues(aa, s.attr, start, end, path, option, true); + if (l.size() > 1) { + System.err.println("wrong number returned" + l); + return -3; + } + return l.size() == 1 ? l.get(0).getValue() : 0.0; + } + // TODO the value should depend on the options. E.g., date. + return getValue(aa); + } + + private static double getValue(MetricAttribute aa) { + if (aa instanceof LongMetricAttribute) { + LongMetricAttribute m = (LongMetricAttribute) aa; + Long l = m.getValue(); + return l == null ? null : l.doubleValue(); + } + if (aa instanceof IncreasingULongMetricAttribute) { + IncreasingULongMetricAttribute m = (IncreasingULongMetricAttribute) aa; + return m.getValue(); + } + if (aa instanceof DoubleMetricAttribute) { + DoubleMetricAttribute m = (DoubleMetricAttribute) aa; + return m.getValue(); + } + return -1; + } + + private static long option2duration(MetricValueOption option) { + if (option instanceof AggregationMetricValueOption) { + return DateUtils.stringToDuration(((AggregationMetricValueOption) option).getDuration()); + } + if (option instanceof SequenceMetricValueOption) { + SequenceMetricValueOption o = (SequenceMetricValueOption) option; + long l = 0; + for (MetricValueOption o1 : o.getOptions()) { + long l1 = option2duration(o1); + if (l1 > l) + l = l1; + } + return l; + } + return 0; + } + + private static EList getValues(MetricAttribute a, EAttribute attr, Long start, Long end, String path, + MetricValueOption option, boolean relativeInterval) { + List ll = a.getValuesDouble(new Date(start), new Date(end)); + EList l = new BasicEList(); + for (DoubleMetricMeasurement v : ll) { + DoubleMetric m = MetricsFactory.eINSTANCE.createDoubleMetric(); + m.setMetricName(attr.getName()); + m.setValue(v.v); + m.setTime(v.d.getTime()); + m.setResourceName(path); + l.add(m); + } +// System.err.println("getValues path=" + path + " start=" + start + " end=" + end + " #values=" + l.size()); + return handleOption(path, attr, l, start, end, option, relativeInterval); + } + + private static EList handleOption(String path, EAttribute attr, EList values, Long start, Long end, + MetricValueOption option, boolean relativeInterval) { + if (option instanceof AggregationMetricValueOption) { + return handleOptionAggregation(path, attr, values, start, end, (AggregationMetricValueOption) option, relativeInterval); + } + if (option instanceof BasicMetricValueOption) { + return handleOptionBasic(attr, values, (BasicMetricValueOption) option); + } + if (option instanceof SequenceMetricValueOption) { + return handleOptionSequence(path, attr, values, start, end, (SequenceMetricValueOption) option, relativeInterval); + } + return values; + } + + private static EList handleOptionSequence(String path, EAttribute attr, EList values, Long start, Long end, + SequenceMetricValueOption option, boolean relativeInterval) { + // System.err.println("handleOptionSequence:" + path + " " + + // attr.getName()); + for (MetricValueOption o : option.getOptions()) { + values = handleOption(path, attr, values, start, end, o, relativeInterval); + } + return values; + } + + private static EList handleOptionBasic(EAttribute attr, EList values, BasicMetricValueOption option) { + boolean isDate = attr.getEType().getName().equals("DateMetricAttribute"); + // TODO handle date metrics when the value should be the difference + // between the current and prev time. + // EAnnotation anno = + // attr.getEAnnotation("http://openecomp.org/sirius/metric"); + // anno.getDetails().get("type"); + // System.err.println("handleOptionBasic:" + attr.getName() + " " + + // isDate); + for (DoubleMetric d : values) { + if (isDate) + d.setValue(d.getTime() - d.getValue()); + } + return values; + } + + private static EList handleOptionAggregation(String path, EAttribute attr, EList values, Long start, + Long end, AggregationMetricValueOption option, boolean relativeInterval) { + HashMap> m = new HashMap>(); + // System.err.println("handleOptionAggregation:" + path + " " + + // attr.getName()); + if (option.getDuration() == null || option.getDuration().equals("")) + return values; + long duration2 = DateUtils.stringToDuration(option.getDuration()); + if (duration2 == 0) + return values; + if (!relativeInterval) { + start = start / duration2 * duration2; + end = end / duration2 * duration2 + duration2; + } + if (start > end) + throw new RuntimeException("Bad time interval"); + long delta = start - (start / duration2 * duration2); + for (long t = start; t < end; t += duration2) { + m.put(t - delta, new ArrayList()); + // System.err.println("times " + (t - delta) + " " + new + // Date(t-delta)); + } + for (DoubleMetric d : values) { + long tt = (d.getTime() - delta) / duration2 * duration2; + List dd = m.get(tt); + if (dd == null) { + logger.warn("metric outside range " + new Date(tt) + " " + new Date(start) + " " + new Date(end)); + continue; + } + dd.add(d); + } + EList res = new BasicEList(); + int i = 1; + for (long t : SortUtil.sort(m.keySet())) { + if (i++ == m.keySet().size() && m.get(t).size() == 0) + continue; // ignore last timebin if empty. + res.add(aggregateList(path, attr, t, m.get(t), option.getAggregationType())); + } + return res; + + } + + private static DoubleMetric aggregateList(String path, EAttribute attr, long t, List l, + AggregationMetricValueOptionType aggregationType) { + DoubleMetric d = MetricsFactory.eINSTANCE.createDoubleMetric(); + d.setTime(t); + d.setResourceName(path); + d.setMetricName(attr.getName()); + if (l.size() == 0) { + switch (aggregationType) { + case AVERAGE: + d.setValue(0.0); + break; + case COUNT: + d.setValue(0.0); + break; + case SUM: + d.setValue(0.0); + break; + case MAX: + d.setValue(0.0); + break; + case MIN: + d.setValue(0.0); + break; + } + } else { + double v; + switch (aggregationType) { + case MAX: + v = Double.NEGATIVE_INFINITY; + break; + case MIN: + v = Double.POSITIVE_INFINITY; + break; + default: + v = 0.0; + } + for (DoubleMetric dd : l) { + double vv = dd.getValue(); + switch (aggregationType) { + case SUM: + case AVERAGE: + v += vv; + break; + case COUNT: + v++; + break; + case MAX: + if (v < vv) + v = vv; + break; + case MIN: + if (v > vv) + v = vv; + break; + } + } + switch (aggregationType) { + case AVERAGE: + v = v / l.size(); + break; + default: + break; + } + d.setValue(v); + } + return d; + } + + public EList getValuesAll(String path, EList metrics, Long start, Long end, MetricValueOption option, + boolean relativeInterval) { + EList l = new BasicEList(); + // System.err.println("getValuesAll: " + path + " " + metrics + + // " start=" + start + " end=" + end); + for (EObject o : server.findAll(path)) { + for (String m : metrics) { + EStructuralFeature f = o.eClass().getEStructuralFeature(m); + if (!(f instanceof EAttribute)) + continue; + Object a = o.eGet(f); + if (!(a instanceof MetricAttribute)) + continue; + l.addAll(getValues((MetricAttribute) a, (EAttribute) f, start, end, ManagementServer.object2ref(o), option, + relativeInterval)); + } + } + return l; + } + + public void initAttribute(EObject o, String aName) { + MetricStore store = findStore(o); + EAttribute attr = (EAttribute) o.eClass().getEStructuralFeature(aName); + String path = ManagementServer.relativeObject2ref(server.getObject(), o) + "/" + aName; + String aType = attr.getEAttributeType().getName(); + store.getMeasurement(path,new Date()); + store.initAttribute(path, aType); +// System.err.println("XYZ " + path + " " + aType + " " + o.eGet(attr)); + } + + public void setLongMetric(EObject o, String attr, long v, boolean force) { +// System.err.println "XYZ $o $attr ${o[attr]} $v $force" + EStructuralFeature f = o.eClass().getEStructuralFeature(attr); + if (f instanceof EAttribute) { + Object m = o.eGet(f); + if (m == null) { + initAttribute(o,attr); + m = o.eGet(f); + } + if (m instanceof LongMetricAttribute) { + LongMetricAttribute m1 = (LongMetricAttribute) m; + m1.setValue(v,force); + return; + } + } + logger.warn("Unable to setLongMetric" + o.getClass().getName() + "@" + attr); + } + + public void setDateMetric(EObject o, String attr, Date v) { + setDateMetric(o, attr, v, new Date()); + } + public void setDateMetric(EObject o, String attr, Date v, Date when) { +// System.err.println "XYZ $o $attr ${o[attr]} $v $force" + EStructuralFeature f = o.eClass().getEStructuralFeature(attr); + if (f instanceof EAttribute) { + Object m = o.eGet(f); + if (m == null) { + initAttribute(o,attr); + m = o.eGet(f); + } + if (m instanceof DateMetricAttribute) { + DateMetricAttribute m1 = (DateMetricAttribute) m; + m1.add(when, v.getTime()); + return; + } + } + logger.warn("Unable to setDateMetric" + o.getClass().getName() + "@" + attr); + } + + public void addIncreasingULongMetric(EObject o, String attr, long v, boolean force) { +// System.err.println "XYZ $o $attr ${o[attr]} $v $force" + EStructuralFeature f = o.eClass().getEStructuralFeature(attr); + if (f instanceof EAttribute) { + Object m = o.eGet(f); + if (m == null) { + initAttribute(o,attr); + m = o.eGet(f); + } + if (m instanceof IncreasingULongMetricAttribute) { + IncreasingULongMetricAttribute m1 = (IncreasingULongMetricAttribute) m; + m1.increase(v,force); + return; + } + } + logger.warn("Unable to addIncreasingULongMetric" + o.getClass().getName() + "@" + attr); + } + + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricStore.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricStore.java new file mode 100644 index 0000000..3fd1b37 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricStore.java @@ -0,0 +1,288 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.metrics; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.impl.EAnnotationImpl; +import org.json.JSONObject; + +import org.openecomp.ncomp.core.OperationalState; +import org.openecomp.ncomp.core.alerts.Alert; +import org.openecomp.ncomp.core.alerts.AlertContainer; +import org.openecomp.ncomp.core.alerts.ThresholdAlert; +import org.openecomp.ncomp.core.types.metrics.*; +import org.openecomp.ncomp.sirius.manager.*; +import org.openecomp.ncomp.utils.SortUtil; +import org.openecomp.ncomp.utils.journaling.JournalingDateObject; +import org.openecomp.ncomp.utils.journaling.JournalingHashMap; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +import static org.openecomp.ncomp.sirius.manager.ManagementServerUtils.printStackTrace; + +public class MetricStore implements IMetricStore { + public static final Logger logger = Logger.getLogger(MetricStore.class); + JournalingDateObject> metrics; + private EObject o; + private MetricManager manager; + public MetricStore(String dir, EObject o, MetricManager m) { + metrics = new JournalingDateObject>(dir, JournalingHashMap.class); + this.o = o; + this.manager = m; + } + + public void addDoubleValue(String path, Date d, Double v, String aType) { + MetricDailyMeasurement p = getMeasurement(path,d); + initAttribute(path,aType); + p.add(d,v); + checkAlerts(p,d,path,v); + } + + public void addLongValue(String path, Date d, Long v, String aType, boolean isDelta) { + MetricDailyMeasurement p = getMeasurement(path,d); + MetricAttribute a = initAttribute(path,aType); + if (isDelta && p.getLast() != null) { + v += ((LongMetricMeasurement) p.getLast()).v; + } + p.add(d,v); + if (a instanceof DateMetricAttribute) { + v = new Date().getTime() - v; + } + checkAlerts(p,d,path,v); + } + public void addStringValue(String path, Date d, String v, String aType) { + MetricDailyMeasurement p = getMeasurement(path,d); + initAttribute(path,aType); + p.add(d,v); +// checkAlerts(p,d,path,v); + } + + + public void addStringValue(String path, Date d, String v) { + MetricDailyMeasurement p = getMeasurement(path,d); + // need to convert the String to the right kind of value. + MetricAttribute aa = initAttribute(path,null); + if (aa instanceof IncreasingULongMetricAttribute || aa instanceof LongMetricAttribute) { + // convert v to long + long v1 = Long.parseLong(v); + p.add(d,v1); + checkAlerts(p,d,path,v1); + return; + } + if (aa instanceof DoubleMetricAttribute) { + // convert v to double + double v1 = Double.parseDouble(v); + p.add(d,v1); + checkAlerts(p,d,path,v1); + return; + } + if (aa == null) { + logger.warn("unable to find measurement attribute for path: " + path); + return; + } + throw new RuntimeException("Should not get here"); + } + + private void checkAlerts(MetricDailyMeasurement p, Date d, String path, double v) { + if (!d.equals(p.getLast().d)) return; + if (o == null) throw new RuntimeException("Cannot check Alerts without EObject"); + Subject s = manager.server.findAndCreateSubject(o,path); + if (s == null || s.o == null || s.attr == null) return; + if (s.o instanceof AlertContainer) { + MetricAttribute aa = (MetricAttribute) s.o.eGet(s.attr); + AlertContainer alerts = (AlertContainer) s.o; + for (Alert a : alerts.getAlerts()) { + if (ManagementServer.getOperationalState(a) == OperationalState.SUSPENDED) continue; + try { + if (a instanceof ThresholdAlert) { + ThresholdAlert a1 = (ThresholdAlert) a; + if (a1.getDuration() != null) { + v = MetricUtils.getAverage(aa,a1.getDuration()); + } + if (!s.attr.getName().equals(a1.getMetricName())) continue; + if (a1.getLowerBound() != null && v < a1.getLowerBound()) { + String path2 = ManagementServer.object2ref(s.o) + path + "/" + a1.getMetricName(); + logger.warn("Metric Alert: path={" + path2 +"} sev={" + a1.getSeverity() +"} " + a1.getMetricName() + " is too low " + v + " < " + a1.getUpperBound()); + } + if (a1.getUpperBound() != null && v > a1.getUpperBound()) { + String path2 = ManagementServer.object2ref(s.o); + logger.warn("Metric Alert: path={" + path2 +"} sev={" + a1.getSeverity() +"} " + a1.getMetricName() + " is too high " + v + " > " + a1.getUpperBound()); + } + return; + } + logger.warn("unknown alert class: " + a.eClass().getName()); + } catch (Exception e) { + a.setOperationalState(OperationalState.SUSPENDED); + logger.error("error in alert (now disabled): " + e); + } + } + } + + } + protected MetricAttribute initAttribute(String path, String aType) { + if (o == null) throw new RuntimeException("Cannot init attribute without EObject"); + Subject s; + try { + s = manager.server.findAndCreateSubject(o,path); + } catch (Exception e) { + logger.warn("Unable to create object path={" + path + "} " + e); + System.err.println("Unable to create object for: " + path + " " + e); + printStackTrace(e); + return null; + } + if (s == null || s.o == null || s.attr == null) return null; + if (s.o.eGet(s.attr) != null) return (MetricAttribute) s.o.eGet(s.attr); + String eName = (aType == null) ? s.attr.getEType().getName() : aType; + MetricAttribute aa = null; + if (eName.equals("IncreasingULongMetricAttribute")) { + aa = new IncreasingULongMetricAttribute(); + } + else if (eName.equals("LongMetricAttribute")) { + aa = new LongMetricAttribute(); + } + else if (eName.equals("DoubleMetricAttribute")) { + aa = new DoubleMetricAttribute(); + } + else if (eName.equals("DateMetricAttribute")) { + aa = new DateMetricAttribute(); + } + else if (eName.equals("StringMetricAttribute")) { + aa = new StringMetricAttribute(); + } + else throw new RuntimeException("Unknown type: " + eName + " for path: " + path); +// System.err.println("TYPES:" + ManagementServer.object2ref(s.o)+ " " + s.attr.getEType().getName() + " " + aa); + s.o.eSet(s.attr,aa); + aa.setup(this, path); + return aa; + } + + MetricDailyMeasurement getMeasurement(String path, Date d) { + JournalingHashMap m = metrics.get(d); + MetricDailyMeasurement p = m.get(path); + if (p == null) { + p = m.newKey(path, MetricDailyMeasurement.class); + } + return p; + } + + public MetricMeasurement getLast(String path) { + Date now = new Date(); + MetricDailyMeasurement p = metrics.get(now).get(path); + if (p != null) { + MetricMeasurement m = p.getLast(); + if (m != null) return m; + } + now.setTime(now.getTime()-24*3600000); + p = metrics.get(now).get(path); + if (p != null) { + MetricMeasurement m = p.getLast(); + if (m != null) return m; + } + return null; + } + public MetricMeasurement getLast2(String path) { + Date now = new Date(); + MetricDailyMeasurement p = metrics.get(now).get(path); + if (p != null) { + MetricMeasurement m = p.getLast(); + if (m != null) return p.getLast2(); + } + now.setTime(now.getTime()-24*3600000); + p = metrics.get(now).get(path); + if (p != null) { + MetricMeasurement m = p.getLast(); + if (m != null) return p.getLast2(); + } + return null; + } + + private Comparator comp = new Comparator() { + @Override + public int compare(MetricMeasurement t1, MetricMeasurement t2) { + return ((Long)t1.d.getTime()).compareTo(t2.d.getTime()); + } + }; + + public List getValues(String path, Date start, Date end) { + List res = new ArrayList(); + for (Date d: DateUtils.dateRange(start, end, DateUtils.stringToDuration("1day"))) { + MetricDailyMeasurement p = metrics.get(d).get(path); + if (p == null) continue; + for (MetricMeasurement m : p.l) { + if (m.d.before(start) || m.d.after(end)) continue; + res.add(m); + } + } + return SortUtil.sort(res, comp); + } + + public void save() { + metrics.save(); + } + long lastUpdate = 0; + public boolean save(long i) { + long now = new Date().getTime(); + if (lastUpdate + i < now) { + save(); + lastUpdate = new Date().getTime(); + return true; + } + return false; + } + public void close() { + metrics.close(); + } + + public JSONObject toJson() { + JSONObject json = new JSONObject(); + json.put("metrics", metrics.toJson()); + return json ; + } + + public void initStore() { + Date yesterday = DateUtils.dateFromString("-1day"); + Date today = new Date(); + for (Date d: DateUtils.dateRange(yesterday , today, DateUtils.stringToDuration("1day"))) { + List l = new ArrayList(metrics.get(d).keySet()); + for (String path: l) { + // TODO the type need to be persistent. + try { + if (o != null) initAttribute(path,null); + } catch (Exception e) { + logger.warn("unable to init: " + path); + printStackTrace(e); + } + } + } + } + + public EObject getObject() { + return o; + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricTest.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricTest.java new file mode 100644 index 0000000..656de89 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricTest.java @@ -0,0 +1,116 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.metrics; + +import java.io.File; +import java.util.List; + +import junit.framework.TestCase; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.DoubleMetricMeasurement; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricMeasurement; +import org.openecomp.ncomp.webservice.utils.DateUtils; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class MetricTest extends TestCase { + + public void test_case1() { + String dir = "data/metrics/test1"; + File f = new File(dir); + if (f.exists()) FileUtils.deleteDirectory(f); + MetricStore store = new MetricStore(dir,null,null); + DoubleMetricAttribute d = new DoubleMetricAttribute(); + d.setup(store, "foobar"); + d.add(DateUtils.dateFromString("-10min"), 1.0); + d.add(DateUtils.dateFromString("-8min"), 13.0); + d.add(DateUtils.dateFromString("-6min"), 12.0); + d.add(DateUtils.dateFromString("-13min"), 11.0); + assertEquals(12.0,d.getValue()); + List l = d.getValues(DateUtils.dateFromString("-1hour"),DateUtils.dateFromString("-0min")); + assertEquals(11.0,l.get(0).v); + assertEquals(1.0,l.get(1).v); + assertEquals(12.0,l.get(3).v); + } + + public void test_case_Long() { + String dir = "data/metrics/test2"; + File f = new File(dir); + if (f.exists()) FileUtils.deleteDirectory(f); + MetricStore store = new MetricStore(dir,null,null); + LongMetricAttribute d = new LongMetricAttribute(); + d.setup(store, "foobar"); + d.add(DateUtils.dateFromString("-10min"), 1L); + d.add(DateUtils.dateFromString("-8min"), 13L); + d.add(DateUtils.dateFromString("-6min"), 12L); + d.add(DateUtils.dateFromString("-13min"), 11L); + assertEquals((Long) 12L,d.getValue()); + List l = d.getValues(DateUtils.dateFromString("-1hour"),DateUtils.dateFromString("-0min")); + assertEquals(11L,l.get(0).v); + assertEquals(1L,l.get(1).v); + assertEquals(12L,l.get(3).v); + } + public void test_case_IncreasingULong() { + String dir = "data/metrics/test3"; + File f = new File(dir); + if (f.exists()) FileUtils.deleteDirectory(f); + MetricStore store = new MetricStore(dir,null,null); + IncreasingULongMetricAttribute d = new IncreasingULongMetricAttribute(); + d.setup(store, "foobar"); + d.add(DateUtils.dateFromString("-10min"), 1L); + d.add(DateUtils.dateFromString("-8min"), 13L); + d.add(DateUtils.dateFromString("-6min"), 12L); + d.add(DateUtils.dateFromString("-13min"), 11L); + List l = d.getDeltaValues(DateUtils.dateFromString("-1hour"),DateUtils.dateFromString("-0min")); + assertEquals(-10L,l.get(0).v); + assertEquals(12L,l.get(1).v); + assertEquals(-1L,l.get(2).v); + assertEquals((-1L),d.getValue()); + } + + public void test_case_IncreasingULong2() { + String dir = "data/metrics/test4"; + File f = new File(dir); + if (f.exists()) FileUtils.deleteDirectory(f); + MetricStore store = new MetricStore(dir,null,null); + IncreasingULongMetricAttribute d = new IncreasingULongMetricAttribute(); + d.setup(store, "foobar"); + d.add(DateUtils.dateFromString("-13min"), Long.MAX_VALUE - 11L); + d.add(DateUtils.dateFromString("-10min"), Long.MAX_VALUE); + d.add(DateUtils.dateFromString("-8min"), Long.MIN_VALUE); + d.add(DateUtils.dateFromString("-6min"), Long.MIN_VALUE + 12L); + List l = d.getDeltaValues(DateUtils.dateFromString("-1hour"),DateUtils.dateFromString("-0min")); + assertEquals(11L,l.get(0).v); + assertEquals(1L,l.get(1).v); + assertEquals(12L,l.get(2).v); + assertEquals(3, l.size()); + assertEquals((12L),d.getValue()); + store.close(); + MetricStore store2 = new MetricStore(dir,null,null); + IncreasingULongMetricAttribute d2 = new IncreasingULongMetricAttribute(); + d2.setup(store2, "foobar"); + assertEquals((12L),d2.getValue()); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricUtils.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricUtils.java new file mode 100644 index 0000000..08d3bf5 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/metrics/MetricUtils.java @@ -0,0 +1,45 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.metrics; + +import java.util.Date; +import java.util.List; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricMeasurement; +import org.openecomp.ncomp.core.types.metrics.MetricAttribute; +import org.openecomp.ncomp.webservice.utils.DateUtils; + +public class MetricUtils { + + public static double getAverage(MetricAttribute aa, String duration) { + Date now = new Date(); + Date past = new Date(now.getTime()-DateUtils.stringToDuration(duration)); + List l = aa.getValuesDouble(past, now); + if (l.size() == 0) return 0.0; + double sum = 0.0; + for (DoubleMetricMeasurement m : l) { + sum += m.v; + } + return sum/l.size(); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/MD5Checksum.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/MD5Checksum.java new file mode 100644 index 0000000..43ee90b --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/MD5Checksum.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.properties; + +import java.io.FileInputStream; +import java.io.InputStream; +import java.security.MessageDigest; +import java.util.Date; + +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; + +public class MD5Checksum { + + public static String createFileChecksum(String filename) { + try { + InputStream fis = null; + MessageDigest complete = null; + try { + fis = new FileInputStream(filename); + byte[] buffer = new byte[1024]; + complete = MessageDigest.getInstance("MD5"); + int numRead = 0; + while (numRead != -1) { + numRead = fis.read(buffer); + if (numRead > 0) { + complete.update(buffer, 0, numRead); + } + } + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + } finally { + if (fis != null) + fis.close(); + } + return bytes2hex(complete.digest()); + } catch (Exception e) { + return random(); + } + } + + public static String createChecksum(String s) { + try { + MessageDigest complete = MessageDigest.getInstance("MD5"); + complete.update(s.getBytes()); + return bytes2hex(complete.digest()); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + return random(); + } + } + + public static String createChecksum(byte[] bytes) { + try { + MessageDigest complete = MessageDigest.getInstance("MD5"); + complete.update(bytes); + return bytes2hex(complete.digest()); + } catch (Exception e) { + ManagementServerUtils.printStackTrace(e); + return random(); + } + } + + // a byte array to a HEX string + private static String bytes2hex(byte[] b) throws Exception { + String result = ""; + for (int i = 0; i < b.length; i++) { + result += Integer.toString((b[i] & 0xff) + 0x100, 16).substring(1); + } + return result; + } + + private synchronized static String random() { + long t = new Date().getTime(); + try { + Thread.sleep(1); + } catch (InterruptedException e) { + ManagementServerUtils.printStackTrace(e); + } + return Long.toString(t); + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/PropertyManager.java b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/PropertyManager.java new file mode 100644 index 0000000..f8d7361 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/org/openecomp/ncomp/sirius/manager/properties/PropertyManager.java @@ -0,0 +1,114 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.sirius.manager.properties; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.Date; +import java.util.HashMap; + +import org.apache.log4j.Logger; +import org.eclipse.emf.common.util.BasicEList; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.openecomp.ncomp.sirius.manager.ManagementServer; +import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; +import org.openecomp.ncomp.webservice.utils.FileUtils; + +public class PropertyManager { + public static final Logger logger = Logger.getLogger(PropertyManager.class); + + private Object propDir; + private ManagementServer server; + private HashMap checksums = new HashMap(); + + public PropertyManager(ManagementServer managementServer) { + server = managementServer; + propDir = server.getProps().getProperty("properties.dir", "data/properties"); + } + + public void updatePropertries(EObject o, EList props) { + for (AbstractProperty ap : props) { + if (ap instanceof ModuleProperty) { + ModuleProperty mp = (ModuleProperty) ap; + updateModules(o, mp); + continue; + } + if (ap instanceof Property) { + Property p = (Property) ap; + Date now = new Date(); + if (!p.getName().startsWith("/")) + p.setName("/" + p.getName()); + String file = propDir + ManagementServer.object2ref(o) + p.getName(); + if (!checksums.containsKey(file)) { + checksums.put(file, MD5Checksum.createFileChecksum(file)); + } + String checksum = MD5Checksum.createChecksum(p.getValue()); + if (checksum.equals(checksums.get(file))) + continue; + String file1 = file + "." + now.getTime(); + writeFile(file1, p.getValue()); + File f1 = writeFile(file1 + ".1", p.getValue()); + File f2 = new File(file); + f1.renameTo(f2); + logger.info("Wrote " + file); + } + } + } + + private File writeFile(String file1, String value) { + File f = new File(file1); + f.getParentFile().mkdirs(); + OutputStreamWriter w = FileUtils.filename2writer(file1); + try { + w.append(value); + w.close(); + } catch (IOException e) { + logger.warn("Unable tor write file: " + file1 + " " + e); + ManagementServerUtils.printStackTrace(e); + } + return f; + } + + private void updateModules(EObject o, ModuleProperty mp) { + if (o instanceof ModuleContainer) { + ModuleContainer c = (ModuleContainer) o; + EList l = new BasicEList(); + boolean found = false; + for (Module m : c.getModules()) { + if (m.getName().equals(mp.getName())) { + found = true; + l.add(EcoreUtil.copy(mp)); + } + else + l.add(EcoreUtil.copy(m)); + } + if (!found) l.add(EcoreUtil.copy(mp)); + c.getModules().clear(); + c.getModules().addAll(l); + } + } + +} diff --git a/ncomp-sirius-manager-server/src/main/java/swagger-api.json b/ncomp-sirius-manager-server/src/main/java/swagger-api.json new file mode 100644 index 0000000..fc58e92 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/java/swagger-api.json @@ -0,0 +1,19 @@ +{ + "swagger": "2.0", + "host": "localhost:9998", + "basePath": "", + "schemes": ["http"], + "info": { + "description": "TBD", + "version": "0.1.0", + "title": "Sirius Server", + "termsOfService": "TBD", + "contact": {"email": "TBD"}, + "license": { + "name": "TBD", + "url": "http://TDB" + } + }, + "paths": { + } +} diff --git a/ncomp-sirius-manager-server/src/main/resources/swagger-api.json b/ncomp-sirius-manager-server/src/main/resources/swagger-api.json new file mode 100644 index 0000000..c3e4d99 --- /dev/null +++ b/ncomp-sirius-manager-server/src/main/resources/swagger-api.json @@ -0,0 +1,17 @@ +{ + "swagger": "2.0", + "host": "????", + "basePath": "", + "schemes": ["http"], + "info": { + "description": "TBD", + "version": "0.1.0", + "title": "Sirius Server", + "termsOfService": "TBD", + "contact": {"email": "TBD"}, + "license": { + "name": "TBD", + "url": "http://TDB" + } + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c0490ce --- /dev/null +++ b/pom.xml @@ -0,0 +1,90 @@ + + 4.0.0 + org.openecomp.ncomp.sirius.manager + ncomp-sirius-manager + pom + + + ncomp-sirius-manager-base + ncomp-sirius-manager-drools + ncomp-sirius-manager-model + ncomp-sirius-manager-generator + + ncomp-sirius-manager-console + + ncomp-sirius-manager-server + ncomp-sirius-manager-agent-model + ncomp-sirius-manager-agent-server + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + 3.1 + + + + + + + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + + -- cgit 1.2.3-korg