📄 sequencemodel.java
字号:
return _objExtension1.size();
}
/**
* Returns <code>true</code> if there is no Extension object in the list; otherwise,
* the method returns <code>false</code>.
*/
public boolean isNoExtension1()
{
return _objExtension1.size() == 0;
}
/**
* Returns a read-only list of Extension objects.
*/
public List getExtensionList1()
{
return Collections.unmodifiableList(_objExtension1);
}
/**
* 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 addExtension1(Extension obj)
{
if( obj==null )
return false;
obj._setParent(this);
return _objExtension1.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 addExtension1(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 _objExtension1.addAll(coExtension);
}
/**
* Removes an existing Extension object at the specified index.
* @return The removed object.
*/
public Extension removeExtension1(int index)
{
return (Extension)_objExtension1.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 removeExtension1(Extension obj)
{
return _objExtension1.remove(obj);
}
/**
* Clears all Extension objects from the list.
*/
public void clearExtensionList1()
{
_objExtension1.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 "maxNumberOfItemsPerTransaction" attribute */
elem.addAttribute(maxNumberOfItemsPerTransaction.marshal());
/** Marshals "numberOfSequences" attribute */
elem.addAttribute(numberOfSequences.marshal());
/** Marshals "timeWindowWidth" attribute */
elem.addAttribute(timeWindowWidth.marshal());
/** Marshals "maximumTime" attribute */
elem.addAttribute(maximumTime.marshal());
/** Marshals "minimumConfidence" attribute */
elem.addAttribute(minimumConfidence.marshal());
/** Marshals "algorithmName" attribute */
elem.addAttribute(algorithmName.marshal());
/** Marshals "modelName" attribute */
elem.addAttribute(modelName.marshal());
/** Marshals "transactIdName" attribute */
elem.addAttribute(transactIdName.marshal());
/** Marshals "numberOfRules" attribute */
elem.addAttribute(numberOfRules.marshal());
/** Marshals "lengthLimit" attribute */
elem.addAttribute(lengthLimit.marshal());
/** Marshals "minimumSupport" attribute */
elem.addAttribute(minimumSupport.marshal());
/** Marshals "positionIdName" attribute */
elem.addAttribute(positionIdName.marshal());
/** Marshals "numberOfItems" attribute */
elem.addAttribute(numberOfItems.marshal());
/** Marshals "numberOfSets" attribute */
elem.addAttribute(numberOfSets.marshal());
/** Marshals "minimumTime" attribute */
elem.addAttribute(minimumTime.marshal());
/** Marshals "avgNumberOfItemsPerTransaction" attribute */
elem.addAttribute(avgNumberOfItemsPerTransaction.marshal());
/** Marshals "itemIdName" attribute */
elem.addAttribute(itemIdName.marshal());
/** Marshals "numberOfTransactions" attribute */
elem.addAttribute(numberOfTransactions.marshal());
/** Marshals "functionName" attribute */
elem.addAttribute(functionName.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 MiningSchema object to an element */
if( _objMiningSchema != null )
elem.addContent(_objMiningSchema.marshal());
/** Marshals a list of Item objects to elements */
Iterator it2 = _objItem.iterator();
while( it2.hasNext() )
{
Item obj = (Item)it2.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a list of Itemset objects to elements */
Iterator it3 = _objItemset.iterator();
while( it3.hasNext() )
{
Itemset obj = (Itemset)it3.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a list of SetPredicate objects to elements */
Iterator it4 = _objSetPredicate.iterator();
while( it4.hasNext() )
{
SetPredicate obj = (SetPredicate)it4.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a list of Sequence objects to elements */
Iterator it5 = _objSequence.iterator();
while( it5.hasNext() )
{
Sequence obj = (Sequence)it5.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a list of SequenceRule objects to elements */
Iterator it6 = _objSequenceRule.iterator();
while( it6.hasNext() )
{
SequenceRule obj = (SequenceRule)it6.next();
if( obj != null )
elem.addContent(obj.marshal());
}
/** Marshals a list of Extension objects to elements */
Iterator it7 = _objExtension1.iterator();
while( it7.hasNext() )
{
Extension obj = (Extension)it7.next();
if( obj != null )
elem.addContent(obj.marshal());
}
return elem;
}
/**
* Unmarshals the specified "SequenceModel" element back to a SequenceModel object.
*/
public static SequenceModel unmarshal(com.borland.xml.toolkit.Element elem)
{
if( elem == null )
return null;
SequenceModel __objSequenceModel = new SequenceModel();
if( __objSequenceModel != null ) //found the element?
{
/** Unmarshals "maxNumberOfItemsPerTransaction" attribute */
__objSequenceModel.maxNumberOfItemsPerTransaction.setValue(elem.getAttribute("maxNumberOfItemsPerTransaction"));
/** Unmarshals "numberOfSequences" attribute */
__objSequenceModel.numberOfSequences.setValue(elem.getAttribute("numberOfSequences"));
/** Unmarshals "timeWindowWidth" attribute */
__objSequenceModel.timeWindowWidth.setValue(elem.getAttribute("timeWindowWidth"));
/** Unmarshals "maximumTime" attribute */
__objSequenceModel.maximumTime.setValue(elem.getAttribute("maximumTime"));
/** Unmarshals "minimumConfidence" attribute */
__objSequenceModel.minimumConfidence.setValue(elem.getAttribute("minimumConfidence"));
/** Unmarshals "algorithmName" attribute */
__objSequenceModel.algorithmName.setValue(elem.getAttribute("algorithmName"));
/** Unmarshals "modelName" attribute */
__objSequenceModel.modelName.setValue(elem.getAttribute("modelName"));
/** Unmarshals "transactIdName" attribute */
__objSequenceModel.transactIdName.setValue(elem.getAttribute("transactIdName"));
/** Unmarshals "numberOfRules" attribute */
__objSequenceModel.numberOfRules.setValue(elem.getAttribute("numberOfRules"));
/** Unmarshals "lengthLimit" attribute */
__objSequenceModel.lengthLimit.setValue(elem.getAttribute("lengthLimit"));
/** Unmarshals "minimumSupport" attribute */
__objSequenceModel.minimumSupport.setValue(elem.getAttribute("minimumSupport"));
/** Unmarshals "positionIdName" attribute */
__objSequenceModel.positionIdName.setValue(elem.getAttribute("positionIdName"));
/** Unmarshals "numberOfItems" attribute */
__objSequenceModel.numberOfItems.setValue(elem.getAttribute("numberOfItems"));
/** Unmarshals "numberOfSets" attribute */
__objSequenceModel.numberOfSets.setValue(elem.getAttribute("numberOfSets"));
/** Unmarshals "minimumTime" attribute */
__objSequenceModel.minimumTime.setValue(elem.getAttribute("minimumTime"));
/** Unmarshals "avgNumberOfItemsPerTransaction" attribute */
__objSequenceModel.avgNumberOfItemsPerTransaction.setValue(elem.getAttribute("avgNumberOfItemsPerTransaction"));
/** Unmarshals "itemIdName" attribute */
__objSequenceModel.itemIdName.setValue(elem.getAttribute("itemIdName"));
/** Unmarshals "numberOfTransactions" attribute */
__objSequenceModel.numberOfTransactions.setValue(elem.getAttribute("numberOfTransactions"));
/** Unmarshals "functionName" attribute */
__objSequenceModel.functionName.setValue(elem.getAttribute("functionName"));
}
/** Unmarshals a list of "<<_tagName_>>" elements back to Extension objects. */
Iterator it1 = elem.getChildren(Extension._tagName).iterator();
while( it1.hasNext() )
__objSequenceModel.addExtension(Extension.unmarshal((com.borland.xml.toolkit.Element)it1.next()));
/** Unmarshals an element back to a MiningSchema object */
__objSequenceModel.setMiningSchema(MiningSchema.unmarshal(elem.getChild(MiningSchema._tagName)));
/** Unmarshals a list of "<<_tagName_>>" elements back to Item objects. */
Iterator it2 = elem.getChildren(Item._tagName).iterator();
while( it2.hasNext() )
__objSequenceModel.addItem(Item.unmarshal((com.borland.xml.toolkit.Element)it2.next()));
/** Unmarshals a list of "<<_tagName_>>" elements back to Itemset objects. */
Iterator it3 = elem.getChildren(Itemset._tagName).iterator();
while( it3.hasNext() )
__objSequenceModel.addItemset(Itemset.unmarshal((com.borland.xml.toolkit.Element)it3.next()));
/** Unmarshals a list of "<<_tagName_>>" elements back to SetPredicate objects. */
Iterator it4 = elem.getChildren(SetPredicate._tagName).iterator();
while( it4.hasNext() )
__objSequenceModel.addSetPredicate(SetPredicate.unmarshal((com.borland.xml.toolkit.Element)it4.next()));
/** Unmarshals a list of "<<_tagName_>>" elements back to Sequence objects. */
Iterator it5 = elem.getChildren(Sequence._tagName).iterator();
while( it5.hasNext() )
__objSequenceModel.addSequence(Sequence.unmarshal((com.borland.xml.toolkit.Element)it5.next()));
/** Unmarshals a list of "<<_tagName_>>" elements back to SequenceRule objects. */
Iterator it6 = elem.getChildren(SequenceRule._tagName).iterator();
while( it6.hasNext() )
__objSequenceModel.addSequenceRule(SequenceRule.unmarshal((com.borland.xml.toolkit.Element)it6.next()));
/** Unmarshals a list of "<<_tagName_>>" elements back to Extension objects. */
Iterator it7 = elem.getChildren(Extension._tagName).iterator();
while( it7.hasNext() )
__objSequenceModel.addExtension1(Extension.unmarshal((com.borland.xml.toolkit.Element)it7.next()));
return __objSequenceModel;
}
/**
* 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;
}
}
/** MiningSchema is mandatory */
if( _objMiningSchema != null )
errors.add(_objMiningSchema.validate(firstError));
else
errors.add(new com.borland.xml.toolkit.ElementError(this, MiningSchema.class));
if( firstError && errors.size() > 0 )
return errors;
/** Item is zero or more */
Iterator it2 = _objItem.iterator();
while( it2.hasNext() )
{
Item obj = (Item)it2.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
/** Itemset is zero or more */
Iterator it3 = _objItemset.iterator();
while( it3.hasNext() )
{
Itemset obj = (Itemset)it3.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
/** SetPredicate is one or more */
if( _objSetPredicate.size() == 0 )
{
errors.add(new com.borland.xml.toolkit.ElementError(this, SetPredicate.class));
if( firstError )
return errors;
}
else
{
Iterator it4 = _objSetPredicate.iterator();
while( it4.hasNext() )
{
SetPredicate obj = (SetPredicate)it4.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
}
/** Sequence is one or more */
if( _objSequence.size() == 0 )
{
errors.add(new com.borland.xml.toolkit.ElementError(this, Sequence.class));
if( firstError )
return errors;
}
else
{
Iterator it5 = _objSequence.iterator();
while( it5.hasNext() )
{
Sequence obj = (Sequence)it5.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
}
/** SequenceRule is zero or more */
Iterator it6 = _objSequenceRule.iterator();
while( it6.hasNext() )
{
SequenceRule obj = (SequenceRule)it6.next();
if( obj != null )
{
errors.add(obj.validate(firstError));
if( firstError && errors.size() > 0 )
return errors;
}
}
/** Extension is zero or more */
Iterator it7 = _objExtension1.iterator();
while( it7.hasNext() )
{
Extension obj = (Extension)it7.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 _objExtension */
if( _objExtension != null && _objExtension.size() > 0 )
children.add(_objExtension);
/** adds _objMiningSchema */
if( _objMiningSchema != null )
children.add(_objMiningSchema);
/** adds _objItem */
if( _objItem != null && _objItem.size() > 0 )
children.add(_objItem);
/** adds _objItemset */
if( _objItemset != null && _objItemset.size() > 0 )
children.add(_objItemset);
/** adds _objSetPredicate */
if( _objSetPredicate != null && _objSetPredicate.size() > 0 )
children.add(_objSetPredicate);
/** adds _objSequence */
if( _objSequence != null && _objSequence.size() > 0 )
children.add(_objSequence);
/** adds _objSequenceRule */
if( _objSequenceRule != null && _objSequenceRule.size() > 0 )
children.add(_objSequenceRule);
/** adds _objExtension1 */
if( _objExtension1 != null && _objExtension1.size() > 0 )
children.add(_objExtension1);
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 + -