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

org.w3.rdfs.impl.RangeImpl Maven / Gradle / Ivy

/*
 * Copyright (c) 2012 - 2024 Data In Motion and others.
 * All rights reserved. 
 * 
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 * 
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 *      Mark Hoffmann - initial API and implementation
 */
package org.w3.rdfs.impl;

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

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.w3.rdf.RDFProperty;

import org.w3.rdfs.RDFClass;
import org.w3.rdfs.Range;
import org.w3.rdfs.RdfsPackage;

/**
 * 
 * An implementation of the model object 'Range'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.w3.rdfs.impl.RangeImpl#getProperty Property}
  • *
  • {@link org.w3.rdfs.impl.RangeImpl#getRange Range}
  • *
* * @generated */ public class RangeImpl extends MinimalEObjectImpl.Container implements Range { /** * The cached value of the '{@link #getProperty() Property}' reference. * * * @see #getProperty() * @generated * @ordered */ protected RDFProperty property; /** * The cached value of the '{@link #getRange() Range}' reference. * * * @see #getRange() * @generated * @ordered */ protected RDFClass range; /** * * * @generated */ protected RangeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RdfsPackage.Literals.RANGE; } /** * * * @generated */ @Override public RDFProperty getProperty() { if (property != null && property.eIsProxy()) { InternalEObject oldProperty = (InternalEObject)property; property = (RDFProperty)eResolveProxy(oldProperty); if (property != oldProperty) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, RdfsPackage.RANGE__PROPERTY, oldProperty, property)); } } return property; } /** * * * @generated */ public RDFProperty basicGetProperty() { return property; } /** * * * @generated */ @Override public void setProperty(RDFProperty newProperty) { RDFProperty oldProperty = property; property = newProperty; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdfsPackage.RANGE__PROPERTY, oldProperty, property)); } /** * * * @generated */ @Override public RDFClass getRange() { if (range != null && range.eIsProxy()) { InternalEObject oldRange = (InternalEObject)range; range = (RDFClass)eResolveProxy(oldRange); if (range != oldRange) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, RdfsPackage.RANGE__RANGE, oldRange, range)); } } return range; } /** * * * @generated */ public RDFClass basicGetRange() { return range; } /** * * * @generated */ @Override public void setRange(RDFClass newRange) { RDFClass oldRange = range; range = newRange; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdfsPackage.RANGE__RANGE, oldRange, range)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RdfsPackage.RANGE__PROPERTY: if (resolve) return getProperty(); return basicGetProperty(); case RdfsPackage.RANGE__RANGE: if (resolve) return getRange(); return basicGetRange(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RdfsPackage.RANGE__PROPERTY: setProperty((RDFProperty)newValue); return; case RdfsPackage.RANGE__RANGE: setRange((RDFClass)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RdfsPackage.RANGE__PROPERTY: setProperty((RDFProperty)null); return; case RdfsPackage.RANGE__RANGE: setRange((RDFClass)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RdfsPackage.RANGE__PROPERTY: return property != null; case RdfsPackage.RANGE__RANGE: return range != null; } return super.eIsSet(featureID); } } //RangeImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy