de.unihalle.informatik.MiToBo.core.datatypes
Class MTBRegion2DSetBag

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDData
      extended by de.unihalle.informatik.MiToBo.core.datatypes.MTBRegion2DSetBag

@ALDParametrizedClass
public class MTBRegion2DSetBag
extends de.unihalle.informatik.Alida.operator.ALDData

A datatype to store multiple MTBRegion2D sets

Author:
Oliver Gress

Constructor Summary
MTBRegion2DSetBag()
          Constructor to create an empty bag of region sets
MTBRegion2DSetBag(int capacity)
          Constructor to create an empty bag of region sets with the given capacity
MTBRegion2DSetBag(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetBagType regionsetbag)
          Construct a bag of region sets from a xml-object created by the toXMLType method of this class.
MTBRegion2DSetBag(String filename)
          Construct a bag of region sets from a xml-file that was written by the write method of this class.
 
Method Summary
 void add(MTBRegion2DSet regionset)
          Add a region set to this bag
 MTBRegion2DSet get(int idx)
           
 Iterator<MTBRegion2DSet> iterator()
           
 MTBRegion2DSet remove(int idx)
          Remove a region set from this bag by its index
 boolean remove(MTBRegion2DSet regionset)
          Remove a region set from this bag
 void set(int idx, MTBRegion2DSet regionset)
           
 int size()
          Number of region sets in this bag
 de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetBagType toXMLType()
          Create a xml representation of this bag of region sets using MiToBo's xml-scheme MTBRegion2DSetBag.xsd
 void write(String filename)
          Write this bag of region sets to disk in XML format using MiToBo's xml-scheme MTBRegion2DSetBag.xsd
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTBRegion2DSetBag

public MTBRegion2DSetBag()
Constructor to create an empty bag of region sets


MTBRegion2DSetBag

public MTBRegion2DSetBag(int capacity)
Constructor to create an empty bag of region sets with the given capacity


MTBRegion2DSetBag

public MTBRegion2DSetBag(String filename)
                  throws org.apache.xmlbeans.XmlException,
                         IOException
Construct a bag of region sets from a xml-file that was written by the write method of this class. (These xml-files conform to xml-scheme MTBXMLRegion2DSetBag.xsd defined for MiToBo)

Parameters:
filename - path to the xml-file
Throws:
IOException - thrown if parsing of xml-file failed
org.apache.xmlbeans.XmlException - thrown if parsing of xml-file failed

MTBRegion2DSetBag

public MTBRegion2DSetBag(de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetBagType regionsetbag)
Construct a bag of region sets from a xml-object created by the toXMLType method of this class. (The xml-object conforms to xml-schema MTBXMLRegion2DSetBag.xsd defined for MiToBo)

Parameters:
regionsetbag -
Method Detail

write

public void write(String filename)
           throws IOException,
                  de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException,
                  de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Write this bag of region sets to disk in XML format using MiToBo's xml-scheme MTBRegion2DSetBag.xsd

Throws:
IOException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

toXMLType

public de.unihalle.informatik.MiToBo_xml.MTBXMLRegion2DSetBagType toXMLType()
Create a xml representation of this bag of region sets using MiToBo's xml-scheme MTBRegion2DSetBag.xsd

Returns:
the xml representation of this bag of region sets

size

public int size()
Number of region sets in this bag


add

public void add(MTBRegion2DSet regionset)
Add a region set to this bag


remove

public boolean remove(MTBRegion2DSet regionset)
Remove a region set from this bag

Parameters:
regionset - set to remove
Returns:
true if the region set existed in this bag and was removed, false if it was not present

remove

public MTBRegion2DSet remove(int idx)
Remove a region set from this bag by its index

Parameters:
idx - index of the region set to remove
Returns:
region set that was removed or null if it was not present

get

public MTBRegion2DSet get(int idx)

set

public void set(int idx,
                MTBRegion2DSet regionset)

iterator

public Iterator<MTBRegion2DSet> iterator()


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.