mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 08:05:24 +02:00
Initial commit of org.eclipse.tm.discovery.model
This commit is contained in:
parent
2caf3b1e8a
commit
f260a66414
30 changed files with 3485 additions and 0 deletions
7
discovery/org.eclipse.tm.discovery.model/.classpath
Normal file
7
discovery/org.eclipse.tm.discovery.model/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
28
discovery/org.eclipse.tm.discovery.model/.project
Normal file
28
discovery/org.eclipse.tm.discovery.model/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.tm.discovery.model</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,15 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.tm.discovery.model;singleton:=true
|
||||
Bundle-Version: 1.0.0
|
||||
Bundle-Activator: org.eclipse.tm.discovery.model.Activator
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
org.eclipse.emf.ecore;bundle-version="2.2.0",
|
||||
org.eclipse.emf.ecore.xmi;bundle-version="2.2.0"
|
||||
Eclipse-LazyStart: true
|
||||
Export-Package: org.eclipse.tm.discovery.model,
|
||||
org.eclipse.tm.discovery.model.impl,
|
||||
org.eclipse.tm.discovery.model.util
|
29
discovery/org.eclipse.tm.discovery.model/about.html
Normal file
29
discovery/org.eclipse.tm.discovery.model/about.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html><head><title>About</title>
|
||||
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head><body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>July 27, 2006</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in
|
||||
("Content"). Unless otherwise indicated below, the Content is provided
|
||||
to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is
|
||||
available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse
|
||||
Foundation, the Content is being redistributed by another party
|
||||
("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the
|
||||
Redistributor's license that was provided with the Content. If no such
|
||||
license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any
|
||||
source code in the Content and such source code may be obtained at http://www.eclipse.org.</p>
|
||||
|
||||
|
||||
</body></html>
|
|
@ -0,0 +1,6 @@
|
|||
source.. = src/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
src/,\
|
||||
about.html
|
||||
src.includes = about.html
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<genmodel:GenModel xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.tm.discovery.model/src"
|
||||
modelPluginID="org.eclipse.tm.discovery.model" modelName="DiscoveryModel" importerID="org.eclipse.xsd.ecore.importer">
|
||||
<foreignModel>discoveryModel.xsd</foreignModel>
|
||||
<genPackages prefix="Model" basePackage="org.eclipse.tm.discovery" resource="XML"
|
||||
disposableProviderFactory="true" ecorePackage="model.ecore#/">
|
||||
<genClasses ecoreClass="model.ecore#//Device">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Device/serviceType"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Device/address"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Device/name"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="model.ecore#//Network">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Network/device"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="model.ecore#//Pair">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Pair/key"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Pair/value"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="model.ecore#//Service">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//Service/pair"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//Service/name"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="model.ecore#//ServiceType">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model.ecore#//ServiceType/service"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model.ecore#//ServiceType/name"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
This program and the accompanying materials are made available under the terms
|
||||
of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
available at http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
Contributors:
|
||||
Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
-->
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.eclipse.org/tm/discovery/model"
|
||||
xmlns:discovery="http://www.eclipse.org/tm/discovery/model">
|
||||
|
||||
<xs:complexType name="Network">
|
||||
<xs:sequence>
|
||||
<xs:element name="Device" type="discovery:Device" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="Device">
|
||||
<xs:sequence>
|
||||
<xs:element name="ServiceType" type="discovery:ServiceType" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="address" type="xs:string" />
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="ServiceType">
|
||||
<xs:sequence>
|
||||
<xs:element name="Service" type="discovery:Service" minOccurs="1" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="Service">
|
||||
<xs:sequence minOccurs="1" maxOccurs="1">
|
||||
<xs:element name="Pair" type="discovery:Pair" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xs:sequence>
|
||||
<xs:attribute name="name" type="xs:string" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="Pair">
|
||||
<xs:attribute name="key" type="xs:string" />
|
||||
<xs:attribute name="value" type="xs:string" />
|
||||
</xs:complexType>
|
||||
|
||||
</xs:schema>
|
101
discovery/org.eclipse.tm.discovery.model/ecore/model.ecore
Normal file
101
discovery/org.eclipse.tm.discovery.model/ecore/model.ecore
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ecore:EPackage xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="model"
|
||||
nsURI="http://www.eclipse.org/tm/discovery/model" nsPrefix="model">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Device">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="name" value="Device"/>
|
||||
<details key="kind" value="elementOnly"/>
|
||||
</eAnnotations>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="serviceType" lowerBound="1"
|
||||
upperBound="-1" eType="#//ServiceType" containment="true" resolveProxies="false">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="element"/>
|
||||
<details key="name" value="ServiceType"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="address" unique="false"
|
||||
eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="address"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="name"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Network">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="name" value="Network"/>
|
||||
<details key="kind" value="elementOnly"/>
|
||||
</eAnnotations>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="device" lowerBound="1"
|
||||
upperBound="-1" eType="#//Device" containment="true" resolveProxies="false">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="element"/>
|
||||
<details key="name" value="Device"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Pair">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="name" value="Pair"/>
|
||||
<details key="kind" value="empty"/>
|
||||
</eAnnotations>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="key"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="value"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Service">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="name" value="Service"/>
|
||||
<details key="kind" value="elementOnly"/>
|
||||
</eAnnotations>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="pair" upperBound="-1" eType="#//Pair"
|
||||
containment="true" resolveProxies="false">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="element"/>
|
||||
<details key="name" value="Pair"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="name"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="ServiceType">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="name" value="ServiceType"/>
|
||||
<details key="kind" value="elementOnly"/>
|
||||
</eAnnotations>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="service" lowerBound="1"
|
||||
upperBound="-1" eType="#//Service" containment="true" resolveProxies="false">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="element"/>
|
||||
<details key="name" value="Service"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
<details key="kind" value="attribute"/>
|
||||
<details key="name" value="name"/>
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
26
discovery/org.eclipse.tm.discovery.model/plugin.properties
Normal file
26
discovery/org.eclipse.tm.discovery.model/plugin.properties
Normal file
|
@ -0,0 +1,26 @@
|
|||
##################################################################################
|
||||
# Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
# This program and the accompanying materials are made available under the terms
|
||||
# of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
# available at http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
##################################################################################
|
||||
|
||||
|
||||
# ====================================================================
|
||||
# To code developer:
|
||||
# Do NOT change the properties between this line and the
|
||||
# "%%% END OF TRANSLATED PROPERTIES %%%" line.
|
||||
# Make a new property name, append to the end of the file and change
|
||||
# the code to use the new property.
|
||||
# ====================================================================
|
||||
|
||||
# ====================================================================
|
||||
# %%% END OF TRANSLATED PROPERTIES %%%
|
||||
# ====================================================================
|
||||
|
||||
pluginName = Service Discovery Model
|
||||
providerName = Symbian
|
||||
|
28
discovery/org.eclipse.tm.discovery.model/plugin.xml
Normal file
28
discovery/org.eclipse.tm.discovery.model/plugin.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.0"?>
|
||||
<!--
|
||||
Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
This program and the accompanying materials are made available under the terms
|
||||
of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
available at http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
Contributors:
|
||||
Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
|
||||
<extension point="org.eclipse.emf.ecore.generated_package">
|
||||
<package
|
||||
uri = "http://www.eclipse.org/tm/discovery"
|
||||
class = "org.eclipse.tm.discovery.model.DiscoveryPackage" />
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.emf.ecore.extension_parser">
|
||||
<parser
|
||||
type="discovery"
|
||||
class="org.eclipse.tm.discovery.model.util.DiscoveryResourceFactoryImpl" />
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "org.eclipse.tm.discovery";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* A representation of the model object '<em><b>Device</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Device#getServiceType <em>Service Type</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getDevice()
|
||||
* @model extendedMetaData="name='Device' kind='elementOnly'"
|
||||
* @generated
|
||||
*/
|
||||
public interface Device extends EObject {
|
||||
/**
|
||||
* Returns the value of the '<em><b>Service Type</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.tm.discovery.model.ServiceType}.
|
||||
*
|
||||
* @return the value of the '<em>Service Type</em>' containment reference list.
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_ServiceType()
|
||||
* @model type="org.eclipse.tm.discovery.model.ServiceType" containment="true" required="true"
|
||||
* extendedMetaData="kind='element' name='ServiceType'"
|
||||
* @generated
|
||||
*/
|
||||
EList getServiceType();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Address</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Address</em>' attribute.
|
||||
* @see #setAddress(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_Address()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='address'"
|
||||
* @generated
|
||||
*/
|
||||
String getAddress();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Address</em>' attribute.
|
||||
* @see #getAddress()
|
||||
* @generated
|
||||
*/
|
||||
void setAddress(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getDevice_Name()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='name'"
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // Device
|
|
@ -0,0 +1,79 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.ecore.EFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* The <b>Factory</b> for the model.
|
||||
* It provides a create method for each non-abstract class of the model.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage
|
||||
* @generated
|
||||
*/
|
||||
public interface ModelFactory extends EFactory {
|
||||
/**
|
||||
* The singleton instance of the factory.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
ModelFactory eINSTANCE = org.eclipse.tm.discovery.model.impl.ModelFactoryImpl.init();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Device</em>'.
|
||||
*
|
||||
* @return a new object of class '<em>Device</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Device createDevice();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Network</em>'.
|
||||
*
|
||||
* @return a new object of class '<em>Network</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Network createNetwork();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Pair</em>'.
|
||||
*
|
||||
* @return a new object of class '<em>Pair</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Pair createPair();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Service</em>'.
|
||||
*
|
||||
* @return a new object of class '<em>Service</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Service createService();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Service Type</em>'.
|
||||
*
|
||||
* @return a new object of class '<em>Service Type</em>'.
|
||||
* @generated
|
||||
*/
|
||||
ServiceType createServiceType();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
*
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
ModelPackage getModelPackage();
|
||||
|
||||
} //ModelFactory
|
|
@ -0,0 +1,510 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
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 <b>Package</b> for the model.
|
||||
* It contains accessors for the meta objects to represent
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelFactory
|
||||
* @model kind="package"
|
||||
* @generated
|
||||
*/
|
||||
public interface ModelPackage extends EPackage {
|
||||
/**
|
||||
* The package name.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
String eNAME = "model";
|
||||
|
||||
/**
|
||||
* The package namespace URI.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
String eNS_URI = "http://www.eclipse.org/tm/discovery/model";
|
||||
|
||||
/**
|
||||
* The package namespace name.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
String eNS_PREFIX = "model";
|
||||
|
||||
/**
|
||||
* The singleton instance of the package.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
ModelPackage eINSTANCE = org.eclipse.tm.discovery.model.impl.ModelPackageImpl.init();
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.DeviceImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
|
||||
* @generated
|
||||
*/
|
||||
int DEVICE = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Service Type</b></em>' containment reference list.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int DEVICE__SERVICE_TYPE = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Address</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int DEVICE__ADDRESS = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int DEVICE__NAME = 2;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Device</em>' class.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int DEVICE_FEATURE_COUNT = 3;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.NetworkImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getNetwork()
|
||||
* @generated
|
||||
*/
|
||||
int NETWORK = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Device</b></em>' containment reference list.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int NETWORK__DEVICE = 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Network</em>' class.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int NETWORK_FEATURE_COUNT = 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.PairImpl <em>Pair</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.PairImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getPair()
|
||||
* @generated
|
||||
*/
|
||||
int PAIR = 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Key</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PAIR__KEY = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Value</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PAIR__VALUE = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Pair</em>' class.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PAIR_FEATURE_COUNT = 2;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.ServiceImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getService()
|
||||
* @generated
|
||||
*/
|
||||
int SERVICE = 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Pair</b></em>' containment reference list.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE__PAIR = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE__NAME = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Service</em>' class.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE_FEATURE_COUNT = 2;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.ServiceTypeImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getServiceType()
|
||||
* @generated
|
||||
*/
|
||||
int SERVICE_TYPE = 4;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Service</b></em>' containment reference list.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE_TYPE__SERVICE = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE_TYPE__NAME = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Service Type</em>' class.
|
||||
*
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int SERVICE_TYPE_FEATURE_COUNT = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Device <em>Device</em>}'.
|
||||
*
|
||||
* @return the meta object for class '<em>Device</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Device
|
||||
* @generated
|
||||
*/
|
||||
EClass getDevice();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Device#getServiceType <em>Service Type</em>}'.
|
||||
*
|
||||
* @return the meta object for the containment reference list '<em>Service Type</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Device#getServiceType()
|
||||
* @see #getDevice()
|
||||
* @generated
|
||||
*/
|
||||
EReference getDevice_ServiceType();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Device#getAddress <em>Address</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Address</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Device#getAddress()
|
||||
* @see #getDevice()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getDevice_Address();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Device#getName <em>Name</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Name</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Device#getName()
|
||||
* @see #getDevice()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getDevice_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Network <em>Network</em>}'.
|
||||
*
|
||||
* @return the meta object for class '<em>Network</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Network
|
||||
* @generated
|
||||
*/
|
||||
EClass getNetwork();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Network#getDevice <em>Device</em>}'.
|
||||
*
|
||||
* @return the meta object for the containment reference list '<em>Device</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Network#getDevice()
|
||||
* @see #getNetwork()
|
||||
* @generated
|
||||
*/
|
||||
EReference getNetwork_Device();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Pair <em>Pair</em>}'.
|
||||
*
|
||||
* @return the meta object for class '<em>Pair</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Pair
|
||||
* @generated
|
||||
*/
|
||||
EClass getPair();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Key</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Pair#getKey()
|
||||
* @see #getPair()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getPair_Key();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Value</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Pair#getValue()
|
||||
* @see #getPair()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getPair_Value();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.tm.discovery.model.Service <em>Service</em>}'.
|
||||
*
|
||||
* @return the meta object for class '<em>Service</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Service
|
||||
* @generated
|
||||
*/
|
||||
EClass getService();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.Service#getPair <em>Pair</em>}'.
|
||||
*
|
||||
* @return the meta object for the containment reference list '<em>Pair</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Service#getPair()
|
||||
* @see #getService()
|
||||
* @generated
|
||||
*/
|
||||
EReference getService_Pair();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Name</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.Service#getName()
|
||||
* @see #getService()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getService_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.tm.discovery.model.ServiceType <em>Service Type</em>}'.
|
||||
*
|
||||
* @return the meta object for class '<em>Service Type</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.ServiceType
|
||||
* @generated
|
||||
*/
|
||||
EClass getServiceType();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.eclipse.tm.discovery.model.ServiceType#getService <em>Service</em>}'.
|
||||
*
|
||||
* @return the meta object for the containment reference list '<em>Service</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.ServiceType#getService()
|
||||
* @see #getServiceType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getServiceType_Service();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}'.
|
||||
*
|
||||
* @return the meta object for the attribute '<em>Name</em>'.
|
||||
* @see org.eclipse.tm.discovery.model.ServiceType#getName()
|
||||
* @see #getServiceType()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getServiceType_Name();
|
||||
|
||||
/**
|
||||
* 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
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
interface Literals {
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.DeviceImpl <em>Device</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.DeviceImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getDevice()
|
||||
* @generated
|
||||
*/
|
||||
EClass DEVICE = eINSTANCE.getDevice();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Service Type</b></em>' containment reference list feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EReference DEVICE__SERVICE_TYPE = eINSTANCE.getDevice_ServiceType();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Address</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute DEVICE__ADDRESS = eINSTANCE.getDevice_Address();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute DEVICE__NAME = eINSTANCE.getDevice_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.NetworkImpl <em>Network</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.NetworkImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getNetwork()
|
||||
* @generated
|
||||
*/
|
||||
EClass NETWORK = eINSTANCE.getNetwork();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Device</b></em>' containment reference list feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EReference NETWORK__DEVICE = eINSTANCE.getNetwork_Device();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.PairImpl <em>Pair</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.PairImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getPair()
|
||||
* @generated
|
||||
*/
|
||||
EClass PAIR = eINSTANCE.getPair();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Key</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute PAIR__KEY = eINSTANCE.getPair_Key();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Value</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute PAIR__VALUE = eINSTANCE.getPair_Value();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.ServiceImpl <em>Service</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.ServiceImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getService()
|
||||
* @generated
|
||||
*/
|
||||
EClass SERVICE = eINSTANCE.getService();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Pair</b></em>' containment reference list feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EReference SERVICE__PAIR = eINSTANCE.getService_Pair();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute SERVICE__NAME = eINSTANCE.getService_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl <em>Service Type</em>}' class.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.impl.ServiceTypeImpl
|
||||
* @see org.eclipse.tm.discovery.model.impl.ModelPackageImpl#getServiceType()
|
||||
* @generated
|
||||
*/
|
||||
EClass SERVICE_TYPE = eINSTANCE.getServiceType();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Service</b></em>' containment reference list feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EReference SERVICE_TYPE__SERVICE = eINSTANCE.getServiceType_Service();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
EAttribute SERVICE_TYPE__NAME = eINSTANCE.getServiceType_Name();
|
||||
|
||||
}
|
||||
|
||||
} //ModelPackage
|
|
@ -0,0 +1,46 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* A representation of the model object '<em><b>Network</b></em>'.
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Network#getDevice <em>Device</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getNetwork()
|
||||
* @model extendedMetaData="name='Network' kind='elementOnly'"
|
||||
* @generated
|
||||
*/
|
||||
public interface Network extends EObject {
|
||||
/**
|
||||
* Returns the value of the '<em><b>Device</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.tm.discovery.model.Device}.
|
||||
*
|
||||
* @return the value of the '<em>Device</em>' containment reference list.
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getNetwork_Device()
|
||||
* @model type="org.eclipse.tm.discovery.model.Device" containment="true" required="true"
|
||||
* extendedMetaData="kind='element' name='Device'"
|
||||
* @generated
|
||||
*/
|
||||
EList getDevice();
|
||||
|
||||
} // Network
|
|
@ -0,0 +1,75 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* A representation of the model object '<em><b>Pair</b></em>'.
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getPair()
|
||||
* @model extendedMetaData="name='Pair' kind='empty'"
|
||||
* @generated
|
||||
*/
|
||||
public interface Pair extends EObject {
|
||||
/**
|
||||
* Returns the value of the '<em><b>Key</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Key</em>' attribute.
|
||||
* @see #setKey(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getPair_Key()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='key'"
|
||||
* @generated
|
||||
*/
|
||||
String getKey();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.Pair#getKey <em>Key</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Key</em>' attribute.
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
*/
|
||||
void setKey(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getPair_Value()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='value'"
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.Pair#getValue <em>Value</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
|
||||
} // Pair
|
|
@ -0,0 +1,68 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* A representation of the model object '<em><b>Service</b></em>'.
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Service#getPair <em>Pair</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getService()
|
||||
* @model extendedMetaData="name='Service' kind='elementOnly'"
|
||||
* @generated
|
||||
*/
|
||||
public interface Service extends EObject {
|
||||
/**
|
||||
* Returns the value of the '<em><b>Pair</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.tm.discovery.model.Pair}.
|
||||
*
|
||||
* @return the value of the '<em>Pair</em>' containment reference list.
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getService_Pair()
|
||||
* @model type="org.eclipse.tm.discovery.model.Pair" containment="true"
|
||||
* extendedMetaData="kind='element' name='Pair'"
|
||||
* @generated
|
||||
*/
|
||||
EList getPair();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getService_Name()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='name'"
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.Service#getName <em>Name</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // Service
|
|
@ -0,0 +1,68 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* A representation of the model object '<em><b>Service Type</b></em>'.
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.ServiceType#getService <em>Service</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType()
|
||||
* @model extendedMetaData="name='ServiceType' kind='elementOnly'"
|
||||
* @generated
|
||||
*/
|
||||
public interface ServiceType extends EObject {
|
||||
/**
|
||||
* Returns the value of the '<em><b>Service</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.tm.discovery.model.Service}.
|
||||
*
|
||||
* @return the value of the '<em>Service</em>' containment reference list.
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType_Service()
|
||||
* @model type="org.eclipse.tm.discovery.model.Service" containment="true" required="true"
|
||||
* extendedMetaData="kind='element' name='Service'"
|
||||
* @generated
|
||||
*/
|
||||
EList getService();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
*
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage#getServiceType_Name()
|
||||
* @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String"
|
||||
* extendedMetaData="kind='attribute' name='name'"
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.tm.discovery.model.ServiceType#getName <em>Name</em>}' attribute.
|
||||
*
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // ServiceType
|
|
@ -0,0 +1,258 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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.EObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.tm.discovery.model.Device;
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.ServiceType;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model object '<em><b>Device</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getServiceType <em>Service Type</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getAddress <em>Address</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.DeviceImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class DeviceImpl extends EObjectImpl implements Device {
|
||||
/**
|
||||
* The cached value of the '{@link #getServiceType() <em>Service Type</em>}' containment reference list.
|
||||
*
|
||||
* @see #getServiceType()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList serviceType = null;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
|
||||
*
|
||||
* @see #getAddress()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String ADDRESS_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
|
||||
*
|
||||
* @see #getAddress()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String address = ADDRESS_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected DeviceImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected EClass eStaticClass() {
|
||||
return ModelPackage.Literals.DEVICE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EList getServiceType() {
|
||||
if (serviceType == null) {
|
||||
serviceType = new EObjectContainmentEList(ServiceType.class, this, ModelPackage.DEVICE__SERVICE_TYPE);
|
||||
}
|
||||
return serviceType;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void setAddress(String newAddress) {
|
||||
String oldAddress = address;
|
||||
address = newAddress;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.DEVICE__ADDRESS, oldAddress, address));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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.DEVICE__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.DEVICE__SERVICE_TYPE:
|
||||
return ((InternalEList)getServiceType()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.DEVICE__SERVICE_TYPE:
|
||||
return getServiceType();
|
||||
case ModelPackage.DEVICE__ADDRESS:
|
||||
return getAddress();
|
||||
case ModelPackage.DEVICE__NAME:
|
||||
return getName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eSet(int featureID, Object newValue) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.DEVICE__SERVICE_TYPE:
|
||||
getServiceType().clear();
|
||||
getServiceType().addAll((Collection)newValue);
|
||||
return;
|
||||
case ModelPackage.DEVICE__ADDRESS:
|
||||
setAddress((String)newValue);
|
||||
return;
|
||||
case ModelPackage.DEVICE__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eUnset(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.DEVICE__SERVICE_TYPE:
|
||||
getServiceType().clear();
|
||||
return;
|
||||
case ModelPackage.DEVICE__ADDRESS:
|
||||
setAddress(ADDRESS_EDEFAULT);
|
||||
return;
|
||||
case ModelPackage.DEVICE__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public boolean eIsSet(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.DEVICE__SERVICE_TYPE:
|
||||
return serviceType != null && !serviceType.isEmpty();
|
||||
case ModelPackage.DEVICE__ADDRESS:
|
||||
return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
|
||||
case ModelPackage.DEVICE__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public String toString() {
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (address: ");
|
||||
result.append(address);
|
||||
result.append(", name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //DeviceImpl
|
|
@ -0,0 +1,135 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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;
|
||||
|
||||
import org.eclipse.tm.discovery.model.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model <b>Factory</b>.
|
||||
*
|
||||
* @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("http://www.eclipse.org/tm/discovery/model");
|
||||
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
|
||||
*/
|
||||
public EObject create(EClass eClass) {
|
||||
switch (eClass.getClassifierID()) {
|
||||
case ModelPackage.DEVICE: return createDevice();
|
||||
case ModelPackage.NETWORK: return createNetwork();
|
||||
case ModelPackage.PAIR: return createPair();
|
||||
case ModelPackage.SERVICE: return createService();
|
||||
case ModelPackage.SERVICE_TYPE: return createServiceType();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Device createDevice() {
|
||||
DeviceImpl device = new DeviceImpl();
|
||||
return device;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Network createNetwork() {
|
||||
NetworkImpl network = new NetworkImpl();
|
||||
return network;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Pair createPair() {
|
||||
PairImpl pair = new PairImpl();
|
||||
return pair;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Service createService() {
|
||||
ServiceImpl service = new ServiceImpl();
|
||||
return service;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public ServiceType createServiceType() {
|
||||
ServiceTypeImpl serviceType = new ServiceTypeImpl();
|
||||
return serviceType;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public ModelPackage getModelPackage() {
|
||||
return (ModelPackage)getEPackage();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated
|
||||
* @generated
|
||||
*/
|
||||
public static ModelPackage getPackage() {
|
||||
return ModelPackage.eINSTANCE;
|
||||
}
|
||||
|
||||
} //ModelFactoryImpl
|
|
@ -0,0 +1,470 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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;
|
||||
|
||||
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
|
||||
|
||||
import org.eclipse.tm.discovery.model.Device;
|
||||
import org.eclipse.tm.discovery.model.ModelFactory;
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.Network;
|
||||
import org.eclipse.tm.discovery.model.Pair;
|
||||
import org.eclipse.tm.discovery.model.Service;
|
||||
import org.eclipse.tm.discovery.model.ServiceType;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Package</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class ModelPackageImpl extends EPackageImpl implements ModelPackage {
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
private EClass deviceEClass = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
private EClass networkEClass = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
private EClass pairEClass = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
private EClass serviceEClass = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
private EClass serviceTypeEClass = null;
|
||||
|
||||
/**
|
||||
* Creates an instance of the model <b>Package</b>, registered with
|
||||
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
||||
* package URI value.
|
||||
* <p>Note: the correct way to create the package is via the static
|
||||
* factory method {@link #init init()}, which also performs
|
||||
* initialization of the package, or returns the registered package,
|
||||
* if one already exists.
|
||||
*
|
||||
* @see org.eclipse.emf.ecore.EPackage.Registry
|
||||
* @see org.eclipse.tm.discovery.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 <b>Package</b> for this
|
||||
* model, and for any others upon which it depends. Simple
|
||||
* dependencies are satisfied by calling this method on all
|
||||
* dependent packages before doing anything else. This method drives
|
||||
* initialization for interdependent packages directly, in parallel
|
||||
* with this package, itself.
|
||||
* <p>Of this package and its interdependencies, all packages which
|
||||
* have not yet been registered by their URI values are first created
|
||||
* and registered. The packages are then initialized in two steps:
|
||||
* meta-model objects for all of the packages are created before any
|
||||
* are initialized, since one package's meta-model objects may refer to
|
||||
* those of another.
|
||||
* <p>Invocation of this method will not affect any packages that have
|
||||
* already been initialized.
|
||||
*
|
||||
* @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.getEPackage(eNS_URI) instanceof ModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new ModelPackageImpl());
|
||||
|
||||
isInited = true;
|
||||
|
||||
// Initialize simple dependencies
|
||||
XMLTypePackage.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();
|
||||
|
||||
return theModelPackage;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EClass getDevice() {
|
||||
return deviceEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EReference getDevice_ServiceType() {
|
||||
return (EReference)deviceEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getDevice_Address() {
|
||||
return (EAttribute)deviceEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getDevice_Name() {
|
||||
return (EAttribute)deviceEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EClass getNetwork() {
|
||||
return networkEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EReference getNetwork_Device() {
|
||||
return (EReference)networkEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EClass getPair() {
|
||||
return pairEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getPair_Key() {
|
||||
return (EAttribute)pairEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getPair_Value() {
|
||||
return (EAttribute)pairEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EClass getService() {
|
||||
return serviceEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EReference getService_Pair() {
|
||||
return (EReference)serviceEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getService_Name() {
|
||||
return (EAttribute)serviceEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EClass getServiceType() {
|
||||
return serviceTypeEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EReference getServiceType_Service() {
|
||||
return (EReference)serviceTypeEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getServiceType_Name() {
|
||||
return (EAttribute)serviceTypeEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
deviceEClass = createEClass(DEVICE);
|
||||
createEReference(deviceEClass, DEVICE__SERVICE_TYPE);
|
||||
createEAttribute(deviceEClass, DEVICE__ADDRESS);
|
||||
createEAttribute(deviceEClass, DEVICE__NAME);
|
||||
|
||||
networkEClass = createEClass(NETWORK);
|
||||
createEReference(networkEClass, NETWORK__DEVICE);
|
||||
|
||||
pairEClass = createEClass(PAIR);
|
||||
createEAttribute(pairEClass, PAIR__KEY);
|
||||
createEAttribute(pairEClass, PAIR__VALUE);
|
||||
|
||||
serviceEClass = createEClass(SERVICE);
|
||||
createEReference(serviceEClass, SERVICE__PAIR);
|
||||
createEAttribute(serviceEClass, SERVICE__NAME);
|
||||
|
||||
serviceTypeEClass = createEClass(SERVICE_TYPE);
|
||||
createEReference(serviceTypeEClass, SERVICE_TYPE__SERVICE);
|
||||
createEAttribute(serviceTypeEClass, SERVICE_TYPE__NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
|
||||
|
||||
// Add supertypes to classes
|
||||
|
||||
// Initialize classes and features; add operations and parameters
|
||||
initEClass(deviceEClass, Device.class, "Device", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getDevice_ServiceType(), this.getServiceType(), null, "serviceType", null, 1, -1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getDevice_Address(), theXMLTypePackage.getString(), "address", null, 0, 1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getDevice_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Device.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(networkEClass, Network.class, "Network", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getNetwork_Device(), this.getDevice(), null, "device", null, 1, -1, Network.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(pairEClass, Pair.class, "Pair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getPair_Key(), theXMLTypePackage.getString(), "key", null, 0, 1, Pair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getPair_Value(), theXMLTypePackage.getString(), "value", null, 0, 1, Pair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(serviceEClass, Service.class, "Service", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getService_Pair(), this.getPair(), null, "pair", null, 0, -1, Service.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getService_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, Service.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(serviceTypeEClass, ServiceType.class, "ServiceType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getServiceType_Service(), this.getService(), null, "service", null, 1, -1, ServiceType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getServiceType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, ServiceType.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:///org/eclipse/emf/ecore/util/ExtendedMetaData
|
||||
createExtendedMetaDataAnnotations();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected void createExtendedMetaDataAnnotations() {
|
||||
String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
|
||||
addAnnotation
|
||||
(deviceEClass,
|
||||
source,
|
||||
new String[] {
|
||||
"name", "Device",
|
||||
"kind", "elementOnly"
|
||||
});
|
||||
addAnnotation
|
||||
(getDevice_ServiceType(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "element",
|
||||
"name", "ServiceType"
|
||||
});
|
||||
addAnnotation
|
||||
(getDevice_Address(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "address"
|
||||
});
|
||||
addAnnotation
|
||||
(getDevice_Name(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "name"
|
||||
});
|
||||
addAnnotation
|
||||
(networkEClass,
|
||||
source,
|
||||
new String[] {
|
||||
"name", "Network",
|
||||
"kind", "elementOnly"
|
||||
});
|
||||
addAnnotation
|
||||
(getNetwork_Device(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "element",
|
||||
"name", "Device"
|
||||
});
|
||||
addAnnotation
|
||||
(pairEClass,
|
||||
source,
|
||||
new String[] {
|
||||
"name", "Pair",
|
||||
"kind", "empty"
|
||||
});
|
||||
addAnnotation
|
||||
(getPair_Key(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "key"
|
||||
});
|
||||
addAnnotation
|
||||
(getPair_Value(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "value"
|
||||
});
|
||||
addAnnotation
|
||||
(serviceEClass,
|
||||
source,
|
||||
new String[] {
|
||||
"name", "Service",
|
||||
"kind", "elementOnly"
|
||||
});
|
||||
addAnnotation
|
||||
(getService_Pair(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "element",
|
||||
"name", "Pair"
|
||||
});
|
||||
addAnnotation
|
||||
(getService_Name(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "name"
|
||||
});
|
||||
addAnnotation
|
||||
(serviceTypeEClass,
|
||||
source,
|
||||
new String[] {
|
||||
"name", "ServiceType",
|
||||
"kind", "elementOnly"
|
||||
});
|
||||
addAnnotation
|
||||
(getServiceType_Service(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "element",
|
||||
"name", "Service"
|
||||
});
|
||||
addAnnotation
|
||||
(getServiceType_Name(),
|
||||
source,
|
||||
new String[] {
|
||||
"kind", "attribute",
|
||||
"name", "name"
|
||||
});
|
||||
}
|
||||
|
||||
} //ModelPackageImpl
|
|
@ -0,0 +1,144 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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.EObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.tm.discovery.model.Device;
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.Network;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model object '<em><b>Network</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.NetworkImpl#getDevice <em>Device</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class NetworkImpl extends EObjectImpl implements Network {
|
||||
/**
|
||||
* The cached value of the '{@link #getDevice() <em>Device</em>}' containment reference list.
|
||||
*
|
||||
* @see #getDevice()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList device = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected NetworkImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected EClass eStaticClass() {
|
||||
return ModelPackage.Literals.NETWORK;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EList getDevice() {
|
||||
if (device == null) {
|
||||
device = new EObjectContainmentEList(Device.class, this, ModelPackage.NETWORK__DEVICE);
|
||||
}
|
||||
return device;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.NETWORK__DEVICE:
|
||||
return ((InternalEList)getDevice()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.NETWORK__DEVICE:
|
||||
return getDevice();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eSet(int featureID, Object newValue) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.NETWORK__DEVICE:
|
||||
getDevice().clear();
|
||||
getDevice().addAll((Collection)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eUnset(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.NETWORK__DEVICE:
|
||||
getDevice().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public boolean eIsSet(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.NETWORK__DEVICE:
|
||||
return device != null && !device.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //NetworkImpl
|
|
@ -0,0 +1,204 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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.EObjectImpl;
|
||||
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.Pair;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model object '<em><b>Pair</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.PairImpl#getKey <em>Key</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.PairImpl#getValue <em>Value</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class PairImpl extends EObjectImpl implements Pair {
|
||||
/**
|
||||
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
|
||||
*
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String KEY_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
|
||||
*
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String key = KEY_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
*
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
*
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected PairImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected EClass eStaticClass() {
|
||||
return ModelPackage.Literals.PAIR;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void setKey(String newKey) {
|
||||
String oldKey = key;
|
||||
key = newKey;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.PAIR__KEY, oldKey, key));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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.PAIR__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.PAIR__KEY:
|
||||
return getKey();
|
||||
case ModelPackage.PAIR__VALUE:
|
||||
return getValue();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eSet(int featureID, Object newValue) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.PAIR__KEY:
|
||||
setKey((String)newValue);
|
||||
return;
|
||||
case ModelPackage.PAIR__VALUE:
|
||||
setValue((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eUnset(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.PAIR__KEY:
|
||||
setKey(KEY_EDEFAULT);
|
||||
return;
|
||||
case ModelPackage.PAIR__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public boolean eIsSet(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.PAIR__KEY:
|
||||
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
|
||||
case ModelPackage.PAIR__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public String toString() {
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (key: ");
|
||||
result.append(key);
|
||||
result.append(", value: ");
|
||||
result.append(value);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //PairImpl
|
|
@ -0,0 +1,208 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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.EObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.Pair;
|
||||
import org.eclipse.tm.discovery.model.Service;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model object '<em><b>Service</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.ServiceImpl#getPair <em>Pair</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.ServiceImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class ServiceImpl extends EObjectImpl implements Service {
|
||||
/**
|
||||
* The cached value of the '{@link #getPair() <em>Pair</em>}' containment reference list.
|
||||
*
|
||||
* @see #getPair()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList pair = null;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected ServiceImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected EClass eStaticClass() {
|
||||
return ModelPackage.Literals.SERVICE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EList getPair() {
|
||||
if (pair == null) {
|
||||
pair = new EObjectContainmentEList(Pair.class, this, ModelPackage.SERVICE__PAIR);
|
||||
}
|
||||
return pair;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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.SERVICE__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE__PAIR:
|
||||
return ((InternalEList)getPair()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE__PAIR:
|
||||
return getPair();
|
||||
case ModelPackage.SERVICE__NAME:
|
||||
return getName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eSet(int featureID, Object newValue) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE__PAIR:
|
||||
getPair().clear();
|
||||
getPair().addAll((Collection)newValue);
|
||||
return;
|
||||
case ModelPackage.SERVICE__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eUnset(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE__PAIR:
|
||||
getPair().clear();
|
||||
return;
|
||||
case ModelPackage.SERVICE__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public boolean eIsSet(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE__PAIR:
|
||||
return pair != null && !pair.isEmpty();
|
||||
case ModelPackage.SERVICE__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
} //ServiceImpl
|
|
@ -0,0 +1,208 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.impl;
|
||||
|
||||
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.EObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
import org.eclipse.tm.discovery.model.Service;
|
||||
import org.eclipse.tm.discovery.model.ServiceType;
|
||||
|
||||
/**
|
||||
*
|
||||
* An implementation of the model object '<em><b>Service Type</b></em>'.
|
||||
*
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl#getService <em>Service</em>}</li>
|
||||
* <li>{@link org.eclipse.tm.discovery.model.impl.ServiceTypeImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class ServiceTypeImpl extends EObjectImpl implements ServiceType {
|
||||
/**
|
||||
* The cached value of the '{@link #getService() <em>Service</em>}' containment reference list.
|
||||
*
|
||||
* @see #getService()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList service = null;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
*
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected ServiceTypeImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected EClass eStaticClass() {
|
||||
return ModelPackage.Literals.SERVICE_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public EList getService() {
|
||||
if (service == null) {
|
||||
service = new EObjectContainmentEList(Service.class, this, ModelPackage.SERVICE_TYPE__SERVICE);
|
||||
}
|
||||
return service;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @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.SERVICE_TYPE__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE_TYPE__SERVICE:
|
||||
return ((InternalEList)getService()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE_TYPE__SERVICE:
|
||||
return getService();
|
||||
case ModelPackage.SERVICE_TYPE__NAME:
|
||||
return getName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eSet(int featureID, Object newValue) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE_TYPE__SERVICE:
|
||||
getService().clear();
|
||||
getService().addAll((Collection)newValue);
|
||||
return;
|
||||
case ModelPackage.SERVICE_TYPE__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public void eUnset(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE_TYPE__SERVICE:
|
||||
getService().clear();
|
||||
return;
|
||||
case ModelPackage.SERVICE_TYPE__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public boolean eIsSet(int featureID) {
|
||||
switch (featureID) {
|
||||
case ModelPackage.SERVICE_TYPE__SERVICE:
|
||||
return service != null && !service.isEmpty();
|
||||
case ModelPackage.SERVICE_TYPE__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
} //ServiceTypeImpl
|
|
@ -0,0 +1,188 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.util;
|
||||
|
||||
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;
|
||||
|
||||
import org.eclipse.tm.discovery.model.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* The <b>Adapter Factory</b> for the model.
|
||||
* It provides an adapter <code>createXXX</code> method for each class of the model.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.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 <code>true</code> 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
|
||||
*/
|
||||
public boolean isFactoryForType(Object object) {
|
||||
if (object == modelPackage) {
|
||||
return true;
|
||||
}
|
||||
if (object instanceof EObject) {
|
||||
return ((EObject)object).eClass().getEPackage() == modelPackage;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The switch the delegates to the <code>createXXX</code> methods.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected ModelSwitch modelSwitch =
|
||||
new ModelSwitch() {
|
||||
public Object caseDevice(Device object) {
|
||||
return createDeviceAdapter();
|
||||
}
|
||||
public Object caseNetwork(Network object) {
|
||||
return createNetworkAdapter();
|
||||
}
|
||||
public Object casePair(Pair object) {
|
||||
return createPairAdapter();
|
||||
}
|
||||
public Object caseService(Service object) {
|
||||
return createServiceAdapter();
|
||||
}
|
||||
public Object caseServiceType(ServiceType object) {
|
||||
return createServiceTypeAdapter();
|
||||
}
|
||||
public Object defaultCase(EObject object) {
|
||||
return createEObjectAdapter();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an adapter for the <code>target</code>.
|
||||
*
|
||||
* @param target the object to adapt.
|
||||
* @return the adapter for the <code>target</code>.
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAdapter(Notifier target) {
|
||||
return (Adapter)modelSwitch.doSwitch((EObject)target);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Device <em>Device</em>}'.
|
||||
*
|
||||
* 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.eclipse.tm.discovery.model.Device
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createDeviceAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Network <em>Network</em>}'.
|
||||
*
|
||||
* 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.eclipse.tm.discovery.model.Network
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createNetworkAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Pair <em>Pair</em>}'.
|
||||
*
|
||||
* 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.eclipse.tm.discovery.model.Pair
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createPairAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.Service <em>Service</em>}'.
|
||||
*
|
||||
* 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.eclipse.tm.discovery.model.Service
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createServiceAdapter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.tm.discovery.model.ServiceType <em>Service Type</em>}'.
|
||||
*
|
||||
* 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.eclipse.tm.discovery.model.ServiceType
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createServiceTypeAdapter() {
|
||||
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
|
|
@ -0,0 +1,57 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.util;
|
||||
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
|
||||
import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.xmi.XMLResource;
|
||||
|
||||
/**
|
||||
*
|
||||
* The <b>Resource Factory</b> associated with the package.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.util.ModelResourceImpl
|
||||
* @generated
|
||||
*/
|
||||
public class ModelResourceFactoryImpl extends ResourceFactoryImpl {
|
||||
/**
|
||||
* Creates an instance of the resource factory.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public ModelResourceFactoryImpl() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the resource.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public Resource createResource(URI uri) {
|
||||
XMLResource result = new ModelResourceImpl(uri);
|
||||
result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
|
||||
result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
|
||||
|
||||
result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
|
||||
|
||||
result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
|
||||
result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
|
||||
|
||||
result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
|
||||
return result;
|
||||
}
|
||||
|
||||
} //ModelResourceFactoryImpl
|
|
@ -0,0 +1,35 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.util;
|
||||
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
|
||||
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* The <b>Resource </b> associated with the package.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.util.ModelResourceFactoryImpl
|
||||
* @generated
|
||||
*/
|
||||
public class ModelResourceImpl extends XMLResourceImpl {
|
||||
/**
|
||||
* Creates an instance of the resource.
|
||||
*
|
||||
* @param uri the URI of the new resource.
|
||||
* @generated
|
||||
*/
|
||||
public ModelResourceImpl(URI uri) {
|
||||
super(uri);
|
||||
}
|
||||
|
||||
} //ModelResourceImpl
|
|
@ -0,0 +1,213 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
import org.eclipse.tm.discovery.model.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* The <b>Switch</b> for the model's inheritance hierarchy.
|
||||
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
|
||||
* to invoke the <code>caseXXX</code> method for each class of the model,
|
||||
* starting with the actual class of the object
|
||||
* and proceeding up the inheritance hierarchy
|
||||
* until a non-null result is returned,
|
||||
* which is the result of the switch.
|
||||
*
|
||||
* @see org.eclipse.tm.discovery.model.ModelPackage
|
||||
* @generated
|
||||
*/
|
||||
public class ModelSwitch {
|
||||
/**
|
||||
* The cached model package
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected static ModelPackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the switch.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public ModelSwitch() {
|
||||
if (modelPackage == null) {
|
||||
modelPackage = ModelPackage.eINSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> 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 <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
public Object doSwitch(EObject theEObject) {
|
||||
return doSwitch(theEObject.eClass(), theEObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> 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 <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
protected Object doSwitch(EClass theEClass, EObject theEObject) {
|
||||
if (theEClass.eContainer() == modelPackage) {
|
||||
return doSwitch(theEClass.getClassifierID(), theEObject);
|
||||
}
|
||||
else {
|
||||
List eSuperTypes = theEClass.getESuperTypes();
|
||||
return
|
||||
eSuperTypes.isEmpty() ?
|
||||
defaultCase(theEObject) :
|
||||
doSwitch((EClass)eSuperTypes.get(0), theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> 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 <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
protected Object doSwitch(int classifierID, EObject theEObject) {
|
||||
switch (classifierID) {
|
||||
case ModelPackage.DEVICE: {
|
||||
Device device = (Device)theEObject;
|
||||
Object result = caseDevice(device);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case ModelPackage.NETWORK: {
|
||||
Network network = (Network)theEObject;
|
||||
Object result = caseNetwork(network);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case ModelPackage.PAIR: {
|
||||
Pair pair = (Pair)theEObject;
|
||||
Object result = casePair(pair);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case ModelPackage.SERVICE: {
|
||||
Service service = (Service)theEObject;
|
||||
Object result = caseService(service);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case ModelPackage.SERVICE_TYPE: {
|
||||
ServiceType serviceType = (ServiceType)theEObject;
|
||||
Object result = caseServiceType(serviceType);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>Device</em>'.
|
||||
*
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
*
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpretting the object as an instance of '<em>Device</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object caseDevice(Device object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>Network</em>'.
|
||||
*
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
*
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpretting the object as an instance of '<em>Network</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object caseNetwork(Network object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>Pair</em>'.
|
||||
*
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
*
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpretting the object as an instance of '<em>Pair</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object casePair(Pair object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>Service</em>'.
|
||||
*
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
*
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpretting the object as an instance of '<em>Service</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object caseService(Service object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>Service Type</em>'.
|
||||
*
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
*
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpretting the object as an instance of '<em>Service Type</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object caseServiceType(ServiceType object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
|
||||
*
|
||||
* 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 interpretting the object as an instance of '<em>EObject</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
|
||||
* @generated
|
||||
*/
|
||||
public Object defaultCase(EObject object) {
|
||||
return null;
|
||||
}
|
||||
|
||||
} //ModelSwitch
|
|
@ -0,0 +1,51 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006 Symbian Software Ltd. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Javier Montalvo Orús (Symbian) - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.tm.discovery.model.util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
|
||||
|
||||
import org.eclipse.tm.discovery.model.ModelPackage;
|
||||
|
||||
/**
|
||||
* This class contains helper methods to serialize and deserialize XML documents
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class ModelXMLProcessor extends XMLProcessor {
|
||||
/**
|
||||
* Public constructor to instantiate the helper.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public ModelXMLProcessor() {
|
||||
super((EPackage.Registry.INSTANCE));
|
||||
ModelPackage.eINSTANCE.eClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register for "*" and "xml" file extensions the ModelResourceFactoryImpl factory.
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
protected Map getRegistrations() {
|
||||
if (registrations == null) {
|
||||
super.getRegistrations();
|
||||
registrations.put(XML_EXTENSION, new ModelResourceFactoryImpl());
|
||||
registrations.put(STAR_EXTENSION, new ModelResourceFactoryImpl());
|
||||
}
|
||||
return registrations;
|
||||
}
|
||||
|
||||
} //ModelXMLProcessor
|
Loading…
Add table
Reference in a new issue