📄 mapvalues.java
字号:
/**
* This file is generated by BorlandXML.
*/
package com.prudsys.pdm.Adapters.PmmlVersion20;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
* The MapValues class represents the element "MapValues" with the content
* model defined as follows:
* <p>
* <!ELEMENT MapValues (FieldColumnPair+,(TableLocator|InlineTable))><br>
*/
public class MapValues extends com.borland.xml.toolkit.XmlObject
{
/** xml tag name of this element. */
public static String _tagName = "MapValues";
/** Defines a defaultValue attribute */
public com.borland.xml.toolkit.Attribute defaultValue = new com.borland.xml.toolkit.Attribute("defaultValue", "CDATA", "IMPLIED", "");
/** Defines a outputColumn attribute */
public com.borland.xml.toolkit.Attribute outputColumn = new com.borland.xml.toolkit.Attribute("outputColumn", "CDATA", "REQUIRED", "");
/** Defines a list of FieldColumnPair objects. */
protected ArrayList _objFieldColumnPair = new ArrayList();
/** Defines a TableLocator object */
protected TableLocator _objTableLocator;
/** Defines a InlineTable object */
protected InlineTable _objInlineTable;
/**
* Creates an empty MapValues object
*/
public MapValues()
{
super();
}
/**
* Gets the value of "defaultValue" attribute.
*/
public String getDefaultValue()
{
return defaultValue.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setDefaultValue(String value_)
{
defaultValue.setValue(value_ );
}
/**
* Gets the value of "outputColumn" attribute.
*/
public String getOutputColumn()
{
return outputColumn.getValue();
}
/**
* Replaces the existing attribute value with a new value.
* @param value New value.
*/
public void setOutputColumn(String value_)
{
outputColumn.setValue(value_ );
}
/**
* Returns an array of FieldColumnPair objects. The length of the returned
* array is zero if the list of FieldColumnPair object is empty.
*/
public FieldColumnPair[] getFieldColumnPair()
{
return (FieldColumnPair[])_objFieldColumnPair.toArray(new FieldColumnPair[0]);
}
/**
* Replaces all existing FieldColumnPair objects with a new array of
* FieldColumnPair objects.
* @param objArray an array of FieldColumnPair objects.
*/
public void setFieldColumnPair(FieldColumnPair[] objArray)
{
if( objArray == null || objArray.length == 0 )
this._objFieldColumnPair.clear();
else
{
this._objFieldColumnPair = new ArrayList(Arrays.asList(objArray));
for( int i=0; i<objArray.length; i++ )
{
if( objArray[i] != null )
objArray[i]._setParent(this);
}
}
}
/**
* Gets the FieldColumnPair object at the specified index.
* @param index index of the returned object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public FieldColumnPair getFieldColumnPair(int index)
{
return (FieldColumnPair)_objFieldColumnPair.get(index);
}
/**
* Replaces an existing FieldColumnPair object at the specified index with
* a new FieldColumnPair object.
* @param index index of replaced object.
* @throws IndexOutOfBoundsException if index is out of range.
*/
public void setFieldColumnPair(int index, FieldColumnPair obj)
{
if( obj == null )
removeFieldColumnPair(index);
else
{
_objFieldColumnPair.set(index, obj);
obj._setParent(this);
}
}
/**
* Returns the number of FieldColumnPair objects in the list.
*/
public int getFieldColumnPairCount()
{
return _objFieldColumnPair.size();
}
/**
* Returns <code>true</code> if there is no FieldColumnPair object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoFieldColumnPair()
{
return _objFieldColumnPair.size() == 0;
}
/**
* Returns a read-only list of FieldColumnPair objects.
*/
public List getFieldColumnPairList()
{
return Collections.unmodifiableList(_objFieldColumnPair);
}
/**
* Adds a new FieldColumnPair 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 addFieldColumnPair(FieldColumnPair obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objFieldColumnPair.add(obj);
}
/**
* Adds a list of new FieldColumnPair 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 addFieldColumnPair(Collection coFieldColumnPair)
{
if( coFieldColumnPair==null )
return false;
java.util.Iterator it = coFieldColumnPair.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 _objFieldColumnPair.addAll(coFieldColumnPair);
}
/**
* Removes an existing FieldColumnPair object at the specified index.
* @return The removed object.
*/
public FieldColumnPair removeFieldColumnPair(int index)
{
return (FieldColumnPair)_objFieldColumnPair.remove(index);
}
/**
* Removes the specified FieldColumnPair object.
* @return <code>true</code> if this list contains the object; otherwise,
* the method returns <code>false</code>.
*/
public boolean removeFieldColumnPair(FieldColumnPair obj)
{
return _objFieldColumnPair.remove(obj);
}
/**
* Clears all FieldColumnPair objects from the list.
*/
public void clearFieldColumnPairList()
{
_objFieldColumnPair.clear();
}
/**
* Gets TableLocator object.
*/
public TableLocator getTableLocator()
{
return _objTableLocator;
}
/**
* Replaces the existing TableLocator object with a new object.
* If you pass in a null value to this method, the TableLocator object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setTableLocator(TableLocator obj)
{
this._objTableLocator = obj;
if( obj == null )
return;
obj._setParent(this);
_objInlineTable = null;
}
/**
* Gets InlineTable object.
*/
public InlineTable getInlineTable()
{
return _objInlineTable;
}
/**
* Replaces the existing InlineTable object with a new object.
* If you pass in a null value to this method, the InlineTable object is
* cleared and will not be marshaled.
* @param obj A new object.
*/
public void setInlineTable(InlineTable obj)
{
this._objInlineTable = obj;
if( obj == null )
return;
obj._setParent(this);
_objTableLocator = 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 "defaultValue" attribute */
elem.addAttribute(defaultValue.marshal());
/** Marshals "outputColumn" attribute */
elem.addAttribute(outputColumn.marshal());
/** Marshals a list of FieldColumnPair objects to elements */
Iterator it1 = _objFieldColumnPair.iterator();
while( it1.hasNext() )
{
FieldColumnPair obj = (FieldColumnPair)it1.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a TableLocator object to an element */
if( _objTableLocator != null )
elem.addContent(_objTableLocator.marshal());
/** Marshals a InlineTable object to an element */
if( _objInlineTable != null )
elem.addContent(_objInlineTable.marshal());
return elem;
}
/**
* Unmarshals the specified "MapValues" element back to a MapValues object.
*/
public static MapValues unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
MapValues __objMapValues = new MapValues();
if( __objMapValues != null ) //found the element?
{
/** Unmarshals "defaultValue" attribute */
__objMapValues.defaultValue.setValue(elem.getAttribute("defaultValue"));
/** Unmarshals "outputColumn" attribute */
__objMapValues.outputColumn.setValue(elem.getAttribute("outputColumn"));
}
/** Unmarshals a list of "<<_tagName_>>" elements back to FieldColumnPair objects. */
Iterator it1 = elem.getChildren(FieldColumnPair._tagName).iterator();
while( it1.hasNext() )
__objMapValues.addFieldColumnPair(FieldColumnPair.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
/** Unmarshals an element back to a TableLocator object */
__objMapValues.setTableLocator(TableLocator.unmarshal(elem.getChild(TableLocator._tagName)));
/** Unmarshals an element back to a InlineTable object */
__objMapValues.setInlineTable(InlineTable.unmarshal(elem.getChild(InlineTable._tagName)));
return __objMapValues;
}
/**
* 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();
/** FieldColumnPair is one or more */
if( _objFieldColumnPair.size() == 0 )
{
errors.add(new com.borland.xml.toolkit.ElementError(this, FieldColumnPair.class));
if( firstError )
return errors;
}
else
{
Iterator it1 = _objFieldColumnPair.iterator();
while( it1.hasNext() )
{
FieldColumnPair obj = (FieldColumnPair)it1.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
}
/** "or" block */
if( _objTableLocator != null )
{
/** TableLocator is mandatory */
if( _objTableLocator != null )
errors.add(_objTableLocator.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, TableLocator.class));
if( firstError && errors.size() > 0 )
return errors;
}
if( _objInlineTable != null )
{
/** InlineTable is mandatory */
if( _objInlineTable != null )
errors.add(_objInlineTable.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, InlineTable.class));
if( firstError && errors.size() > 0 )
return errors;
}
if( !(_objTableLocator != null) && !(_objInlineTable != 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, TableLocator.class));
errors1.add(new com.borland.xml.toolkit.ElementError(this, InlineTable.class));
errors.add(errors1);
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 _objFieldColumnPair */
if( _objFieldColumnPair != null && _objFieldColumnPair.size() > 0 )
children.add(_objFieldColumnPair);
/** adds _objTableLocator */
if( _objTableLocator != null )
children.add(_objTableLocator);
/** adds _objInlineTable */
if( _objInlineTable != null )
children.add(_objInlineTable);
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 + -