All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.drools.impl.DocumentRootImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 */
package org.jboss.drools.impl;

import com.google.gwt.user.client.rpc.GwtTransient;

import java.math.BigInteger;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EMap;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
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.impl.EStringToStringMapEntryImpl;

import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;

import org.jboss.drools.DocumentRoot;
import org.jboss.drools.DroolsPackage;
import org.jboss.drools.GlobalType;
import org.jboss.drools.ImportType;
import org.jboss.drools.MetaDataType;
import org.jboss.drools.OnEntryScriptType;
import org.jboss.drools.OnExitScriptType;

/**
 * 
 * An implementation of the model object 'Document Root'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getMixed Mixed}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getXMLNSPrefixMap XMLNS Prefix Map}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getXSISchemaLocation XSI Schema Location}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getGlobal Global}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getImport Import}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getMetaData Meta Data}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getOnEntryScript On Entry Script}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getOnExitScript On Exit Script}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getPackageName Package Name}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getPriority Priority}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getRuleFlowGroup Rule Flow Group}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getTaskName Task Name}
  • *
  • {@link org.jboss.drools.impl.DocumentRootImpl#getVersion Version}
  • *
* * @generated */ public class DocumentRootImpl extends EObjectImpl implements DocumentRoot { /** * The cached value of the '{@link #getMixed() Mixed}' attribute list. * * * @see #getMixed() * @generated * @ordered */ @GwtTransient protected FeatureMap mixed; /** * The cached value of the '{@link #getXMLNSPrefixMap() XMLNS Prefix Map}' map. * * * @see #getXMLNSPrefixMap() * @generated * @ordered */ @GwtTransient protected EMap xMLNSPrefixMap; /** * The cached value of the '{@link #getXSISchemaLocation() XSI Schema Location}' map. * * * @see #getXSISchemaLocation() * @generated * @ordered */ @GwtTransient protected EMap xSISchemaLocation; /** * The default value of the '{@link #getPackageName() Package Name}' attribute. * * * @see #getPackageName() * @generated * @ordered */ protected static final String PACKAGE_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getPackageName() Package Name}' attribute. * * * @see #getPackageName() * @generated * @ordered */ @GwtTransient protected String packageName = PACKAGE_NAME_EDEFAULT; /** * The default value of the '{@link #getPriority() Priority}' attribute. * * * @see #getPriority() * @generated * @ordered */ protected static final BigInteger PRIORITY_EDEFAULT = null; /** * The cached value of the '{@link #getPriority() Priority}' attribute. * * * @see #getPriority() * @generated * @ordered */ @GwtTransient protected BigInteger priority = PRIORITY_EDEFAULT; /** * The default value of the '{@link #getRuleFlowGroup() Rule Flow Group}' attribute. * * * @see #getRuleFlowGroup() * @generated * @ordered */ protected static final String RULE_FLOW_GROUP_EDEFAULT = null; /** * The cached value of the '{@link #getRuleFlowGroup() Rule Flow Group}' attribute. * * * @see #getRuleFlowGroup() * @generated * @ordered */ @GwtTransient protected String ruleFlowGroup = RULE_FLOW_GROUP_EDEFAULT; /** * The default value of the '{@link #getTaskName() Task Name}' attribute. * * * @see #getTaskName() * @generated * @ordered */ protected static final String TASK_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getTaskName() Task Name}' attribute. * * * @see #getTaskName() * @generated * @ordered */ @GwtTransient protected String taskName = TASK_NAME_EDEFAULT; /** * The default value of the '{@link #getVersion() Version}' attribute. * * * @see #getVersion() * @generated * @ordered */ protected static final String VERSION_EDEFAULT = null; /** * The cached value of the '{@link #getVersion() Version}' attribute. * * * @see #getVersion() * @generated * @ordered */ @GwtTransient protected String version = VERSION_EDEFAULT; /** * * * @generated */ protected DocumentRootImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DroolsPackage.Literals.DOCUMENT_ROOT; } /** * * * @generated */ @Override public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, DroolsPackage.DOCUMENT_ROOT__MIXED); } return mixed; } /** * * * @generated */ @Override public EMap getXMLNSPrefixMap() { if (xMLNSPrefixMap == null) { xMLNSPrefixMap = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); } return xMLNSPrefixMap; } /** * * * @generated */ @Override public EMap getXSISchemaLocation() { if (xSISchemaLocation == null) { xSISchemaLocation = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); } return xSISchemaLocation; } /** * * * @generated */ @Override public GlobalType getGlobal() { return (GlobalType)getMixed().get(DroolsPackage.Literals.DOCUMENT_ROOT__GLOBAL, true); } /** * * * @generated */ public NotificationChain basicSetGlobal(GlobalType newGlobal, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(DroolsPackage.Literals.DOCUMENT_ROOT__GLOBAL, newGlobal, msgs); } /** * * * @generated */ @Override public void setGlobal(GlobalType newGlobal) { ((FeatureMap.Internal)getMixed()).set(DroolsPackage.Literals.DOCUMENT_ROOT__GLOBAL, newGlobal); } /** * * * @generated */ @Override public ImportType getImport() { return (ImportType)getMixed().get(DroolsPackage.Literals.DOCUMENT_ROOT__IMPORT, true); } /** * * * @generated */ public NotificationChain basicSetImport(ImportType newImport, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(DroolsPackage.Literals.DOCUMENT_ROOT__IMPORT, newImport, msgs); } /** * * * @generated */ @Override public void setImport(ImportType newImport) { ((FeatureMap.Internal)getMixed()).set(DroolsPackage.Literals.DOCUMENT_ROOT__IMPORT, newImport); } /** * * * @generated */ @Override public MetaDataType getMetaData() { return (MetaDataType)getMixed().get(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, true); } /** * * * @generated */ public NotificationChain basicSetMetaData(MetaDataType newMetaData, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, newMetaData, msgs); } /** * * * @generated */ @Override public void setMetaData(MetaDataType newMetaData) { ((FeatureMap.Internal)getMixed()).set(DroolsPackage.Literals.DOCUMENT_ROOT__META_DATA, newMetaData); } /** * * * @generated */ @Override public OnEntryScriptType getOnEntryScript() { return (OnEntryScriptType)getMixed().get(DroolsPackage.Literals.DOCUMENT_ROOT__ON_ENTRY_SCRIPT, true); } /** * * * @generated */ public NotificationChain basicSetOnEntryScript(OnEntryScriptType newOnEntryScript, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(DroolsPackage.Literals.DOCUMENT_ROOT__ON_ENTRY_SCRIPT, newOnEntryScript, msgs); } /** * * * @generated */ @Override public void setOnEntryScript(OnEntryScriptType newOnEntryScript) { ((FeatureMap.Internal)getMixed()).set(DroolsPackage.Literals.DOCUMENT_ROOT__ON_ENTRY_SCRIPT, newOnEntryScript); } /** * * * @generated */ @Override public OnExitScriptType getOnExitScript() { return (OnExitScriptType)getMixed().get(DroolsPackage.Literals.DOCUMENT_ROOT__ON_EXIT_SCRIPT, true); } /** * * * @generated */ public NotificationChain basicSetOnExitScript(OnExitScriptType newOnExitScript, NotificationChain msgs) { return ((FeatureMap.Internal)getMixed()).basicAdd(DroolsPackage.Literals.DOCUMENT_ROOT__ON_EXIT_SCRIPT, newOnExitScript, msgs); } /** * * * @generated */ @Override public void setOnExitScript(OnExitScriptType newOnExitScript) { ((FeatureMap.Internal)getMixed()).set(DroolsPackage.Literals.DOCUMENT_ROOT__ON_EXIT_SCRIPT, newOnExitScript); } /** * * * @generated */ @Override public String getPackageName() { return packageName; } /** * * * @generated */ @Override public void setPackageName(String newPackageName) { String oldPackageName = packageName; packageName = newPackageName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.DOCUMENT_ROOT__PACKAGE_NAME, oldPackageName, packageName)); } /** * * * @generated */ @Override public BigInteger getPriority() { return priority; } /** * * * @generated */ @Override public void setPriority(BigInteger newPriority) { BigInteger oldPriority = priority; priority = newPriority; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.DOCUMENT_ROOT__PRIORITY, oldPriority, priority)); } /** * * * @generated */ @Override public String getRuleFlowGroup() { return ruleFlowGroup; } /** * * * @generated */ @Override public void setRuleFlowGroup(String newRuleFlowGroup) { String oldRuleFlowGroup = ruleFlowGroup; ruleFlowGroup = newRuleFlowGroup; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.DOCUMENT_ROOT__RULE_FLOW_GROUP, oldRuleFlowGroup, ruleFlowGroup)); } /** * * * @generated */ @Override public String getTaskName() { return taskName; } /** * * * @generated */ @Override public void setTaskName(String newTaskName) { String oldTaskName = taskName; taskName = newTaskName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.DOCUMENT_ROOT__TASK_NAME, oldTaskName, taskName)); } /** * * * @generated */ @Override public String getVersion() { return version; } /** * * * @generated */ @Override public void setVersion(String newVersion) { String oldVersion = version; version = newVersion; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.DOCUMENT_ROOT__VERSION, oldVersion, version)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DroolsPackage.DOCUMENT_ROOT__MIXED: return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return ((InternalEList)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); case DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return ((InternalEList)getXSISchemaLocation()).basicRemove(otherEnd, msgs); case DroolsPackage.DOCUMENT_ROOT__GLOBAL: return basicSetGlobal(null, msgs); case DroolsPackage.DOCUMENT_ROOT__IMPORT: return basicSetImport(null, msgs); case DroolsPackage.DOCUMENT_ROOT__META_DATA: return basicSetMetaData(null, msgs); case DroolsPackage.DOCUMENT_ROOT__ON_ENTRY_SCRIPT: return basicSetOnEntryScript(null, msgs); case DroolsPackage.DOCUMENT_ROOT__ON_EXIT_SCRIPT: return basicSetOnExitScript(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DroolsPackage.DOCUMENT_ROOT__MIXED: if (coreType) return getMixed(); return ((FeatureMap.Internal)getMixed()).getWrapper(); case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: if (coreType) return getXMLNSPrefixMap(); else return getXMLNSPrefixMap().map(); case DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: if (coreType) return getXSISchemaLocation(); else return getXSISchemaLocation().map(); case DroolsPackage.DOCUMENT_ROOT__GLOBAL: return getGlobal(); case DroolsPackage.DOCUMENT_ROOT__IMPORT: return getImport(); case DroolsPackage.DOCUMENT_ROOT__META_DATA: return getMetaData(); case DroolsPackage.DOCUMENT_ROOT__ON_ENTRY_SCRIPT: return getOnEntryScript(); case DroolsPackage.DOCUMENT_ROOT__ON_EXIT_SCRIPT: return getOnExitScript(); case DroolsPackage.DOCUMENT_ROOT__PACKAGE_NAME: return getPackageName(); case DroolsPackage.DOCUMENT_ROOT__PRIORITY: return getPriority(); case DroolsPackage.DOCUMENT_ROOT__RULE_FLOW_GROUP: return getRuleFlowGroup(); case DroolsPackage.DOCUMENT_ROOT__TASK_NAME: return getTaskName(); case DroolsPackage.DOCUMENT_ROOT__VERSION: return getVersion(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DroolsPackage.DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal)getMixed()).set(newValue); return; case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); return; case DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); return; case DroolsPackage.DOCUMENT_ROOT__GLOBAL: setGlobal((GlobalType)newValue); return; case DroolsPackage.DOCUMENT_ROOT__IMPORT: setImport((ImportType)newValue); return; case DroolsPackage.DOCUMENT_ROOT__META_DATA: setMetaData((MetaDataType)newValue); return; case DroolsPackage.DOCUMENT_ROOT__ON_ENTRY_SCRIPT: setOnEntryScript((OnEntryScriptType)newValue); return; case DroolsPackage.DOCUMENT_ROOT__ON_EXIT_SCRIPT: setOnExitScript((OnExitScriptType)newValue); return; case DroolsPackage.DOCUMENT_ROOT__PACKAGE_NAME: setPackageName((String)newValue); return; case DroolsPackage.DOCUMENT_ROOT__PRIORITY: setPriority((BigInteger)newValue); return; case DroolsPackage.DOCUMENT_ROOT__RULE_FLOW_GROUP: setRuleFlowGroup((String)newValue); return; case DroolsPackage.DOCUMENT_ROOT__TASK_NAME: setTaskName((String)newValue); return; case DroolsPackage.DOCUMENT_ROOT__VERSION: setVersion((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DroolsPackage.DOCUMENT_ROOT__MIXED: getMixed().clear(); return; case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: getXMLNSPrefixMap().clear(); return; case DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: getXSISchemaLocation().clear(); return; case DroolsPackage.DOCUMENT_ROOT__GLOBAL: setGlobal((GlobalType)null); return; case DroolsPackage.DOCUMENT_ROOT__IMPORT: setImport((ImportType)null); return; case DroolsPackage.DOCUMENT_ROOT__META_DATA: setMetaData((MetaDataType)null); return; case DroolsPackage.DOCUMENT_ROOT__ON_ENTRY_SCRIPT: setOnEntryScript((OnEntryScriptType)null); return; case DroolsPackage.DOCUMENT_ROOT__ON_EXIT_SCRIPT: setOnExitScript((OnExitScriptType)null); return; case DroolsPackage.DOCUMENT_ROOT__PACKAGE_NAME: setPackageName(PACKAGE_NAME_EDEFAULT); return; case DroolsPackage.DOCUMENT_ROOT__PRIORITY: setPriority(PRIORITY_EDEFAULT); return; case DroolsPackage.DOCUMENT_ROOT__RULE_FLOW_GROUP: setRuleFlowGroup(RULE_FLOW_GROUP_EDEFAULT); return; case DroolsPackage.DOCUMENT_ROOT__TASK_NAME: setTaskName(TASK_NAME_EDEFAULT); return; case DroolsPackage.DOCUMENT_ROOT__VERSION: setVersion(VERSION_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DroolsPackage.DOCUMENT_ROOT__MIXED: return mixed != null && !mixed.isEmpty(); case DroolsPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); case DroolsPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); case DroolsPackage.DOCUMENT_ROOT__GLOBAL: return getGlobal() != null; case DroolsPackage.DOCUMENT_ROOT__IMPORT: return getImport() != null; case DroolsPackage.DOCUMENT_ROOT__META_DATA: return getMetaData() != null; case DroolsPackage.DOCUMENT_ROOT__ON_ENTRY_SCRIPT: return getOnEntryScript() != null; case DroolsPackage.DOCUMENT_ROOT__ON_EXIT_SCRIPT: return getOnExitScript() != null; case DroolsPackage.DOCUMENT_ROOT__PACKAGE_NAME: return PACKAGE_NAME_EDEFAULT == null ? packageName != null : !PACKAGE_NAME_EDEFAULT.equals(packageName); case DroolsPackage.DOCUMENT_ROOT__PRIORITY: return PRIORITY_EDEFAULT == null ? priority != null : !PRIORITY_EDEFAULT.equals(priority); case DroolsPackage.DOCUMENT_ROOT__RULE_FLOW_GROUP: return RULE_FLOW_GROUP_EDEFAULT == null ? ruleFlowGroup != null : !RULE_FLOW_GROUP_EDEFAULT.equals(ruleFlowGroup); case DroolsPackage.DOCUMENT_ROOT__TASK_NAME: return TASK_NAME_EDEFAULT == null ? taskName != null : !TASK_NAME_EDEFAULT.equals(taskName); case DroolsPackage.DOCUMENT_ROOT__VERSION: return VERSION_EDEFAULT == null ? version != null : !VERSION_EDEFAULT.equals(version); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (mixed: "); result.append(mixed); result.append(", packageName: "); result.append(packageName); result.append(", priority: "); result.append(priority); result.append(", ruleFlowGroup: "); result.append(ruleFlowGroup); result.append(", taskName: "); result.append(taskName); result.append(", version: "); result.append(version); result.append(')'); return result.toString(); } } //DocumentRootImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy