⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 derivedfield.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
		_objLogarithmic = null;
		_objExponential = null;
		_objReciprocal = null;
		_objRoot = null;
		_objSquare = null;
		_objNumerization = null;
		_objCreateVirtualAttribute = null;
	}
	/**
	 * Gets Numerization object.
	 */
	public Numerization getNumerization()
	{
		return _objNumerization;
	}

	/**
	 * Replaces the existing Numerization object with a new object.
	 * If you pass in a null value to this method, the Numerization object is
	 * cleared and will not be marshaled.
	 * @param obj	A new object.
	 */
	public void setNumerization(Numerization obj)
	{
		this._objNumerization = obj;
		if( obj == null )
            return;

        obj._setParent(this);
		_objConstant = null;
		_objFieldRef = null;
		_objNormContinuous = null;
		_objNormDiscrete = null;
		_objDiscretize = null;
		_objMapValues = null;
		_objMapValuesNum = null;
		_objAggregate = null;
		_objLogarithmic = null;
		_objExponential = null;
		_objReciprocal = null;
		_objRoot = null;
		_objSquare = null;
		_objCategorization = null;
		_objCreateVirtualAttribute = null;
	}
	/**
	 * Gets CreateVirtualAttribute object.
	 */
	public CreateVirtualAttribute getCreateVirtualAttribute()
	{
		return _objCreateVirtualAttribute;
	}

	/**
	 * Replaces the existing CreateVirtualAttribute object with a new object.
	 * If you pass in a null value to this method, the CreateVirtualAttribute object is
	 * cleared and will not be marshaled.
	 * @param obj	A new object.
	 */
	public void setCreateVirtualAttribute(CreateVirtualAttribute obj)
	{
		this._objCreateVirtualAttribute = obj;
		if( obj == null )
            return;

        obj._setParent(this);
		_objConstant = null;
		_objFieldRef = null;
		_objNormContinuous = null;
		_objNormDiscrete = null;
		_objDiscretize = null;
		_objMapValues = null;
		_objMapValuesNum = null;
		_objAggregate = null;
		_objLogarithmic = null;
		_objExponential = null;
		_objReciprocal = null;
		_objRoot = null;
		_objSquare = null;
		_objCategorization = null;
		_objNumerization = null;
	}

	/**
	 * Marshals this object to an element.
	 */
	public com.borland.xml.toolkit.Element marshal()
	{
		com.borland.xml.toolkit.Element elem = new com.borland.xml.toolkit.Element(get_TagName());
		/** Marshals "removeSourceAtt" attribute */
		elem.addAttribute(removeSourceAtt.marshal());
		/** Marshals "displayName" attribute */
		elem.addAttribute(displayName.marshal());
		/** Marshals "name" attribute */
		elem.addAttribute(name.marshal());
		/** Marshals a list of Extension objects to elements */
		Iterator it1 = _objExtension.iterator();
		while( it1.hasNext() )
		{
			Extension obj = (Extension)it1.next();
			if( obj != null )
				elem.addContent(obj.marshal());
		}
		/** Marshals a Constant object to an element */
		if( _objConstant != null )
			elem.addContent(_objConstant.marshal());
		/** Marshals a FieldRef object to an element */
		if( _objFieldRef != null )
			elem.addContent(_objFieldRef.marshal());
		/** Marshals a NormContinuous object to an element */
		if( _objNormContinuous != null )
			elem.addContent(_objNormContinuous.marshal());
		/** Marshals a NormDiscrete object to an element */
		if( _objNormDiscrete != null )
			elem.addContent(_objNormDiscrete.marshal());
		/** Marshals a Discretize object to an element */
		if( _objDiscretize != null )
			elem.addContent(_objDiscretize.marshal());
		/** Marshals a MapValues object to an element */
		if( _objMapValues != null )
			elem.addContent(_objMapValues.marshal());
		/** Marshals a MapValuesNum object to an element */
		if( _objMapValuesNum != null )
			elem.addContent(_objMapValuesNum.marshal());
		/** Marshals a Aggregate object to an element */
		if( _objAggregate != null )
			elem.addContent(_objAggregate.marshal());
		/** Marshals a Logarithmic object to an element */
		if( _objLogarithmic != null )
			elem.addContent(_objLogarithmic.marshal());
		/** Marshals a Exponential object to an element */
		if( _objExponential != null )
			elem.addContent(_objExponential.marshal());
		/** Marshals a Reciprocal object to an element */
		if( _objReciprocal != null )
			elem.addContent(_objReciprocal.marshal());
		/** Marshals a Root object to an element */
		if( _objRoot != null )
			elem.addContent(_objRoot.marshal());
		/** Marshals a Square object to an element */
		if( _objSquare != null )
			elem.addContent(_objSquare.marshal());
		/** Marshals a Categorization object to an element */
		if( _objCategorization != null )
			elem.addContent(_objCategorization.marshal());
		/** Marshals a Numerization object to an element */
		if( _objNumerization != null )
			elem.addContent(_objNumerization.marshal());
		/** Marshals a CreateVirtualAttribute object to an element */
		if( _objCreateVirtualAttribute != null )
			elem.addContent(_objCreateVirtualAttribute.marshal());

		return elem;
	}

	/**
	 * Unmarshals the specified "DerivedField" element back to a DerivedField object.
	 */
	public static DerivedField unmarshal(com.borland.xml.toolkit.Element elem)
	{
		if( elem == null )
			return null;

		DerivedField __objDerivedField = new DerivedField();
		if( __objDerivedField != null ) //found the element?
		{
			/** Unmarshals "removeSourceAtt" attribute */
			__objDerivedField.removeSourceAtt.setValue(elem.getAttribute("removeSourceAtt"));
			/** Unmarshals "displayName" attribute */
			__objDerivedField.displayName.setValue(elem.getAttribute("displayName"));
			/** Unmarshals "name" attribute */
			__objDerivedField.name.setValue(elem.getAttribute("name"));
		}
		/** Unmarshals a list of "<<_tagName_>>" elements back to Extension objects. */
		Iterator it1 = elem.getChildren(Extension._tagName).iterator();
		while( it1.hasNext() )
			__objDerivedField.addExtension(Extension.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
		/** Unmarshals an element back to a Constant object */
		__objDerivedField.setConstant(Constant.unmarshal(elem.getChild(Constant._tagName)));
		/** Unmarshals an element back to a FieldRef object */
		__objDerivedField.setFieldRef(FieldRef.unmarshal(elem.getChild(FieldRef._tagName)));
		/** Unmarshals an element back to a NormContinuous object */
		__objDerivedField.setNormContinuous(NormContinuous.unmarshal(elem.getChild(NormContinuous._tagName)));
		/** Unmarshals an element back to a NormDiscrete object */
		__objDerivedField.setNormDiscrete(NormDiscrete.unmarshal(elem.getChild(NormDiscrete._tagName)));
		/** Unmarshals an element back to a Discretize object */
		__objDerivedField.setDiscretize(Discretize.unmarshal(elem.getChild(Discretize._tagName)));
		/** Unmarshals an element back to a MapValues object */
		__objDerivedField.setMapValues(MapValues.unmarshal(elem.getChild(MapValues._tagName)));
		/** Unmarshals an element back to a MapValuesNum object */
		__objDerivedField.setMapValuesNum(MapValuesNum.unmarshal(elem.getChild(MapValuesNum._tagName)));
		/** Unmarshals an element back to a Aggregate object */
		__objDerivedField.setAggregate(Aggregate.unmarshal(elem.getChild(Aggregate._tagName)));
		/** Unmarshals an element back to a Logarithmic object */
		__objDerivedField.setLogarithmic(Logarithmic.unmarshal(elem.getChild(Logarithmic._tagName)));
		/** Unmarshals an element back to a Exponential object */
		__objDerivedField.setExponential(Exponential.unmarshal(elem.getChild(Exponential._tagName)));
		/** Unmarshals an element back to a Reciprocal object */
		__objDerivedField.setReciprocal(Reciprocal.unmarshal(elem.getChild(Reciprocal._tagName)));
		/** Unmarshals an element back to a Root object */
		__objDerivedField.setRoot(Root.unmarshal(elem.getChild(Root._tagName)));
		/** Unmarshals an element back to a Square object */
		__objDerivedField.setSquare(Square.unmarshal(elem.getChild(Square._tagName)));
		/** Unmarshals an element back to a Categorization object */
		__objDerivedField.setCategorization(Categorization.unmarshal(elem.getChild(Categorization._tagName)));
		/** Unmarshals an element back to a Numerization object */
		__objDerivedField.setNumerization(Numerization.unmarshal(elem.getChild(Numerization._tagName)));
		/** Unmarshals an element back to a CreateVirtualAttribute object */
		__objDerivedField.setCreateVirtualAttribute(CreateVirtualAttribute.unmarshal(elem.getChild(CreateVirtualAttribute._tagName)));

		return __objDerivedField;
	}

	/**
	 * Validates this object. If you pass <code>true</code> to this method, it
	 * checks for the first error and stops. On the other hand, if you pass
	 * <code>false</code> to this method, it collects all the errors by
	 * visiting every available elements.
	 * @param firstError	<code>true</code> to exit this method when the first error
	 * is found; <code>false</code> to collect all errors.
	 * @return com.borland.xml.toolkit.ErrorList	A list that contains one or more errors.
	 * @see com.borland.xml.toolkit.XmlObject#validate()
	 * @see com.borland.xml.toolkit.XmlObject#isValid()
	 * @see com.borland.xml.toolkit.ErrorList
	 */
	public com.borland.xml.toolkit.ErrorList validate(boolean firstError)
	{
		com.borland.xml.toolkit.ErrorList errors = new com.borland.xml.toolkit.ErrorList();

		/** Extension is zero or more */
		Iterator it1 = _objExtension.iterator();
		while( it1.hasNext() )
		{
			Extension obj = (Extension)it1.next();
			if( obj != null )
			{
				errors.add(obj.validate(firstError));
				if( firstError && errors.size() > 0 )
					return errors;
			}
		}
		/** "or" block */
		if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null || _objReciprocal != null || _objRoot != null || _objSquare != null || _objCategorization != null || _objNumerization != null )
		{
			/** "or" block */
			if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null || _objReciprocal != null || _objRoot != null || _objSquare != null || _objCategorization != null )
			{
				/** "or" block */
				if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null || _objReciprocal != null || _objRoot != null || _objSquare != null )
				{
					/** "or" block */
					if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null || _objReciprocal != null || _objRoot != null )
					{
						/** "or" block */
						if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null || _objReciprocal != null )
						{
							/** "or" block */
							if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null || _objExponential != null )
							{
								/** "or" block */
								if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null || _objLogarithmic != null )
								{
									/** "or" block */
									if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null || _objAggregate != null )
									{
										/** "or" block */
										if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null || _objMapValuesNum != null )
										{
											/** "or" block */
											if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null || _objMapValues != null )
											{
												/** "or" block */
												if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null || _objDiscretize != null )
												{
													/** "or" block */
													if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null )
													{
														/** "or" block */
														if( _objConstant != null || _objFieldRef != null || _objNormContinuous != null )
														{
															/** "or" block */
															if( _objConstant != null || _objFieldRef != null )
															{
																/** "or" block */
																if( _objConstant != null )
																{
																	/** Constant is mandatory */
																	if( _objConstant != null )
																		errors.add(_objConstant.validate(firstError));
																	else
																		errors.add(new com.borland.xml.toolkit.ElementError(this, Constant.class));
																	if( firstError && errors.size() > 0 )
																		return errors;
																}
																if( _objFieldRef != null )
																{
																	/** FieldRef is mandatory */
																	if( _objFieldRef != null )
																		errors.add(_objFieldRef.validate(firstError));
																	else
																		errors.add(new com.borland.xml.toolkit.ElementError(this, FieldRef.class));
																	if( firstError && errors.size() > 0 )
																		return errors;
																}
																if( !(_objConstant != null) && !(_objFieldRef != null) )   /** missing one or more elements? */
																{
																	com.borland.xml.toolkit.OrErrorList errors1 = new com.borland.xml.toolkit.OrErrorList();
																	errors1.add(new com.borland.xml.toolkit.ElementError(this, Constant.class));
																	errors1.add(new com.borland.xml.toolkit.ElementError(this, FieldRef.class));
																	errors.add(errors1);
					if( firstError && errors.size() > 0 )
						return errors;
																}
															}
															if( _objNormContinuous != null )
															{
																/** NormContinuous is mandatory */
																if( _objNormContinuous != null )
																	errors.add(_objNormContinuous.validate(firstError));
																else
																	errors.add(new com.borland.xml.toolkit.ElementError(this, NormContinuous.class));
																if( firstError && errors.size() > 0 )
																	return errors;
															}
															if( !(_objConstant != null || _objFieldRef != null) && !(_objNormContinuous != null) )   /** missing one or more elements? */
															{
																com.borland.xml.toolkit.OrErrorList errors1 = new com.borland.xml.toolkit.OrErrorList();
																errors1.add(new com.borland.xml.toolkit.ElementError(this, Constant.class));
																errors1.add(new com.borland.xml.toolkit.ElementError(this, FieldRef.class));
																errors1.add(new com.borland.xml.toolkit.ElementError(this, NormContinuous.class));
																errors.add(errors1);
					if( firstError && errors.size() > 0 )
						return errors;
															}
														}
														if( _objNormDiscrete != null )
														{
															/** NormDiscrete is mandatory */
															if( _objNormDiscrete != null )
																errors.add(_objNormDiscrete.validate(firstError));
															else
																errors.add(new com.borland.xml.toolkit.ElementError(this, NormDiscrete.class));
															if( firstError && errors.size() > 0 )
																return errors;
														}
														if( !(_objConstant != null || _objFieldRef != null || _objNormContinuous != null) && !(_objNormDiscrete != null) )   /** missing one or more elements? */
														{
															com.borland.xml.toolkit.OrErrorList errors1 = new com.borland.xml.toolkit.OrErrorList();
															errors1.add(new com.borland.xml.toolkit.ElementError(this, Constant.class));
															errors1.add(new com.borland.xml.toolkit.ElementError(this, FieldRef.class));
															errors1.add(new com.borland.xml.toolkit.ElementError(this, NormContinuous.class));
															errors1.add(new com.borland.xml.toolkit.ElementError(this, NormDiscrete.class));
															errors.add(errors1);
					if( firstError && errors.size() > 0 )
						return errors;
														}
													}
													if( _objDiscretize != null )
													{
														/** Discretize is mandatory */
														if( _objDiscretize != null )
															errors.add(_objDiscretize.validate(firstError));
														else
															errors.add(new com.borland.xml.toolkit.ElementError(this, Discretize.class));
														if( firstError && errors.size() > 0 )
															return errors;
													}
													if( !(_objConstant != null || _objFieldRef != null || _objNormContinuous != null || _objNormDiscrete != null) && !(_objDiscretize != null) )   /** missing one or more elements? */
													{
														com.borland.xml.toolkit.OrErrorList errors1 = new com.borland.xml.toolkit.OrErrorList();
														errors1.add(new com.borland.xml.toolkit.ElementError(this, Constant.class));
														errors1.add(new com.borland.xml.toolkit.ElementError(this, FieldRef.class));
														errors1.add(new com.borland.xml.toolkit.ElementError(this, NormContinuous.class));
														errors1.add(new com.borland.xml.toolkit.ElementError(this, NormDiscrete.class));
														errors1.add(new com.borland.xml.toolkit.ElementError(this, Discretize.class));
														errors.add(errors1);
					if( firstError && errors.size() > 0 )
						return errors;
													}
												}
												if( _objMapValues != null )
												{
													/** MapValues is mandatory */
													if( _objMapValues != null )
														errors.add(_objMapValues.validate(firstError));
													else
														errors.add(new com.borland.xml.toolkit.ElementError(this, MapValues.class));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -