📄 typemapping.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 (valentine.stepanenko@zsoft.ru)
* @version 1.0
*/
package com.prudsys.pdm.Cwm.TypeMapping;
import com.prudsys.pdm.Cwm.Core.Classifier;
import com.prudsys.pdm.Cwm.Core.ModelElement;
/**
* TypeMapping instances permit the creation of mappings between data types
* defined within different environments and are used to indicate data type
* compatibilities that permit direct assignment of values from one environment
* (the "source" type) into equivalent values in another environment (the "target"
* type). For example, an integer field data type in a record-oriented DBMS (the
* source type) might be mapped to a compatible integer data type in a relational
* DBMS (the target type).
*
*
*
* Whereas the actual transfer of data values between environments is accomplished
* using the CWM?s Transformation package, TypeMapping instances can be used the
* identify both the permissible and preferred mappings between data types. Value
* interchange between a pair of data types is considered permissible if a
* TypeMapping instance is defined for the pair. A TypeMapping instance is
* considered the preferred mapping if the instance?s isBestMatch attribute has
* the value true.
*
*
*
* Typically, there will be one TypeMapping Instance between a pair of data types
* that is considered the preferred mapping. To promote flexible use of this
* feature, there is no requirement that a preferred TypeMapping instance must be
* identified between a pair of data types nor are multiple preferred instances
* prohibited. In these latter cases, however, the precise semantics are
* usage-defined.
*
*
*
* Interchange between data types defined by non-preferred mappings may often
* function as intended. However, the isLossy boolean may be set to indicate that
* such interchanges may be subject to validity restrictions in certain
* circumstances. For example, it may be valid to move data values from a 32-bit
* integer data type to a 16-bit integer data type as long as the actual values in
* the 32-bit underlying data type do not exceed the range permitted for 16-bit
* integers. The CWM Foundation leaves the understanding and handling of such
* differences to individual tools. If such differences must be modeled, consider
* using the CWM Transformation package to filter data values during interchange.
*
*
*
* TypeMapping instances are unidirectional, so two instances are required to show
* that a data type pair can be mutually interchanged between environments.
*/
public class TypeMapping extends ModelElement implements org.omg.cwm.foundation.typemapping.TypeMapping
{
/**
* True if this TypeMapping instance represents the best available mapping between
* a pair of data types in different software systems.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isBestMatch;
/**
* True if this TypeMapping instance may result in a data conversion error if the
* source data is within certain ranges. For example, storing a 32-bit unsigned
* integer value into a 16-bit unsigned integer container will result in a data
* conversion error only when the source data has a value greater than 65535.
*/
public com.prudsys.pdm.Cwm.Core.Boolean isLossy;
public Classifier sourceType;
public Classifier targetType;
public TypeMapping()
{
}
public java.lang.Boolean getIsBestMatch() {
return isBestMatch.getBoolean();
}
public void setIsBestMatch(java.lang.Boolean isBestMatch) {
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isBestMatch);
this.isBestMatch = b;
}
public boolean isBestMatchValue() {
return isBestMatch.isBooleanValue();
}
public void setIsBestMatch(boolean value) {
this.setIsBestMatch( new java.lang.Boolean(value) );
}
public java.lang.Boolean getIsLossy() {
return isLossy.getBoolean();
}
public void setIsLossy(java.lang.Boolean isLossy) {
com.prudsys.pdm.Cwm.Core.Boolean b = new com.prudsys.pdm.Cwm.Core.Boolean();
b.setBoolean(isLossy);
this.isLossy = b;
}
public boolean isLossyValue() {
return isLossy.isBooleanValue();
}
public void setIsLossy(boolean value) {
this.setIsLossy( new java.lang.Boolean(value) );
}
public org.omg.cwm.objectmodel.core.Classifier getSourceType() {
return sourceType;
}
public void setSourceType(org.omg.cwm.objectmodel.core.Classifier sourceType) {
this.sourceType = (Classifier) sourceType;
}
public org.omg.cwm.objectmodel.core.Classifier getTargetType() {
return targetType;
}
public void setTargetType(org.omg.cwm.objectmodel.core.Classifier targetType) {
this.targetType = (Classifier) targetType;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -