📄 pmml.java
字号:
objArray[i]._setParent(this);
}
}
}
/**
* Gets the ClusteringModel object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public ClusteringModel getClusteringModel(int index)
{
return (ClusteringModel)_objClusteringModel.get(index);
}
/**
* Replaces an existing ClusteringModel object at the specified index with
* a new ClusteringModel object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setClusteringModel(int index, ClusteringModel obj)
{
if( obj == null )
removeClusteringModel(index);
else
{
_objClusteringModel.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of ClusteringModel objects in the list.
*/
public int getClusteringModelCount()
{
return _objClusteringModel.size();
}
/**
* Returns <code>true</code> if there is no ClusteringModel object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoClusteringModel()
{
return _objClusteringModel.size() == 0;
}
/**
* Returns a read-only list of ClusteringModel objects.
*/
public List getClusteringModelList()
{
return Collections.unmodifiableList(_objClusteringModel);
}
/**
* Adds a new ClusteringModel 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 addClusteringModel(ClusteringModel obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objClusteringModel.add(obj);
}
/**
* Adds a list of new ClusteringModel 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 addClusteringModel(Collection coClusteringModel)
{
if( coClusteringModel==null )
return false;
java.util.Iterator it = coClusteringModel.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 _objClusteringModel.addAll(coClusteringModel);
}
/**
* Removes an existing ClusteringModel object at the specified index.
* @return The removed object.
*/
public ClusteringModel removeClusteringModel(int index)
{
return (ClusteringModel)_objClusteringModel.remove(index);
}
/**
* Removes the specified ClusteringModel object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeClusteringModel(ClusteringModel obj)
{
return _objClusteringModel.remove(obj);
}
/**
* Clears all ClusteringModel objects from the list.
*/
public void clearClusteringModelList()
{
_objClusteringModel.clear();
}
/**
* Returns an array of NeuralNetwork objects. The length of the returned
* array is zero if the list of NeuralNetwork object is empty.
*/
public NeuralNetwork[] getNeuralNetwork()
{
return (NeuralNetwork[])_objNeuralNetwork.toArray(new NeuralNetwork[0]);
}
/**
* Replaces all existing NeuralNetwork objects with a new array of
* NeuralNetwork objects.
* @param objArray an array of NeuralNetwork objects.
*/
public void setNeuralNetwork(NeuralNetwork[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objNeuralNetwork.clear();
else
{
this._objNeuralNetwork = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the NeuralNetwork object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public NeuralNetwork getNeuralNetwork(int index)
{
return (NeuralNetwork)_objNeuralNetwork.get(index);
}
/**
* Replaces an existing NeuralNetwork object at the specified index with
* a new NeuralNetwork object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setNeuralNetwork(int index, NeuralNetwork obj)
{
if( obj == null )
removeNeuralNetwork(index);
else
{
_objNeuralNetwork.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of NeuralNetwork objects in the list.
*/
public int getNeuralNetworkCount()
{
return _objNeuralNetwork.size();
}
/**
* Returns <code>true</code> if there is no NeuralNetwork object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoNeuralNetwork()
{
return _objNeuralNetwork.size() == 0;
}
/**
* Returns a read-only list of NeuralNetwork objects.
*/
public List getNeuralNetworkList()
{
return Collections.unmodifiableList(_objNeuralNetwork);
}
/**
* Adds a new NeuralNetwork 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 addNeuralNetwork(NeuralNetwork obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objNeuralNetwork.add(obj);
}
/**
* Adds a list of new NeuralNetwork 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 addNeuralNetwork(Collection coNeuralNetwork)
{
if( coNeuralNetwork==null )
return false;
java.util.Iterator it = coNeuralNetwork.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 _objNeuralNetwork.addAll(coNeuralNetwork);
}
/**
* Removes an existing NeuralNetwork object at the specified index.
* @return The removed object.
*/
public NeuralNetwork removeNeuralNetwork(int index)
{
return (NeuralNetwork)_objNeuralNetwork.remove(index);
}
/**
* Removes the specified NeuralNetwork object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeNeuralNetwork(NeuralNetwork obj)
{
return _objNeuralNetwork.remove(obj);
}
/**
* Clears all NeuralNetwork objects from the list.
*/
public void clearNeuralNetworkList()
{
_objNeuralNetwork.clear();
}
/**
* Returns an array of Extension objects. The length of the returned
* array is zero if the list of Extension object is empty.
*/
public Extension[] getExtension()
{
return (Extension[])_objExtension.toArray(new Extension[0]);
}
/**
* Replaces all existing Extension objects with a new array of
* Extension objects.
* @param objArray an array of Extension objects.
*/
public void setExtension(Extension[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objExtension.clear();
else
{
this._objExtension = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the Extension object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public Extension getExtension(int index)
{
return (Extension)_objExtension.get(index);
}
/**
* Replaces an existing Extension object at the specified index with
* a new Extension object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setExtension(int index, Extension obj)
{
if( obj == null )
removeExtension(index);
else
{
_objExtension.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of Extension objects in the list.
*/
public int getExtensionCount()
{
return _objExtension.size();
}
/**
* Returns <code>true</code> if there is no Extension object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoExtension()
{
return _objExtension.size() == 0;
}
/**
* Returns a read-only list of Extension objects.
*/
public List getExtensionList()
{
return Collections.unmodifiableList(_objExtension);
}
/**
* Adds a new Extension 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 addExtension(Extension obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objExtension.add(obj);
}
/**
* Adds a list of new Extension 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 addExtension(Collection coExtension)
{
if( coExtension==null )
return false;
java.util.Iterator it = coExtension.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 _objExtension.addAll(coExtension);
}
/**
* Removes an existing Extension object at the specified index.
* @return The removed object.
*/
public Extension removeExtension(int index)
{
return (Extension)_objExtension.remove(index);
}
/**
* Removes the specified Extension object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeExtension(Extension obj)
{
return _objExtension.remove(obj);
}
/**
* Clears all Extension objects from the list.
*/
public void clearExtensionList()
{
_objExtension.clear();
}
/**
* Marshals this object to an XML instance and outputs it to the specifed output stream.
* @param out OutputStream object to receive the output of the XML instance.
* @throws java.io.IOException Couldn't create the XML document.
*/
public void marshal(java.io.OutputStream out)
throws java.io.IOException
{
com.borland.xml.toolkit.Element elem = marshal();
com.borland.xml.toolkit.XmlUtil.writeDocument( out, elem, getPublicId(), getSystemId() );
}
/**
* Marshals this object to an XML instance and stores it in the specified file.
* @param fileName File to store the output of the XML instance.
* @throws java.io.IOException Failed to get a FileOutputStream or to create the
* XML document.
*/
public void marshal(String fileName)
throws java.io.IOException
{
com.borland.xml.toolkit.Element elem = marshal();
com.borland.xml.toolkit.XmlUtil.writeDocument( fileName, elem, getPublicId(), getSystemId() );
}
/**
* Marshals this object to an XML instance and stores it in the specified file.
* @param file File to store the output of the XML instance.
* @throws java.io.IOException Failed to get a FileOutputStream or to create the
* XML document.
*/
public void marshal(java.io.File file)
throws java.io.IOException
{
com.borland.xml.toolkit.Element elem = marshal();
com.borland.xml.toolkit.XmlUtil.writeDocument( file, elem, getPublicId(), getSystemId() );
}
/**
* Marshals this object to an XML instance and outputs it to the specified writer.
* @param writer Writer object to receive the output of the XML instance.
* @throws java.io.IOException Failed to create the XML document.
*/
public void marshal(java.io.Writer writer)
throws java.io.IOException
{
com.borland.xml.toolkit.Element elem = marshal();
com.borland.xml.toolkit.XmlUtil.writeDocument( writer, elem, getPublicId(), getSystemId() );
}
/**
* Unmarshals an XML document back to a PMML object from an input stream.
* @param in The InputStream object to read the XML document.
*/
public static PMML unmarshal(java.io.InputStream in)
{
return PMML.unmarshal(com.borland.xml.toolkit.XmlUtil.getDocRootElement(in));
}
/**
* Unmarshals an XML document back to a PMML object from a file.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -