📄 algorithmspecification.java
字号:
/**
* This file is generated by BorlandXML.
*/
package com.prudsys.pdm.Utils.AlgorithmSpecification;
import java.util.*;
/**
* The AlgorithmSpecification class represents the element "AlgorithmSpecification" with the content
* model defined as follows:
* <p>
* <!ELEMENT AlgorithmSpecification (AlgorithmParameter)*><br>
*/
public class AlgorithmSpecification extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "AlgorithmSpecification";
/** Defines a function attribute */
public com.borland.xml.toolkit.Attribute function = new com.borland.xml.toolkit.Attribute("function", "(StatisticalAnalysis | FeatureSelection | AssociationRules | Classification | Clustering | Regression)", "REQUIRED", "");
/** Defines a version attribute */
public com.borland.xml.toolkit.Attribute version = new com.borland.xml.toolkit.Attribute("version", "CDATA", "REQUIRED", "");
/** Defines a algorithm attribute */
public com.borland.xml.toolkit.Attribute algorithm = new com.borland.xml.toolkit.Attribute("algorithm", "(decisionTree | neuralNetwork | naiveBayes | selfOrganizingMap | centerBasedClustering | distributionBasedClustering | associationRules | polynomialRegression | radialBasisFunction | ruleBasedClassification | principalComponentAnalysis | factorAnalysis | bivariateAnalysis | descriptiveAnalysis | geneticAlgorithm)", "REQUIRED", "");
/** Defines a name attribute */
public com.borland.xml.toolkit.Attribute name = new com.borland.xml.toolkit.Attribute("name", "CDATA", "REQUIRED", "");
/** Defines a description attribute */
public com.borland.xml.toolkit.Attribute description = new com.borland.xml.toolkit.Attribute("description", "CDATA", "IMPLIED", "");
/** Defines a classname attribute */
public com.borland.xml.toolkit.Attribute classname = new com.borland.xml.toolkit.Attribute("classname", "CDATA", "REQUIRED", "");
/** Defines a list of AlgorithmParameter objects. */
protected ArrayList _objAlgorithmParameter = new ArrayList();
/**
* Creates an empty AlgorithmSpecification object
*/
public AlgorithmSpecification()
{
super();
}
/**
* Gets the value of "function" attribute.
*/
public String getFunction()
{
return function.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setFunction(String value_)
{
function.setValue(value_ );
}
/**
* Gets the value of "version" attribute.
*/
public String getVersion()
{
return version.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setVersion(String value_)
{
version.setValue(value_ );
}
/**
* Gets the value of "algorithm" attribute.
*/
public String getAlgorithm()
{
return algorithm.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setAlgorithm(String value_)
{
algorithm.setValue(value_ );
}
/**
* Gets the value of "name" attribute.
*/
public String getName()
{
return name.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setName(String value_)
{
name.setValue(value_ );
}
/**
* Gets the value of "description" attribute.
*/
public String getDescription()
{
return description.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setDescription(String value_)
{
description.setValue(value_ );
}
/**
* Gets the value of "classname" attribute.
*/
public String getClassname()
{
return classname.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setClassname(String value_)
{
classname.setValue(value_ );
}
/**
* Returns an array of AlgorithmParameter objects. The length of the returned
* array is zero if the list of AlgorithmParameter object is empty.
*/
public AlgorithmParameter[] getAlgorithmParameter()
{
return (AlgorithmParameter[])_objAlgorithmParameter.toArray(new AlgorithmParameter[0]);
}
/**
* Replaces all existing AlgorithmParameter objects with a new array of
* AlgorithmParameter objects.
* @param objArray an array of AlgorithmParameter objects.
*/
public void setAlgorithmParameter(AlgorithmParameter[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objAlgorithmParameter.clear();
else
{
this._objAlgorithmParameter = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the AlgorithmParameter object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public AlgorithmParameter getAlgorithmParameter(int index)
{
return (AlgorithmParameter)_objAlgorithmParameter.get(index);
}
/**
* Replaces an existing AlgorithmParameter object at the specified index with
* a new AlgorithmParameter object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setAlgorithmParameter(int index, AlgorithmParameter obj)
{
if( obj == null )
removeAlgorithmParameter(index);
else
{
_objAlgorithmParameter.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of AlgorithmParameter objects in the list.
*/
public int getAlgorithmParameterCount()
{
return _objAlgorithmParameter.size();
}
/**
* Returns <code>true</code> if there is no AlgorithmParameter object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoAlgorithmParameter()
{
return _objAlgorithmParameter.size() == 0;
}
/**
* Returns a read-only list of AlgorithmParameter objects.
*/
public List getAlgorithmParameterList()
{
return Collections.unmodifiableList(_objAlgorithmParameter);
}
/**
* Adds a new AlgorithmParameter object at the end of the list.
* @return <code>true</code> if the new object is added to the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean addAlgorithmParameter(AlgorithmParameter obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objAlgorithmParameter.add(obj);
}
/**
* Adds a list of new AlgorithmParameter objects at the end of the list.
* @return <code>true</code> if the list was changed; otherwise, the method
* returns <code>false</code>.
*/
public boolean addAlgorithmParameter(Collection coAlgorithmParameter)
{
if( coAlgorithmParameter==null )
return false;
java.util.Iterator it = coAlgorithmParameter.iterator();
while( it.hasNext() )
{
Object obj = it.next();
if( obj != null && obj instanceof com.borland.xml.toolkit.XmlObject )
((com.borland.xml.toolkit.XmlObject)obj)._setParent(this);
}
return _objAlgorithmParameter.addAll(coAlgorithmParameter);
}
/**
* Removes an existing AlgorithmParameter object at the specified index.
* @return The removed object.
*/
public AlgorithmParameter removeAlgorithmParameter(int index)
{
return (AlgorithmParameter)_objAlgorithmParameter.remove(index);
}
/**
* Removes the specified AlgorithmParameter object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeAlgorithmParameter(AlgorithmParameter obj)
{
return _objAlgorithmParameter.remove(obj);
}
/**
* Clears all AlgorithmParameter objects from the list.
*/
public void clearAlgorithmParameterList()
{
_objAlgorithmParameter.clear();
}
/**
* 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 "function" attribute */
elem.addAttribute(function.marshal());
/** Marshals "version" attribute */
elem.addAttribute(version.marshal());
/** Marshals "algorithm" attribute */
elem.addAttribute(algorithm.marshal());
/** Marshals "name" attribute */
elem.addAttribute(name.marshal());
/** Marshals "description" attribute */
elem.addAttribute(description.marshal());
/** Marshals "classname" attribute */
elem.addAttribute(classname.marshal());
/** Marshals a list of AlgorithmParameter objects to elements */
Iterator it1 = _objAlgorithmParameter.iterator();
while( it1.hasNext() )
{
AlgorithmParameter obj = (AlgorithmParameter)it1.next();
if( obj != null )
elem.addContent(obj.marshal());
}
return elem;
}
/**
* Unmarshals the specified "AlgorithmSpecification" element back to a AlgorithmSpecification object.
*/
public static AlgorithmSpecification unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
AlgorithmSpecification __objAlgorithmSpecification = new AlgorithmSpecification();
if( __objAlgorithmSpecification != null ) //found the element?
{
/** Unmarshals "function" attribute */
__objAlgorithmSpecification.function.setValue(elem.getAttribute("function"));
/** Unmarshals "version" attribute */
__objAlgorithmSpecification.version.setValue(elem.getAttribute("version"));
/** Unmarshals "algorithm" attribute */
__objAlgorithmSpecification.algorithm.setValue(elem.getAttribute("algorithm"));
/** Unmarshals "name" attribute */
__objAlgorithmSpecification.name.setValue(elem.getAttribute("name"));
/** Unmarshals "description" attribute */
__objAlgorithmSpecification.description.setValue(elem.getAttribute("description"));
/** Unmarshals "classname" attribute */
__objAlgorithmSpecification.classname.setValue(elem.getAttribute("classname"));
}
/** Unmarshals a list of "<<_tagName_>>" elements back to AlgorithmParameter objects. */
Iterator it1 = elem.getChildren(AlgorithmParameter._tagName).iterator();
while( it1.hasNext() )
__objAlgorithmSpecification.addAlgorithmParameter(AlgorithmParameter.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
return __objAlgorithmSpecification;
}
/**
* 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();
/** AlgorithmParameter is zero or more */
Iterator it1 = _objAlgorithmParameter.iterator();
while( it1.hasNext() )
{
AlgorithmParameter obj = (AlgorithmParameter)it1.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
return errors.size()==0 ? null : errors;
}
/**
* Returns a list containing all child elements. Each element in the list is a subclass
* of XmlObject.
*/
public java.util.List _getChildren()
{
java.util.List children = new java.util.ArrayList();
/** adds _objAlgorithmParameter */
if( _objAlgorithmParameter != null && _objAlgorithmParameter.size() > 0 )
children.add(_objAlgorithmParameter);
return children;
}
/**
* Gets the tag name of this element.
*/
public String get_TagName()
{
return _tagName;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -