sk.uniba.euromath.document.schema.impl.del
Class DelNodesComputer

java.lang.Object
  extended by sk.uniba.euromath.document.schema.impl.del.DelNodesComputer

public final class DelNodesComputer
extends Object

Serves for various valid node removal checking.

Author:
Martin Vysny

Constructor Summary
DelNodesComputer(SchemaImpl schema)
          Constructor.
 
Method Summary
 List<Element> areNodesDeletable(com.sun.msv.grammar.ElementExp exp, Element e, Set<? extends Node> nodes)
          Detects if all nodes from the given set are deletable from given element.
 boolean isDeletable(Element e, com.sun.msv.grammar.ElementExp exp, sk.baka.ikslibs.ptr.DOMPoint start, sk.baka.ikslibs.ptr.DOMPoint end)
          Checks if given interval is removable from the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelNodesComputer

public DelNodesComputer(SchemaImpl schema)
Constructor.

Parameters:
schema - the schema instance.
Method Detail

areNodesDeletable

public List<Element> areNodesDeletable(com.sun.msv.grammar.ElementExp exp,
                                       Element e,
                                       Set<? extends Node> nodes)
Detects if all nodes from the given set are deletable from given element. All nodes except text, cdata, element and entities are always deletable.

Parameters:
exp - the expression for the element.
e - we want to delete elements from this element
nodes - delete all these nodes.
Returns:
null if the nodes are not deletable, otherwise a list of elements that must be deleted aswell.
Throws:
DocumentValidityException - if the document isn't valid.

isDeletable

public boolean isDeletable(Element e,
                           com.sun.msv.grammar.ElementExp exp,
                           sk.baka.ikslibs.ptr.DOMPoint start,
                           sk.baka.ikslibs.ptr.DOMPoint end)
Checks if given interval is removable from the document.

Parameters:
e - the parent element
exp - the expression for this element
start - the start of the interval
end - the end of the interval
Returns:
true if these nodes are removable, false otherwise.


Copyright © 2003-2006 null. All Rights Reserved.