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

org.w3.rdfs.impl.RDFLiteralImpl 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.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.w3.rdfs.RDFLiteral;
import org.w3.rdfs.RdfsPackage;

/**
 * 
 * An implementation of the model object 'RDF Literal'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.w3.rdfs.impl.RDFLiteralImpl#getTextValue Text Value}
  • *
* * @generated */ public class RDFLiteralImpl extends MinimalEObjectImpl.Container implements RDFLiteral { /** * The default value of the '{@link #getTextValue() Text Value}' attribute. * * * @see #getTextValue() * @generated * @ordered */ protected static final String TEXT_VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getTextValue() Text Value}' attribute. * * * @see #getTextValue() * @generated * @ordered */ protected String textValue = TEXT_VALUE_EDEFAULT; /** * * * @generated */ protected RDFLiteralImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return RdfsPackage.Literals.RDF_LITERAL; } /** * * * @generated */ @Override public String getTextValue() { return textValue; } /** * * * @generated */ @Override public void setTextValue(String newTextValue) { String oldTextValue = textValue; textValue = newTextValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, RdfsPackage.RDF_LITERAL__TEXT_VALUE, oldTextValue, textValue)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case RdfsPackage.RDF_LITERAL__TEXT_VALUE: return getTextValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case RdfsPackage.RDF_LITERAL__TEXT_VALUE: setTextValue((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case RdfsPackage.RDF_LITERAL__TEXT_VALUE: setTextValue(TEXT_VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case RdfsPackage.RDF_LITERAL__TEXT_VALUE: return TEXT_VALUE_EDEFAULT == null ? textValue != null : !TEXT_VALUE_EDEFAULT.equals(textValue); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (textValue: "); result.append(textValue); result.append(')'); return result.toString(); } } //RDFLiteralImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy