sk.uniba.euromath.editor.xmlEditor
Class IdVisualInfo

java.lang.Object
  extended by sk.uniba.euromath.editor.xmlEditor.IdVisualInfo

public class IdVisualInfo
extends Object

Holds relation between node's ids from source XML document to EditParts which visualize them. One id can be visualized by one EditPart, many or by none.

Author:
Tomáš Studva 4.11.2005

Field Summary
protected  Set<String> idSet
          Ids currently in map - not only element's ids as elementIDs.
protected  Map<String,Set<XMLEditPart>> parts
          Maps id to EditParts visually representing node with given id.
 
Constructor Summary
IdVisualInfo()
          Conatructor.
 
Method Summary
 void add(String id, XMLEditPart visualPart)
          Adds vusualPart to set of visualizers of xml node with id id.
 void clear()
          Clears out holded info.
 boolean contains(String id)
          Returns true if holds some info about desired id.
 int count(String id)
          Returns how many EditParts represent id (this information is taken from object's state).
 Set<String> getElementIds()
          Returns set containing all element ids holded by info.
protected  Set<String> getElementIDs()
           
 Set<String> getIds()
          Returns set containing all ids holded by info.
protected  Set<String> getIdSet()
           
protected  Map<String,Set<XMLEditPart>> getParts()
           
 List<XMLEditPart> getVisualParts(String id)
          Returns list of XMLEditParts which visualize node with id id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idSet

protected final Set<String> idSet
Ids currently in map - not only element's ids as elementIDs.


parts

protected final Map<String,Set<XMLEditPart>> parts
Maps id to EditParts visually representing node with given id.

Constructor Detail

IdVisualInfo

public IdVisualInfo()
Conatructor.

Method Detail

add

public void add(String id,
                XMLEditPart visualPart)
Adds vusualPart to set of visualizers of xml node with id id.

Parameters:
id - Unique identifier of a node from XML data source, not null
visualPart - An XMLEditPart visually representing node with given id, not null

clear

public void clear()
Clears out holded info. Object state is same as after construction.


contains

public boolean contains(String id)
Returns true if holds some info about desired id.

Parameters:
id - of node not null
Returns:
true if contains the id

count

public int count(String id)
Returns how many EditParts represent id (this information is taken from object's state). If id was not yet added, zero is returned.

Parameters:
id - of node not null
Returns:
how many EditParts represent id

getVisualParts

public List<XMLEditPart> getVisualParts(String id)
Returns list of XMLEditParts which visualize node with id id.

Parameters:
id - of xml node, not null
Returns:
EditParts representing id in new instance of ArrayList

getElementIds

public Set<String> getElementIds()
Returns set containing all element ids holded by info.

Returns:
elements ids set by copy

getIds

public Set<String> getIds()
Returns set containing all ids holded by info.

Returns:
ids set by copy

getElementIDs

protected Set<String> getElementIDs()
Returns:
Returns the elementIDs.

getIdSet

protected Set<String> getIdSet()
Returns:
Returns the idSet.

getParts

protected Map<String,Set<XMLEditPart>> getParts()
Returns:
Returns the parts.


Copyright © 2003-2006 null. All Rights Reserved.