📄 sparsegrid.java
字号:
/**
* This file is generated by BorlandXML.
*/
package com.prudsys.pdm.Adapters.PmmlVersion20;
/**
* The SparseGrid class represents the element "SparseGrid" with the content
* model defined as follows:
* <p>
* <!ELEMENT SparseGrid (SparseGridHeader,SparseGridCoefficients)><br>
*/
public class SparseGrid extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "SparseGrid";
/** Defines a gridName attribute */
public com.borland.xml.toolkit.Attribute gridName = new com.borland.xml.toolkit.Attribute("gridName", "CDATA", "IMPLIED", "");
/** Defines a SparseGridHeader object */
protected SparseGridHeader _objSparseGridHeader;
/** Defines a SparseGridCoefficients object */
protected SparseGridCoefficients _objSparseGridCoefficients;
/**
* Creates an empty SparseGrid object
*/
public SparseGrid()
{
super();
}
/**
* Gets the value of "gridName" attribute.
*/
public String getGridName()
{
return gridName.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setGridName(String value_)
{
gridName.setValue(value_ );
}
/**
* Gets the text content of SparseGridHeader object.
*/
public String getSparseGridHeaderText()
{
return _objSparseGridHeader==null ? null : _objSparseGridHeader.getText();
}
/**
* Replaces the existing text of SparseGridHeader object with a new text.
* If you pass in a null value to this method, the SparseGridHeader object is
* cleared and will not be marshaled.
* @param text New text.
*/
public void setSparseGridHeaderText(String text)
{
if( text == null )
{
this._objSparseGridHeader = null;
return;
}
if( this._objSparseGridHeader == null )
this._objSparseGridHeader = new SparseGridHeader();
this._objSparseGridHeader.setText(text);
this._objSparseGridHeader._setParent(this);
}
/**
* Gets SparseGridHeader object.
*/
public SparseGridHeader getSparseGridHeader()
{
return _objSparseGridHeader;
}
/**
* Replaces the existing SparseGridHeader object with a new object.
* If you pass in a null value to this method, the SparseGridHeader object is
* cleared and will not be marshaled.
* @param obj New object.
*/
public void setSparseGridHeader(SparseGridHeader obj)
{
this._objSparseGridHeader = obj;
if( obj == null )
return;
obj._setParent(this);
}
/**
* Gets the text content of SparseGridCoefficients object.
*/
public String getSparseGridCoefficientsText()
{
return _objSparseGridCoefficients==null ? null : _objSparseGridCoefficients.getText();
}
/**
* Replaces the existing text of SparseGridCoefficients object with a new text.
* If you pass in a null value to this method, the SparseGridCoefficients object is
* cleared and will not be marshaled.
* @param text New text.
*/
public void setSparseGridCoefficientsText(String text)
{
if( text == null )
{
this._objSparseGridCoefficients = null;
return;
}
if( this._objSparseGridCoefficients == null )
this._objSparseGridCoefficients = new SparseGridCoefficients();
this._objSparseGridCoefficients.setText(text);
this._objSparseGridCoefficients._setParent(this);
}
/**
* Gets SparseGridCoefficients object.
*/
public SparseGridCoefficients getSparseGridCoefficients()
{
return _objSparseGridCoefficients;
}
/**
* Replaces the existing SparseGridCoefficients object with a new object.
* If you pass in a null value to this method, the SparseGridCoefficients object is
* cleared and will not be marshaled.
* @param obj New object.
*/
public void setSparseGridCoefficients(SparseGridCoefficients obj)
{
this._objSparseGridCoefficients = obj;
if( obj == null )
return;
obj._setParent(this);
}
/**
* 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 "gridName" attribute */
elem.addAttribute(gridName.marshal());
/** Marshals a SparseGridHeader object to an element */
if( _objSparseGridHeader != null )
elem.addContent(_objSparseGridHeader.marshal());
/** Marshals a SparseGridCoefficients object to an element */
if( _objSparseGridCoefficients != null )
elem.addContent(_objSparseGridCoefficients.marshal());
return elem;
}
/**
* Unmarshals the specified "SparseGrid" element back to a SparseGrid object.
*/
public static SparseGrid unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
SparseGrid __objSparseGrid = new SparseGrid();
if( __objSparseGrid != null ) //found the element?
{
/** Unmarshals "gridName" attribute */
__objSparseGrid.gridName.setValue(elem.getAttribute("gridName"));
}
/** Unmarshals an element back to a SparseGridHeader object */
__objSparseGrid.setSparseGridHeader(SparseGridHeader.unmarshal(elem.getChild(SparseGridHeader._tagName)));
/** Unmarshals an element back to a SparseGridCoefficients object */
__objSparseGrid.setSparseGridCoefficients(SparseGridCoefficients.unmarshal(elem.getChild(SparseGridCoefficients._tagName)));
return __objSparseGrid;
}
/**
* 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();
/** SparseGridHeader is mandatory */
if( _objSparseGridHeader != null )
errors.add(_objSparseGridHeader.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, SparseGridHeader.class));
if( firstError && errors.size() > 0 )
return errors;
/** SparseGridCoefficients is mandatory */
if( _objSparseGridCoefficients != null )
errors.add(_objSparseGridCoefficients.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, SparseGridCoefficients.class));
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 _objSparseGridHeader */
if( _objSparseGridHeader != null )
children.add(_objSparseGridHeader);
/** adds _objSparseGridCoefficients */
if( _objSparseGridCoefficients != null )
children.add(_objSparseGridCoefficients);
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 + -