📄 generalization.java
字号:
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: XELOPES Data Mining Library
* Description: The XELOPES library is an open platform-independent and data-source-independent library for Embedded Data Mining.
* Copyright: Copyright (c) 2002 Prudential Systems Software GmbH
* Company: ZSoft (www.zsoft.ru), Prudsys (www.prudsys.com)
* @author Valentine Stepanenko (ValentineStepanenko@zsoft.ru)
* @version 1.0
*/
package com.prudsys.pdm.Cwm.Relationships;
import com.prudsys.pdm.Cwm.Core.Classifier;
import com.prudsys.pdm.Cwm.Core.ModelElement;
/**
* A generalization is a taxonomic relationship between a more general element and
* a more specific element. The more specific element is fully consistent with the
* more general element (it has all of its properties, members, and relationships)
* and may contain additional information.
*
*
*
* In the metamodel, a Generalization is a directed inheritance relationship,
* uniting a Classifier with a more general Classifier in a hierarchy.
* Generalization is a subtyping relationship; that is, an instance of the more
* general ("parent") Classifier may be substituted by an instance of the more
* specific ("child") Classifier.
*
*
*
* To understand inheritance fully, it is necessary to understand the concept of a
* full descriptor and a segment descriptor. A full descriptor is the full
* description needed to describe an instance of a metamodel object. It contains a
* description of all of the
*
* attributes, associations, and operations that the object contains.
*
*
*
* In a pre-object-oriented language, the full descriptor of a data structure was
* declared directly in its entirety. In an object-oriented language, the
* description of an object is built out of incremental segments that are combined
* using inheritance to produce a full descriptor for an object. The segments are
* the modeling elements that are actually declared in a model. Each classifier
* contains a list of features and other relationships that it adds to what it
* inherits from its ancestors. The mechanism of inheritance defines how full
* descriptors are produced from a set of segments connected by
* generalization.The full descriptors are implicit, but they define the structure
* of actual instances. Features of a classifier that have private visibility are
* not visible to descendants of the classifier.
*
*
*
* If a classifier has no parent, then its full descriptor is the same as its
* segment descriptor. If a classifier has one or more parents, then its full
* descriptor contains the union of the features from its own segment descriptor
* and the segment descriptors of all of its ancestors. No attribute, operation,
* or association end with the same signature may be declared in more than one of
* the segments (in other words, they may not be redefined). A method may be
* declared in more than one segment. A method declared in any segment supersedes
* and replaces a method with the same signature declared in any ancestor. If two
* or more methods nevertheless remain, then they conflict and the model is
* ill-formed. The constraints on the full descriptor are the union of the
* constraints on the segment itself and all of its ancestors. If any of them are
* inconsistent, then the model is ill-formed.
*
*
*
* In any full descriptor for a classifier, each method must have a corresponding
* operation. In a concrete classifier, each operation in its full descriptor must
* have a corresponding method in the full descriptor.
*/
public class Generalization extends ModelElement implements org.omg.cwm.objectmodel.relationships.Generalization
{
public Classifier child;
public Classifier parent;
public Generalization()
{
}
public org.omg.cwm.objectmodel.core.Classifier getChild() {
return child;
}
public void setChild(org.omg.cwm.objectmodel.core.Classifier child) {
this.child = (Classifier) child;
}
public org.omg.cwm.objectmodel.core.Classifier getParent() {
return parent;
}
public void setParent(org.omg.cwm.objectmodel.core.Classifier parent) {
this.parent = (Classifier) parent;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -