|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IElementRuleP
Represents rule for one element, already present in the document. You can assume that element is not modified while this instance is used.
Method Summary | |
---|---|
List<? extends Element> |
areElementsDeletable(Set<? extends Element> elements)
Checks whether given elements are deletable. |
IAttributeRuleP |
getAttributeRule(Attr attribute)
Returns rule for given attribute. |
INameListP<? extends INewElementRuleP> |
getEnclosingElements(sk.baka.ikslibs.ptr.DOMPoint start,
sk.baka.ikslibs.ptr.DOMPoint end)
Computes and returns an one-sized insertlist of elements, that can enclose given nodeset. |
INameListP<? extends IAttributeRuleP> |
getInsertableAttributes()
Returns all attributes that can be created in this element. |
List<? extends IInsertListP> |
getInsertableElements(sk.baka.ikslibs.ptr.DOMPoint point)
Computes insertable elements, with their positions between other nodes. |
IValueRule |
getValueRule()
Gets text acceptor, that checks valid text values for given element. |
boolean |
isAnyStringInsertable(sk.baka.ikslibs.ptr.DOMPoint ip)
Checks, if there can be any string inserted into given point. |
boolean |
isDeclosable(Element e)
Checks if given element is declosable - if the contents of given element can replace the element. |
boolean |
isDeletable(sk.baka.ikslibs.ptr.DOMPoint start,
sk.baka.ikslibs.ptr.DOMPoint end)
Checks if given interval is removable from the document. |
boolean |
isDeletable(Node node)
Checks if a simple node is deletable from the element. |
boolean |
isDeletableAttribute(Attr attribute)
Checks, whether given attribute is deletable from its element. |
boolean |
isInsertable(sk.baka.ikslibs.ptr.DOMPoint ip,
Node node)
Checks if given nodes are insertable into given position. |
void |
validate()
Validates the element. |
Method Detail |
---|
INameListP<? extends IAttributeRuleP> getInsertableAttributes()
AttributeRule
instances - all
attribute rules, that can be added to element e
.boolean isDeletableAttribute(Attr attribute)
attribute
- attribute to check. It may be foreign attribute also.
List<? extends IInsertListP> getInsertableElements(sk.baka.ikslibs.ptr.DOMPoint point)
point
- insertion point, before which we want to insert element. If
InsertPoint.FIRST
, new element will be created before
first node.
IValueRule getValueRule()
null
.boolean isAnyStringInsertable(sk.baka.ikslibs.ptr.DOMPoint ip)
Checks, if there can be any string inserted into given point. Must be used only for element, that contains some elements - if true, then any string can be inserted at selected position, if false, then no string can be inserted at all.
When element doesn't contain no child element, then
getValueRule
should be used: it returns more useful rule.
ip
- insert point, where we want to insert some text. ip.pos must be
equal to zero.
IAttributeRuleP getAttributeRule(Attr attribute)
attribute
- attribute, which rule must be returned. It must be a
local attribute.
List<? extends Element> areElementsDeletable(Set<? extends Element> elements)
null
is returned then given elements
are not deletable.
elements
- set of elements that are to be deleted.
elements
aswell. If null
is returned then
given elements cannot be deleted.
IllegalArgumentException
- if given elements are not children of
the context element.INameListP<? extends INewElementRuleP> getEnclosingElements(sk.baka.ikslibs.ptr.DOMPoint start, sk.baka.ikslibs.ptr.DOMPoint end)
start
- the start of the nodeset. It must point before the
end
insertpoint.end
- the end of the nodeset.
null
is returned then no such element is suitable.boolean isDeclosable(Element e)
e
- the element to declose
true
if e is declosable, false
otherwise.boolean isDeletable(Node node)
node
- the node to query. Only the text/cdata/element/entity node
that is child of context element can be queried.
true
if the node is deletable, false otherwise.boolean isInsertable(sk.baka.ikslibs.ptr.DOMPoint ip, Node node)
ip
- the point where the sequence shall be insertednode
- the node to insert. Entities, Entity references and document
fragments are automatically expanded - replaced by their children. The
node may be or contain any type of node, including entity references,
comments etc.
true
if these nodes are insertable,
false
otherwise.boolean isDeletable(sk.baka.ikslibs.ptr.DOMPoint start, sk.baka.ikslibs.ptr.DOMPoint end)
start
- the start of the intervalend
- the end of the interval
true
if these nodes are removable,
false
otherwise.void validate() throws SchemaException
Validates the element. It must be full validation, no elements nor texts must not be skipped. If this element is not valid, exception must be thrown.
When element from another namespace uri is encountered in the process of
validation, just call ValidationContextP.validate()
to
validate this unknown element.
The only exception to this rule is emp:id
attribute, which
the schema must ignore.
SchemaException
- if something goes wrong in the process of
validation. The Schema
instance must provide as much
information as possible about error. It should display path to errorneous
element with getPathToRoot()
method of
EuromathSchemaProvider
class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |