You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hdt.apache.org by rs...@apache.org on 2013/07/25 06:29:21 UTC
[5/8] HDT-32: Merge the code base of Hadoop-Eclipse project into HDT.
Contributed by Srimanth Gunturi
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HDFSServerImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HDFSServerImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HDFSServerImpl.java
new file mode 100644
index 0000000..ed25f07
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HDFSServerImpl.java
@@ -0,0 +1,310 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+import java.util.Collection;
+
+import org.apache.hdt.core.internal.model.HDFSServer;
+import org.apache.hdt.core.internal.model.HadoopPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>HDFS Server</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.HDFSServerImpl#isLoaded <em>Loaded</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.HDFSServerImpl#getOperationURIs <em>Operation UR Is</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.HDFSServerImpl#getUserId <em>User Id</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.HDFSServerImpl#getGroupIds <em>Group Ids</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class HDFSServerImpl extends ServerImpl implements HDFSServer {
+ /**
+ * The default value of the '{@link #isLoaded() <em>Loaded</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLoaded()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean LOADED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isLoaded() <em>Loaded</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isLoaded()
+ * @generated
+ * @ordered
+ */
+ protected boolean loaded = LOADED_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getOperationURIs() <em>Operation UR Is</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOperationURIs()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> operationURIs;
+
+ /**
+ * The default value of the '{@link #getUserId() <em>User Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUserId()
+ * @generated
+ * @ordered
+ */
+ protected static final String USER_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUserId() <em>User Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUserId()
+ * @generated
+ * @ordered
+ */
+ protected String userId = USER_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getGroupIds() <em>Group Ids</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGroupIds()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> groupIds;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected HDFSServerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return HadoopPackage.Literals.HDFS_SERVER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isLoaded() {
+ return loaded;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLoaded(boolean newLoaded) {
+ boolean oldLoaded = loaded;
+ loaded = newLoaded;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.HDFS_SERVER__LOADED, oldLoaded, loaded));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getOperationURIs() {
+ if (operationURIs == null) {
+ operationURIs = new EDataTypeUniqueEList<String>(String.class, this, HadoopPackage.HDFS_SERVER__OPERATION_UR_IS);
+ }
+ return operationURIs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getUserId() {
+ return userId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUserId(String newUserId) {
+ String oldUserId = userId;
+ userId = newUserId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.HDFS_SERVER__USER_ID, oldUserId, userId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getGroupIds() {
+ if (groupIds == null) {
+ groupIds = new EDataTypeUniqueEList<String>(String.class, this, HadoopPackage.HDFS_SERVER__GROUP_IDS);
+ }
+ return groupIds;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HadoopPackage.HDFS_SERVER__LOADED:
+ return isLoaded();
+ case HadoopPackage.HDFS_SERVER__OPERATION_UR_IS:
+ return getOperationURIs();
+ case HadoopPackage.HDFS_SERVER__USER_ID:
+ return getUserId();
+ case HadoopPackage.HDFS_SERVER__GROUP_IDS:
+ return getGroupIds();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HadoopPackage.HDFS_SERVER__LOADED:
+ setLoaded((Boolean)newValue);
+ return;
+ case HadoopPackage.HDFS_SERVER__OPERATION_UR_IS:
+ getOperationURIs().clear();
+ getOperationURIs().addAll((Collection<? extends String>)newValue);
+ return;
+ case HadoopPackage.HDFS_SERVER__USER_ID:
+ setUserId((String)newValue);
+ return;
+ case HadoopPackage.HDFS_SERVER__GROUP_IDS:
+ getGroupIds().clear();
+ getGroupIds().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.HDFS_SERVER__LOADED:
+ setLoaded(LOADED_EDEFAULT);
+ return;
+ case HadoopPackage.HDFS_SERVER__OPERATION_UR_IS:
+ getOperationURIs().clear();
+ return;
+ case HadoopPackage.HDFS_SERVER__USER_ID:
+ setUserId(USER_ID_EDEFAULT);
+ return;
+ case HadoopPackage.HDFS_SERVER__GROUP_IDS:
+ getGroupIds().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.HDFS_SERVER__LOADED:
+ return loaded != LOADED_EDEFAULT;
+ case HadoopPackage.HDFS_SERVER__OPERATION_UR_IS:
+ return operationURIs != null && !operationURIs.isEmpty();
+ case HadoopPackage.HDFS_SERVER__USER_ID:
+ return USER_ID_EDEFAULT == null ? userId != null : !USER_ID_EDEFAULT.equals(userId);
+ case HadoopPackage.HDFS_SERVER__GROUP_IDS:
+ return groupIds != null && !groupIds.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (loaded: ");
+ result.append(loaded);
+ result.append(", operationURIs: ");
+ result.append(operationURIs);
+ result.append(", userId: ");
+ result.append(userId);
+ result.append(", groupIds: ");
+ result.append(groupIds);
+ result.append(')');
+ return result.toString();
+ }
+
+} //HDFSServerImpl
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopFactoryImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopFactoryImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopFactoryImpl.java
new file mode 100644
index 0000000..c3e5c2b
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopFactoryImpl.java
@@ -0,0 +1,195 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+import org.apache.hdt.core.internal.model.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HadoopFactoryImpl extends EFactoryImpl implements HadoopFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static HadoopFactory init() {
+ try {
+ HadoopFactory theHadoopFactory = (HadoopFactory)EPackage.Registry.INSTANCE.getEFactory("http://hadoop/1.0");
+ if (theHadoopFactory != null) {
+ return theHadoopFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new HadoopFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HadoopFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case HadoopPackage.HDFS_SERVER: return createHDFSServer();
+ case HadoopPackage.SERVERS: return createServers();
+ case HadoopPackage.ZOO_KEEPER_SERVER: return createZooKeeperServer();
+ case HadoopPackage.ZNODE: return createZNode();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case HadoopPackage.SERVER_STATUS:
+ return createServerStatusFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case HadoopPackage.SERVER_STATUS:
+ return convertServerStatusToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HDFSServer createHDFSServer() {
+ HDFSServerImpl hdfsServer = new HDFSServerImpl();
+ return hdfsServer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Servers createServers() {
+ ServersImpl servers = new ServersImpl();
+ return servers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ZooKeeperServer createZooKeeperServer() {
+ ZooKeeperServerImpl zooKeeperServer = new ZooKeeperServerImpl();
+ return zooKeeperServer;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ZNode createZNode() {
+ ZNodeImpl zNode = new ZNodeImpl();
+ return zNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ServerStatus createServerStatusFromString(EDataType eDataType, String initialValue) {
+ ServerStatus result = ServerStatus.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertServerStatusToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HadoopPackage getHadoopPackage() {
+ return (HadoopPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static HadoopPackage getPackage() {
+ return HadoopPackage.eINSTANCE;
+ }
+
+} //HadoopFactoryImpl
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopPackageImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopPackageImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopPackageImpl.java
new file mode 100644
index 0000000..a698d56
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/HadoopPackageImpl.java
@@ -0,0 +1,621 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+
+import org.apache.hdt.core.internal.model.HDFSServer;
+import org.apache.hdt.core.internal.model.HadoopFactory;
+import org.apache.hdt.core.internal.model.HadoopPackage;
+import org.apache.hdt.core.internal.model.Server;
+import org.apache.hdt.core.internal.model.ServerStatus;
+import org.apache.hdt.core.internal.model.Servers;
+import org.apache.hdt.core.internal.model.ZNode;
+import org.apache.hdt.core.internal.model.ZNodeType;
+import org.apache.hdt.core.internal.model.ZooKeeperServer;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class HadoopPackageImpl extends EPackageImpl implements HadoopPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass hdfsServerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass serversEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass serverEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass zooKeeperServerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass zNodeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum serverStatusEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.apache.hdt.core.internal.model.HadoopPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private HadoopPackageImpl() {
+ super(eNS_URI, HadoopFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link HadoopPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static HadoopPackage init() {
+ if (isInited) return (HadoopPackage)EPackage.Registry.INSTANCE.getEPackage(HadoopPackage.eNS_URI);
+
+ // Obtain or create and register package
+ HadoopPackageImpl theHadoopPackage = (HadoopPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof HadoopPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new HadoopPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theHadoopPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theHadoopPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theHadoopPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(HadoopPackage.eNS_URI, theHadoopPackage);
+ return theHadoopPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getHDFSServer() {
+ return hdfsServerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHDFSServer_Loaded() {
+ return (EAttribute)hdfsServerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHDFSServer_OperationURIs() {
+ return (EAttribute)hdfsServerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHDFSServer_UserId() {
+ return (EAttribute)hdfsServerEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getHDFSServer_GroupIds() {
+ return (EAttribute)hdfsServerEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getServers() {
+ return serversEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getServers_HdfsServers() {
+ return (EReference)serversEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServers_Version() {
+ return (EAttribute)serversEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getServers_ZookeeperServers() {
+ return (EReference)serversEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getServer() {
+ return serverEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServer_Name() {
+ return (EAttribute)serverEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServer_Uri() {
+ return (EAttribute)serverEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServer_StatusCode() {
+ return (EAttribute)serverEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServer_StatusMessage() {
+ return (EAttribute)serverEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getServer_LastAccessed() {
+ return (EAttribute)serverEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getZooKeeperServer() {
+ return zooKeeperServerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getZNode() {
+ return zNodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getZNode_Children() {
+ return (EReference)zNodeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_LastRefresh() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_Refreshing() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_Ephermeral() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_CreationId() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_ModifiedId() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_CreationTime() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_ModifiedTime() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_Version() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_ChildrenVersion() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(9);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_AclVersion() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(10);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_EphermalOwnerSessionId() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(11);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_DataLength() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(12);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_ChildrenCount() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(13);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getZNode_Parent() {
+ return (EReference)zNodeEClass.getEStructuralFeatures().get(14);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_NodeName() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(15);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getZNode_Sequential() {
+ return (EAttribute)zNodeEClass.getEStructuralFeatures().get(16);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getServerStatus() {
+ return serverStatusEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HadoopFactory getHadoopFactory() {
+ return (HadoopFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ hdfsServerEClass = createEClass(HDFS_SERVER);
+ createEAttribute(hdfsServerEClass, HDFS_SERVER__LOADED);
+ createEAttribute(hdfsServerEClass, HDFS_SERVER__OPERATION_UR_IS);
+ createEAttribute(hdfsServerEClass, HDFS_SERVER__USER_ID);
+ createEAttribute(hdfsServerEClass, HDFS_SERVER__GROUP_IDS);
+
+ serversEClass = createEClass(SERVERS);
+ createEReference(serversEClass, SERVERS__HDFS_SERVERS);
+ createEAttribute(serversEClass, SERVERS__VERSION);
+ createEReference(serversEClass, SERVERS__ZOOKEEPER_SERVERS);
+
+ serverEClass = createEClass(SERVER);
+ createEAttribute(serverEClass, SERVER__NAME);
+ createEAttribute(serverEClass, SERVER__URI);
+ createEAttribute(serverEClass, SERVER__STATUS_CODE);
+ createEAttribute(serverEClass, SERVER__STATUS_MESSAGE);
+ createEAttribute(serverEClass, SERVER__LAST_ACCESSED);
+
+ zooKeeperServerEClass = createEClass(ZOO_KEEPER_SERVER);
+
+ zNodeEClass = createEClass(ZNODE);
+ createEReference(zNodeEClass, ZNODE__CHILDREN);
+ createEAttribute(zNodeEClass, ZNODE__LAST_REFRESH);
+ createEAttribute(zNodeEClass, ZNODE__REFRESHING);
+ createEAttribute(zNodeEClass, ZNODE__EPHERMERAL);
+ createEAttribute(zNodeEClass, ZNODE__CREATION_ID);
+ createEAttribute(zNodeEClass, ZNODE__MODIFIED_ID);
+ createEAttribute(zNodeEClass, ZNODE__CREATION_TIME);
+ createEAttribute(zNodeEClass, ZNODE__MODIFIED_TIME);
+ createEAttribute(zNodeEClass, ZNODE__VERSION);
+ createEAttribute(zNodeEClass, ZNODE__CHILDREN_VERSION);
+ createEAttribute(zNodeEClass, ZNODE__ACL_VERSION);
+ createEAttribute(zNodeEClass, ZNODE__EPHERMAL_OWNER_SESSION_ID);
+ createEAttribute(zNodeEClass, ZNODE__DATA_LENGTH);
+ createEAttribute(zNodeEClass, ZNODE__CHILDREN_COUNT);
+ createEReference(zNodeEClass, ZNODE__PARENT);
+ createEAttribute(zNodeEClass, ZNODE__NODE_NAME);
+ createEAttribute(zNodeEClass, ZNODE__SEQUENTIAL);
+
+ // Create enums
+ serverStatusEEnum = createEEnum(SERVER_STATUS);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ hdfsServerEClass.getESuperTypes().add(this.getServer());
+ zooKeeperServerEClass.getESuperTypes().add(this.getServer());
+ zooKeeperServerEClass.getESuperTypes().add(this.getZNode());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(hdfsServerEClass, HDFSServer.class, "HDFSServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getHDFSServer_Loaded(), ecorePackage.getEBoolean(), "loaded", null, 0, 1, HDFSServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getHDFSServer_OperationURIs(), ecorePackage.getEString(), "operationURIs", null, 0, -1, HDFSServer.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getHDFSServer_UserId(), ecorePackage.getEString(), "userId", null, 0, 1, HDFSServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getHDFSServer_GroupIds(), ecorePackage.getEString(), "groupIds", null, 0, -1, HDFSServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(serversEClass, Servers.class, "Servers", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getServers_HdfsServers(), this.getHDFSServer(), null, "hdfsServers", null, 0, -1, Servers.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getServers_Version(), ecorePackage.getEString(), "version", "1.0.0.0", 0, 1, Servers.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getServers_ZookeeperServers(), this.getZooKeeperServer(), null, "zookeeperServers", null, 0, -1, Servers.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(serverEClass, Server.class, "Server", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getServer_Name(), ecorePackage.getEString(), "name", "", 0, 1, Server.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getServer_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, Server.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getServer_StatusCode(), ecorePackage.getEInt(), "statusCode", "0", 0, 1, Server.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getServer_StatusMessage(), ecorePackage.getEString(), "statusMessage", null, 0, 1, Server.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getServer_LastAccessed(), ecorePackage.getELong(), "lastAccessed", "-1", 0, 1, Server.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(zooKeeperServerEClass, ZooKeeperServer.class, "ZooKeeperServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(zNodeEClass, ZNode.class, "ZNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getZNode_Children(), this.getZNode(), null, "children", null, 0, -1, ZNode.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_LastRefresh(), ecorePackage.getELong(), "lastRefresh", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_Refreshing(), ecorePackage.getEBoolean(), "refreshing", null, 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_Ephermeral(), ecorePackage.getEBoolean(), "ephermeral", null, 0, 1, ZNode.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_CreationId(), ecorePackage.getELong(), "creationId", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_ModifiedId(), ecorePackage.getELong(), "modifiedId", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_CreationTime(), ecorePackage.getELong(), "creationTime", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_ModifiedTime(), ecorePackage.getELong(), "modifiedTime", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_Version(), ecorePackage.getEInt(), "version", "-1", 0, 1, ZNode.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_ChildrenVersion(), ecorePackage.getEInt(), "childrenVersion", "-1", 0, 1, ZNode.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_AclVersion(), ecorePackage.getEInt(), "aclVersion", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_EphermalOwnerSessionId(), ecorePackage.getELong(), "ephermalOwnerSessionId", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_DataLength(), ecorePackage.getEInt(), "dataLength", "-1", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_ChildrenCount(), ecorePackage.getEInt(), "childrenCount", "0", 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getZNode_Parent(), this.getZNode(), null, "parent", null, 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_NodeName(), ecorePackage.getEString(), "nodeName", null, 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getZNode_Sequential(), ecorePackage.getEBoolean(), "sequential", null, 0, 1, ZNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ addEOperation(zNodeEClass, ecorePackage.getEString(), "getPath", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(zNodeEClass, this.getZooKeeperServer(), "getServer", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(serverStatusEEnum, ServerStatus.class, "ServerStatus");
+ addEEnumLiteral(serverStatusEEnum, ServerStatus.NO_PROJECT);
+ addEEnumLiteral(serverStatusEEnum, ServerStatus.DISCONNECTED);
+ addEEnumLiteral(serverStatusEEnum, ServerStatus.CONNECTED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //HadoopPackageImpl
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServerImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServerImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServerImpl.java
new file mode 100644
index 0000000..c74e513
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServerImpl.java
@@ -0,0 +1,395 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+import org.apache.hdt.core.internal.model.HadoopPackage;
+import org.apache.hdt.core.internal.model.Server;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Server</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServerImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServerImpl#getUri <em>Uri</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServerImpl#getStatusCode <em>Status Code</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServerImpl#getStatusMessage <em>Status Message</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServerImpl#getLastAccessed <em>Last Accessed</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class ServerImpl extends EObjectImpl implements Server {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = "";
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected static final String URI_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUri()
+ * @generated
+ * @ordered
+ */
+ protected String uri = URI_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getStatusCode() <em>Status Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStatusCode()
+ * @generated
+ * @ordered
+ */
+ protected static final int STATUS_CODE_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getStatusCode() <em>Status Code</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStatusCode()
+ * @generated
+ * @ordered
+ */
+ protected int statusCode = STATUS_CODE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getStatusMessage() <em>Status Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStatusMessage()
+ * @generated
+ * @ordered
+ */
+ protected static final String STATUS_MESSAGE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getStatusMessage() <em>Status Message</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStatusMessage()
+ * @generated
+ * @ordered
+ */
+ protected String statusMessage = STATUS_MESSAGE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLastAccessed() <em>Last Accessed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastAccessed()
+ * @generated
+ * @ordered
+ */
+ protected static final long LAST_ACCESSED_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getLastAccessed() <em>Last Accessed</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLastAccessed()
+ * @generated
+ * @ordered
+ */
+ protected long lastAccessed = LAST_ACCESSED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ServerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return HadoopPackage.Literals.SERVER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVER__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getUri() {
+ return uri;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUri(String newUri) {
+ String oldUri = uri;
+ uri = newUri;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVER__URI, oldUri, uri));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusCode(int newStatusCode) {
+ int oldStatusCode = statusCode;
+ statusCode = newStatusCode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVER__STATUS_CODE, oldStatusCode, statusCode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusMessage(String newStatusMessage) {
+ String oldStatusMessage = statusMessage;
+ statusMessage = newStatusMessage;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVER__STATUS_MESSAGE, oldStatusMessage, statusMessage));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getLastAccessed() {
+ return lastAccessed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLastAccessed(long newLastAccessed) {
+ long oldLastAccessed = lastAccessed;
+ lastAccessed = newLastAccessed;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVER__LAST_ACCESSED, oldLastAccessed, lastAccessed));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HadoopPackage.SERVER__NAME:
+ return getName();
+ case HadoopPackage.SERVER__URI:
+ return getUri();
+ case HadoopPackage.SERVER__STATUS_CODE:
+ return getStatusCode();
+ case HadoopPackage.SERVER__STATUS_MESSAGE:
+ return getStatusMessage();
+ case HadoopPackage.SERVER__LAST_ACCESSED:
+ return getLastAccessed();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HadoopPackage.SERVER__NAME:
+ setName((String)newValue);
+ return;
+ case HadoopPackage.SERVER__URI:
+ setUri((String)newValue);
+ return;
+ case HadoopPackage.SERVER__STATUS_CODE:
+ setStatusCode((Integer)newValue);
+ return;
+ case HadoopPackage.SERVER__STATUS_MESSAGE:
+ setStatusMessage((String)newValue);
+ return;
+ case HadoopPackage.SERVER__LAST_ACCESSED:
+ setLastAccessed((Long)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.SERVER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case HadoopPackage.SERVER__URI:
+ setUri(URI_EDEFAULT);
+ return;
+ case HadoopPackage.SERVER__STATUS_CODE:
+ setStatusCode(STATUS_CODE_EDEFAULT);
+ return;
+ case HadoopPackage.SERVER__STATUS_MESSAGE:
+ setStatusMessage(STATUS_MESSAGE_EDEFAULT);
+ return;
+ case HadoopPackage.SERVER__LAST_ACCESSED:
+ setLastAccessed(LAST_ACCESSED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.SERVER__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case HadoopPackage.SERVER__URI:
+ return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri);
+ case HadoopPackage.SERVER__STATUS_CODE:
+ return statusCode != STATUS_CODE_EDEFAULT;
+ case HadoopPackage.SERVER__STATUS_MESSAGE:
+ return STATUS_MESSAGE_EDEFAULT == null ? statusMessage != null : !STATUS_MESSAGE_EDEFAULT.equals(statusMessage);
+ case HadoopPackage.SERVER__LAST_ACCESSED:
+ return lastAccessed != LAST_ACCESSED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", uri: ");
+ result.append(uri);
+ result.append(", statusCode: ");
+ result.append(statusCode);
+ result.append(", statusMessage: ");
+ result.append(statusMessage);
+ result.append(", lastAccessed: ");
+ result.append(lastAccessed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ServerImpl
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServersImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServersImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServersImpl.java
new file mode 100644
index 0000000..d51b0fa
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ServersImpl.java
@@ -0,0 +1,271 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+import java.util.Collection;
+
+import org.apache.hdt.core.internal.model.HDFSServer;
+import org.apache.hdt.core.internal.model.HadoopPackage;
+import org.apache.hdt.core.internal.model.Servers;
+import org.apache.hdt.core.internal.model.ZooKeeperServer;
+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.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Servers</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServersImpl#getHdfsServers <em>Hdfs Servers</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServersImpl#getVersion <em>Version</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ServersImpl#getZookeeperServers <em>Zookeeper Servers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ServersImpl extends EObjectImpl implements Servers {
+ /**
+ * The cached value of the '{@link #getHdfsServers() <em>Hdfs Servers</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHdfsServers()
+ * @generated
+ * @ordered
+ */
+ protected EList<HDFSServer> hdfsServers;
+
+ /**
+ * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected static final String VERSION_EDEFAULT = "1.0.0.0";
+
+ /**
+ * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected String version = VERSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getZookeeperServers() <em>Zookeeper Servers</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getZookeeperServers()
+ * @generated
+ * @ordered
+ */
+ protected EList<ZooKeeperServer> zookeeperServers;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ServersImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return HadoopPackage.Literals.SERVERS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<HDFSServer> getHdfsServers() {
+ if (hdfsServers == null) {
+ hdfsServers = new EObjectContainmentEList<HDFSServer>(HDFSServer.class, this, HadoopPackage.SERVERS__HDFS_SERVERS);
+ }
+ return hdfsServers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVersion(String newVersion) {
+ String oldVersion = version;
+ version = newVersion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.SERVERS__VERSION, oldVersion, version));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ZooKeeperServer> getZookeeperServers() {
+ if (zookeeperServers == null) {
+ zookeeperServers = new EObjectContainmentEList<ZooKeeperServer>(ZooKeeperServer.class, this, HadoopPackage.SERVERS__ZOOKEEPER_SERVERS);
+ }
+ return zookeeperServers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case HadoopPackage.SERVERS__HDFS_SERVERS:
+ return ((InternalEList<?>)getHdfsServers()).basicRemove(otherEnd, msgs);
+ case HadoopPackage.SERVERS__ZOOKEEPER_SERVERS:
+ return ((InternalEList<?>)getZookeeperServers()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HadoopPackage.SERVERS__HDFS_SERVERS:
+ return getHdfsServers();
+ case HadoopPackage.SERVERS__VERSION:
+ return getVersion();
+ case HadoopPackage.SERVERS__ZOOKEEPER_SERVERS:
+ return getZookeeperServers();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HadoopPackage.SERVERS__HDFS_SERVERS:
+ getHdfsServers().clear();
+ getHdfsServers().addAll((Collection<? extends HDFSServer>)newValue);
+ return;
+ case HadoopPackage.SERVERS__VERSION:
+ setVersion((String)newValue);
+ return;
+ case HadoopPackage.SERVERS__ZOOKEEPER_SERVERS:
+ getZookeeperServers().clear();
+ getZookeeperServers().addAll((Collection<? extends ZooKeeperServer>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.SERVERS__HDFS_SERVERS:
+ getHdfsServers().clear();
+ return;
+ case HadoopPackage.SERVERS__VERSION:
+ setVersion(VERSION_EDEFAULT);
+ return;
+ case HadoopPackage.SERVERS__ZOOKEEPER_SERVERS:
+ getZookeeperServers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.SERVERS__HDFS_SERVERS:
+ return hdfsServers != null && !hdfsServers.isEmpty();
+ case HadoopPackage.SERVERS__VERSION:
+ return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version);
+ case HadoopPackage.SERVERS__ZOOKEEPER_SERVERS:
+ return zookeeperServers != null && !zookeeperServers.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (version: ");
+ result.append(version);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ServersImpl
http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ZNodeImpl.java
----------------------------------------------------------------------
diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ZNodeImpl.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ZNodeImpl.java
new file mode 100644
index 0000000..c339e70
--- /dev/null
+++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/model/impl/ZNodeImpl.java
@@ -0,0 +1,1017 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.hdt.core.internal.model.impl;
+
+import java.util.Collection;
+
+import org.apache.hdt.core.internal.model.HadoopPackage;
+import org.apache.hdt.core.internal.model.ZNode;
+import org.apache.hdt.core.internal.model.ZNodeType;
+import org.apache.hdt.core.internal.model.ZooKeeperServer;
+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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '
+ * <em><b>ZNode</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getLastRefresh <em>Last Refresh</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#isRefreshing <em>Refreshing</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#isEphermeral <em>Ephermeral</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getCreationId <em>Creation Id</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getModifiedId <em>Modified Id</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getCreationTime <em>Creation Time</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getModifiedTime <em>Modified Time</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getVersion <em>Version</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getChildrenVersion <em>Children Version</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getAclVersion <em>Acl Version</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getEphermalOwnerSessionId <em>Ephermal Owner Session Id</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getDataLength <em>Data Length</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getChildrenCount <em>Children Count</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#getNodeName <em>Node Name</em>}</li>
+ * <li>{@link org.apache.hdt.core.internal.model.impl.ZNodeImpl#isSequential <em>Sequential</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ZNodeImpl extends EObjectImpl implements ZNode {
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<ZNode> children;
+
+ /**
+ * The default value of the '{@link #getLastRefresh() <em>Last Refresh</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getLastRefresh()
+ * @generated
+ * @ordered
+ */
+ protected static final long LAST_REFRESH_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getLastRefresh() <em>Last Refresh</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getLastRefresh()
+ * @generated
+ * @ordered
+ */
+ protected long lastRefresh = LAST_REFRESH_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isRefreshing() <em>Refreshing</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #isRefreshing()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean REFRESHING_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isRefreshing() <em>Refreshing</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #isRefreshing()
+ * @generated
+ * @ordered
+ */
+ protected boolean refreshing = REFRESHING_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isEphermeral() <em>Ephermeral</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isEphermeral()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean EPHERMERAL_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isEphermeral() <em>Ephermeral</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isEphermeral()
+ * @generated
+ * @ordered
+ */
+ protected boolean ephermeral = EPHERMERAL_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCreationId() <em>Creation Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getCreationId()
+ * @generated
+ * @ordered
+ */
+ protected static final long CREATION_ID_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getCreationId() <em>Creation Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getCreationId()
+ * @generated
+ * @ordered
+ */
+ protected long creationId = CREATION_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getModifiedId() <em>Modified Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getModifiedId()
+ * @generated
+ * @ordered
+ */
+ protected static final long MODIFIED_ID_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getModifiedId() <em>Modified Id</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getModifiedId()
+ * @generated
+ * @ordered
+ */
+ protected long modifiedId = MODIFIED_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getCreationTime() <em>Creation Time</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getCreationTime()
+ * @generated
+ * @ordered
+ */
+ protected static final long CREATION_TIME_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getCreationTime() <em>Creation Time</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getCreationTime()
+ * @generated
+ * @ordered
+ */
+ protected long creationTime = CREATION_TIME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getModifiedTime() <em>Modified Time</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getModifiedTime()
+ * @generated
+ * @ordered
+ */
+ protected static final long MODIFIED_TIME_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getModifiedTime() <em>Modified Time</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getModifiedTime()
+ * @generated
+ * @ordered
+ */
+ protected long modifiedTime = MODIFIED_TIME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected static final int VERSION_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getVersion() <em>Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getVersion()
+ * @generated
+ * @ordered
+ */
+ protected int version = VERSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getChildrenVersion() <em>Children Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getChildrenVersion()
+ * @generated
+ * @ordered
+ */
+ protected static final int CHILDREN_VERSION_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getChildrenVersion() <em>Children Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getChildrenVersion()
+ * @generated
+ * @ordered
+ */
+ protected int childrenVersion = CHILDREN_VERSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAclVersion() <em>Acl Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getAclVersion()
+ * @generated
+ * @ordered
+ */
+ protected static final int ACL_VERSION_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getAclVersion() <em>Acl Version</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getAclVersion()
+ * @generated
+ * @ordered
+ */
+ protected int aclVersion = ACL_VERSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getEphermalOwnerSessionId() <em>Ephermal Owner Session Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEphermalOwnerSessionId()
+ * @generated
+ * @ordered
+ */
+ protected static final long EPHERMAL_OWNER_SESSION_ID_EDEFAULT = -1L;
+
+ /**
+ * The cached value of the '{@link #getEphermalOwnerSessionId() <em>Ephermal Owner Session Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEphermalOwnerSessionId()
+ * @generated
+ * @ordered
+ */
+ protected long ephermalOwnerSessionId = EPHERMAL_OWNER_SESSION_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDataLength() <em>Data Length</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getDataLength()
+ * @generated
+ * @ordered
+ */
+ protected static final int DATA_LENGTH_EDEFAULT = -1;
+
+ /**
+ * The cached value of the '{@link #getDataLength() <em>Data Length</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getDataLength()
+ * @generated
+ * @ordered
+ */
+ protected int dataLength = DATA_LENGTH_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getChildrenCount() <em>Children Count</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getChildrenCount()
+ * @generated
+ * @ordered
+ */
+ protected static final int CHILDREN_COUNT_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getChildrenCount() <em>Children Count</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getChildrenCount()
+ * @generated
+ * @ordered
+ */
+ protected int childrenCount = CHILDREN_COUNT_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getParent() <em>Parent</em>}' reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getParent()
+ * @generated
+ * @ordered
+ */
+ protected ZNode parent;
+
+ /**
+ * The default value of the '{@link #getNodeName() <em>Node Name</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getNodeName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NODE_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNodeName() <em>Node Name</em>}' attribute.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see #getNodeName()
+ * @generated
+ * @ordered
+ */
+ protected String nodeName = NODE_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isSequential() <em>Sequential</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSequential()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean SEQUENTIAL_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isSequential() <em>Sequential</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSequential()
+ * @generated
+ * @ordered
+ */
+ protected boolean sequential = SEQUENTIAL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected ZNodeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return HadoopPackage.Literals.ZNODE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ZNode> getChildren() {
+ if (children == null) {
+ children = new EObjectContainmentEList<ZNode>(ZNode.class, this, HadoopPackage.ZNODE__CHILDREN);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getLastRefresh() {
+ return lastRefresh;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLastRefresh(long newLastRefresh) {
+ long oldLastRefresh = lastRefresh;
+ lastRefresh = newLastRefresh;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__LAST_REFRESH, oldLastRefresh, lastRefresh));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isRefreshing() {
+ return refreshing;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRefreshing(boolean newRefreshing) {
+ boolean oldRefreshing = refreshing;
+ refreshing = newRefreshing;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__REFRESHING, oldRefreshing, refreshing));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isEphermeral() {
+ return ephermeral;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEphermeral(boolean newEphermeral) {
+ boolean oldEphermeral = ephermeral;
+ ephermeral = newEphermeral;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__EPHERMERAL, oldEphermeral, ephermeral));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getCreationId() {
+ return creationId;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCreationId(long newCreationId) {
+ long oldCreationId = creationId;
+ creationId = newCreationId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__CREATION_ID, oldCreationId, creationId));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getModifiedId() {
+ return modifiedId;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setModifiedId(long newModifiedId) {
+ long oldModifiedId = modifiedId;
+ modifiedId = newModifiedId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__MODIFIED_ID, oldModifiedId, modifiedId));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getCreationTime() {
+ return creationTime;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCreationTime(long newCreationTime) {
+ long oldCreationTime = creationTime;
+ creationTime = newCreationTime;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__CREATION_TIME, oldCreationTime, creationTime));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getModifiedTime() {
+ return modifiedTime;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setModifiedTime(long newModifiedTime) {
+ long oldModifiedTime = modifiedTime;
+ modifiedTime = newModifiedTime;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__MODIFIED_TIME, oldModifiedTime, modifiedTime));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getVersion() {
+ return version;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setVersion(int newVersion) {
+ int oldVersion = version;
+ version = newVersion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__VERSION, oldVersion, version));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getChildrenVersion() {
+ return childrenVersion;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setChildrenVersion(int newChildrenVersion) {
+ int oldChildrenVersion = childrenVersion;
+ childrenVersion = newChildrenVersion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__CHILDREN_VERSION, oldChildrenVersion, childrenVersion));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getAclVersion() {
+ return aclVersion;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAclVersion(int newAclVersion) {
+ int oldAclVersion = aclVersion;
+ aclVersion = newAclVersion;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__ACL_VERSION, oldAclVersion, aclVersion));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public long getEphermalOwnerSessionId() {
+ return ephermalOwnerSessionId;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEphermalOwnerSessionId(long newEphermalOwnerSessionId) {
+ long oldEphermalOwnerSessionId = ephermalOwnerSessionId;
+ ephermalOwnerSessionId = newEphermalOwnerSessionId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__EPHERMAL_OWNER_SESSION_ID, oldEphermalOwnerSessionId, ephermalOwnerSessionId));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getDataLength() {
+ return dataLength;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDataLength(int newDataLength) {
+ int oldDataLength = dataLength;
+ dataLength = newDataLength;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__DATA_LENGTH, oldDataLength, dataLength));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public int getChildrenCount() {
+ return childrenCount;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setChildrenCount(int newChildrenCount) {
+ int oldChildrenCount = childrenCount;
+ childrenCount = newChildrenCount;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__CHILDREN_COUNT, oldChildrenCount, childrenCount));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ZNode getParent() {
+ if (parent != null && parent.eIsProxy()) {
+ InternalEObject oldParent = (InternalEObject)parent;
+ parent = (ZNode)eResolveProxy(oldParent);
+ if (parent != oldParent) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, HadoopPackage.ZNODE__PARENT, oldParent, parent));
+ }
+ }
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ZNode basicGetParent() {
+ return parent;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(ZNode newParent) {
+ ZNode oldParent = parent;
+ parent = newParent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__PARENT, oldParent, parent));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getNodeName() {
+ return nodeName;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNodeName(String newNodeName) {
+ String oldNodeName = nodeName;
+ nodeName = newNodeName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__NODE_NAME, oldNodeName, nodeName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSequential() {
+ return sequential;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSequential(boolean newSequential) {
+ boolean oldSequential = sequential;
+ sequential = newSequential;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, HadoopPackage.ZNODE__SEQUENTIAL, oldSequential, sequential));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public ZooKeeperServer getServer() {
+ if(this instanceof org.apache.hdt.core.internal.model.ZooKeeperServer)
+ return (org.apache.hdt.core.internal.model.ZooKeeperServer) this;
+ else
+ return getParent().getServer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPath() {
+ if (this instanceof org.apache.hdt.core.internal.model.ZooKeeperServer)
+ return "/";
+ else {
+ String parentPath = getParent().getPath();
+ return parentPath.endsWith("/") ? parentPath + getNodeName() : parentPath + "/" + getNodeName();
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case HadoopPackage.ZNODE__CHILDREN:
+ return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case HadoopPackage.ZNODE__CHILDREN:
+ return getChildren();
+ case HadoopPackage.ZNODE__LAST_REFRESH:
+ return getLastRefresh();
+ case HadoopPackage.ZNODE__REFRESHING:
+ return isRefreshing();
+ case HadoopPackage.ZNODE__EPHERMERAL:
+ return isEphermeral();
+ case HadoopPackage.ZNODE__CREATION_ID:
+ return getCreationId();
+ case HadoopPackage.ZNODE__MODIFIED_ID:
+ return getModifiedId();
+ case HadoopPackage.ZNODE__CREATION_TIME:
+ return getCreationTime();
+ case HadoopPackage.ZNODE__MODIFIED_TIME:
+ return getModifiedTime();
+ case HadoopPackage.ZNODE__VERSION:
+ return getVersion();
+ case HadoopPackage.ZNODE__CHILDREN_VERSION:
+ return getChildrenVersion();
+ case HadoopPackage.ZNODE__ACL_VERSION:
+ return getAclVersion();
+ case HadoopPackage.ZNODE__EPHERMAL_OWNER_SESSION_ID:
+ return getEphermalOwnerSessionId();
+ case HadoopPackage.ZNODE__DATA_LENGTH:
+ return getDataLength();
+ case HadoopPackage.ZNODE__CHILDREN_COUNT:
+ return getChildrenCount();
+ case HadoopPackage.ZNODE__PARENT:
+ if (resolve) return getParent();
+ return basicGetParent();
+ case HadoopPackage.ZNODE__NODE_NAME:
+ return getNodeName();
+ case HadoopPackage.ZNODE__SEQUENTIAL:
+ return isSequential();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case HadoopPackage.ZNODE__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends ZNode>)newValue);
+ return;
+ case HadoopPackage.ZNODE__LAST_REFRESH:
+ setLastRefresh((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__REFRESHING:
+ setRefreshing((Boolean)newValue);
+ return;
+ case HadoopPackage.ZNODE__EPHERMERAL:
+ setEphermeral((Boolean)newValue);
+ return;
+ case HadoopPackage.ZNODE__CREATION_ID:
+ setCreationId((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__MODIFIED_ID:
+ setModifiedId((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__CREATION_TIME:
+ setCreationTime((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__MODIFIED_TIME:
+ setModifiedTime((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__VERSION:
+ setVersion((Integer)newValue);
+ return;
+ case HadoopPackage.ZNODE__CHILDREN_VERSION:
+ setChildrenVersion((Integer)newValue);
+ return;
+ case HadoopPackage.ZNODE__ACL_VERSION:
+ setAclVersion((Integer)newValue);
+ return;
+ case HadoopPackage.ZNODE__EPHERMAL_OWNER_SESSION_ID:
+ setEphermalOwnerSessionId((Long)newValue);
+ return;
+ case HadoopPackage.ZNODE__DATA_LENGTH:
+ setDataLength((Integer)newValue);
+ return;
+ case HadoopPackage.ZNODE__CHILDREN_COUNT:
+ setChildrenCount((Integer)newValue);
+ return;
+ case HadoopPackage.ZNODE__PARENT:
+ setParent((ZNode)newValue);
+ return;
+ case HadoopPackage.ZNODE__NODE_NAME:
+ setNodeName((String)newValue);
+ return;
+ case HadoopPackage.ZNODE__SEQUENTIAL:
+ setSequential((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.ZNODE__CHILDREN:
+ getChildren().clear();
+ return;
+ case HadoopPackage.ZNODE__LAST_REFRESH:
+ setLastRefresh(LAST_REFRESH_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__REFRESHING:
+ setRefreshing(REFRESHING_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__EPHERMERAL:
+ setEphermeral(EPHERMERAL_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__CREATION_ID:
+ setCreationId(CREATION_ID_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__MODIFIED_ID:
+ setModifiedId(MODIFIED_ID_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__CREATION_TIME:
+ setCreationTime(CREATION_TIME_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__MODIFIED_TIME:
+ setModifiedTime(MODIFIED_TIME_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__VERSION:
+ setVersion(VERSION_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__CHILDREN_VERSION:
+ setChildrenVersion(CHILDREN_VERSION_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__ACL_VERSION:
+ setAclVersion(ACL_VERSION_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__EPHERMAL_OWNER_SESSION_ID:
+ setEphermalOwnerSessionId(EPHERMAL_OWNER_SESSION_ID_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__DATA_LENGTH:
+ setDataLength(DATA_LENGTH_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__CHILDREN_COUNT:
+ setChildrenCount(CHILDREN_COUNT_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__PARENT:
+ setParent((ZNode)null);
+ return;
+ case HadoopPackage.ZNODE__NODE_NAME:
+ setNodeName(NODE_NAME_EDEFAULT);
+ return;
+ case HadoopPackage.ZNODE__SEQUENTIAL:
+ setSequential(SEQUENTIAL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case HadoopPackage.ZNODE__CHILDREN:
+ return children != null && !children.isEmpty();
+ case HadoopPackage.ZNODE__LAST_REFRESH:
+ return lastRefresh != LAST_REFRESH_EDEFAULT;
+ case HadoopPackage.ZNODE__REFRESHING:
+ return refreshing != REFRESHING_EDEFAULT;
+ case HadoopPackage.ZNODE__EPHERMERAL:
+ return ephermeral != EPHERMERAL_EDEFAULT;
+ case HadoopPackage.ZNODE__CREATION_ID:
+ return creationId != CREATION_ID_EDEFAULT;
+ case HadoopPackage.ZNODE__MODIFIED_ID:
+ return modifiedId != MODIFIED_ID_EDEFAULT;
+ case HadoopPackage.ZNODE__CREATION_TIME:
+ return creationTime != CREATION_TIME_EDEFAULT;
+ case HadoopPackage.ZNODE__MODIFIED_TIME:
+ return modifiedTime != MODIFIED_TIME_EDEFAULT;
+ case HadoopPackage.ZNODE__VERSION:
+ return version != VERSION_EDEFAULT;
+ case HadoopPackage.ZNODE__CHILDREN_VERSION:
+ return childrenVersion != CHILDREN_VERSION_EDEFAULT;
+ case HadoopPackage.ZNODE__ACL_VERSION:
+ return aclVersion != ACL_VERSION_EDEFAULT;
+ case HadoopPackage.ZNODE__EPHERMAL_OWNER_SESSION_ID:
+ return ephermalOwnerSessionId != EPHERMAL_OWNER_SESSION_ID_EDEFAULT;
+ case HadoopPackage.ZNODE__DATA_LENGTH:
+ return dataLength != DATA_LENGTH_EDEFAULT;
+ case HadoopPackage.ZNODE__CHILDREN_COUNT:
+ return childrenCount != CHILDREN_COUNT_EDEFAULT;
+ case HadoopPackage.ZNODE__PARENT:
+ return parent != null;
+ case HadoopPackage.ZNODE__NODE_NAME:
+ return NODE_NAME_EDEFAULT == null ? nodeName != null : !NODE_NAME_EDEFAULT.equals(nodeName);
+ case HadoopPackage.ZNODE__SEQUENTIAL:
+ return sequential != SEQUENTIAL_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (lastRefresh: ");
+ result.append(lastRefresh);
+ result.append(", refreshing: ");
+ result.append(refreshing);
+ result.append(", ephermeral: ");
+ result.append(ephermeral);
+ result.append(", creationId: ");
+ result.append(creationId);
+ result.append(", modifiedId: ");
+ result.append(modifiedId);
+ result.append(", creationTime: ");
+ result.append(creationTime);
+ result.append(", modifiedTime: ");
+ result.append(modifiedTime);
+ result.append(", version: ");
+ result.append(version);
+ result.append(", childrenVersion: ");
+ result.append(childrenVersion);
+ result.append(", aclVersion: ");
+ result.append(aclVersion);
+ result.append(", ephermalOwnerSessionId: ");
+ result.append(ephermalOwnerSessionId);
+ result.append(", dataLength: ");
+ result.append(dataLength);
+ result.append(", childrenCount: ");
+ result.append(childrenCount);
+ result.append(", nodeName: ");
+ result.append(nodeName);
+ result.append(", sequential: ");
+ result.append(sequential);
+ result.append(')');
+ return result.toString();
+ }
+
+} // ZNodeImpl