sk.uniba.euromath.document.schema.impl.modify
Class EncloseDecloseElements

java.lang.Object
  extended by sk.uniba.euromath.document.schema.impl.modify.EncloseDecloseElements

public final class EncloseDecloseElements
extends Object

Provides the enclose/declose functionality.

Author:
Martin Vysny

Constructor Summary
EncloseDecloseElements(SchemaImpl schema)
          Constructor.
 
Method Summary
 INameListP<INewElementRuleP> getEnclosingElements(Element parent, sk.baka.ikslibs.ptr.DOMPoint start, sk.baka.ikslibs.ptr.DOMPoint end, com.sun.msv.grammar.ElementExp exp)
          Checks whether selected content is enclosable.
 boolean isDeclosable(Element e, com.sun.msv.grammar.ElementExp exp)
          Checks if given element is declosable - if the contents of given element can replace the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncloseDecloseElements

public EncloseDecloseElements(SchemaImpl schema)
Constructor.

Parameters:
schema - schema object instance.
Method Detail

getEnclosingElements

public INameListP<INewElementRuleP> getEnclosingElements(Element parent,
                                                         sk.baka.ikslibs.ptr.DOMPoint start,
                                                         sk.baka.ikslibs.ptr.DOMPoint end,
                                                         com.sun.msv.grammar.ElementExp exp)
Checks whether selected content is enclosable. Returns a namelist containing element rules which can generate the enclosing element.

Parameters:
parent - the parent element
start - start of the node interval.
end - end of the node interval
exp - expression for parent
Returns:
the namelist
Throws:
DocumentValidityException - if the document is not valid

isDeclosable

public boolean isDeclosable(Element e,
                            com.sun.msv.grammar.ElementExp exp)
Checks if given element is declosable - if the contents of given element can replace the element.

Parameters:
e - the element to declose
exp - examine this expression
Returns:
true if e is declosable, false otherwise.


Copyright © 2003-2006 null. All Rights Reserved.