
org.w3.owl.impl.ObjectPropertyImpl 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.owl.impl;
import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
import org.eclipse.uml2.uml.ObjectNodeOrderingKind;
import org.w3.owl.ObjectProperty;
import org.w3.owl.OwlPackage;
import org.w3.rdfs.impl.RDFDatatypeImpl;
/**
*
* An implementation of the model object 'Object Property'.
*
*
* The following features are implemented:
*
*
* - {@link org.w3.owl.impl.ObjectPropertyImpl#getPropertyChainAxiom Property Chain Axiom}
*
*
* @generated
*/
public class ObjectPropertyImpl extends RDFDatatypeImpl implements ObjectProperty {
/**
* The cached value of the '{@link #getPropertyChainAxiom() Property Chain Axiom}' attribute list.
*
*
* @see #getPropertyChainAxiom()
* @generated
* @ordered
*/
protected EList propertyChainAxiom;
/**
*
*
* @generated
*/
protected ObjectPropertyImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return OwlPackage.Literals.OBJECT_PROPERTY;
}
/**
*
*
* @generated
*/
@Override
public EList getPropertyChainAxiom() {
if (propertyChainAxiom == null) {
propertyChainAxiom = new EDataTypeUniqueEList(ObjectNodeOrderingKind.class, this, OwlPackage.OBJECT_PROPERTY__PROPERTY_CHAIN_AXIOM);
}
return propertyChainAxiom;
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case OwlPackage.OBJECT_PROPERTY__PROPERTY_CHAIN_AXIOM:
return getPropertyChainAxiom();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case OwlPackage.OBJECT_PROPERTY__PROPERTY_CHAIN_AXIOM:
getPropertyChainAxiom().clear();
getPropertyChainAxiom().addAll((Collection extends ObjectNodeOrderingKind>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case OwlPackage.OBJECT_PROPERTY__PROPERTY_CHAIN_AXIOM:
getPropertyChainAxiom().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case OwlPackage.OBJECT_PROPERTY__PROPERTY_CHAIN_AXIOM:
return propertyChainAxiom != null && !propertyChainAxiom.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (propertyChainAxiom: ");
result.append(propertyChainAxiom);
result.append(')');
return result.toString();
}
} //ObjectPropertyImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy