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

org.w3.rdf.impl.IRIImpl 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.rdf.impl;

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

import org.eclipse.emf.ecore.EClass;

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

import org.w3.rdf.IRI;
import org.w3.rdf.RdfPackage;

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

* The following features are implemented: *

*
    *
  • {@link org.w3.rdf.impl.IRIImpl#getIri Iri}
  • *
* * @generated */ public class IRIImpl extends MinimalEObjectImpl.Container implements IRI { /** * The default value of the '{@link #getIri() Iri}' attribute. * * * @see #getIri() * @generated * @ordered */ protected static final String IRI_EDEFAULT = null; /** * The cached value of the '{@link #getIri() Iri}' attribute. * * * @see #getIri() * @generated * @ordered */ protected String iri = IRI_EDEFAULT; /** * * * @generated */ protected IRIImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RdfPackage.Literals.IRI; } /** * * * @generated */ @Override public String getIri() { return iri; } /** * * * @generated */ @Override public void setIri(String newIri) { String oldIri = iri; iri = newIri; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdfPackage.IRI__IRI, oldIri, iri)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RdfPackage.IRI__IRI: return getIri(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RdfPackage.IRI__IRI: setIri((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RdfPackage.IRI__IRI: setIri(IRI_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RdfPackage.IRI__IRI: return IRI_EDEFAULT == null ? iri != null : !IRI_EDEFAULT.equals(iri); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (iri: "); result.append(iri); result.append(')'); return result.toString(); } } //IRIImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy