xml.completion
Class ElementDecl

java.lang.Object
  extended by xml.completion.ElementDecl
Direct Known Subclasses:
XsdElementDecl

public class ElementDecl
extends java.lang.Object


Nested Class Summary
static class ElementDecl.AttributeDecl
           
static class ElementDecl.Compare
           
 
Field Summary
 boolean any
           
 java.util.Map<java.lang.String,ElementDecl.AttributeDecl> attributeHash
           
 java.util.List<ElementDecl.AttributeDecl> attributes
           
 CompletionInfo completionInfo
           
 java.util.Set<java.lang.String> content
           
 java.util.Map<java.lang.String,ElementDecl> elementHash
           
 boolean empty
           
 java.lang.String name
           
 
Constructor Summary
ElementDecl(CompletionInfo completionInfo, java.lang.String name, java.lang.String content)
           
 
Method Summary
 void addAttribute(ElementDecl.AttributeDecl attribute)
           
 java.util.List<ElementDecl> findReplacements()
          Finds all elements which can be replaced by this one.
 ElementDecl.AttributeDecl getAttribute(java.lang.String attrname)
           
 java.util.List<ElementDecl> getChildElements()
           
 java.lang.String getRequiredAttributesString(NamespaceBindings namespaces, NamespaceBindings namespacesToInsert)
           
 boolean isAbstract()
           
 void setContent(java.lang.String content)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

completionInfo

public CompletionInfo completionInfo

name

public java.lang.String name

empty

public boolean empty

any

public boolean any

attributes

public java.util.List<ElementDecl.AttributeDecl> attributes

attributeHash

public java.util.Map<java.lang.String,ElementDecl.AttributeDecl> attributeHash

content

public java.util.Set<java.lang.String> content

elementHash

public java.util.Map<java.lang.String,ElementDecl> elementHash
Constructor Detail

ElementDecl

public ElementDecl(CompletionInfo completionInfo,
                   java.lang.String name,
                   java.lang.String content)
Method Detail

isAbstract

public boolean isAbstract()
Returns:
true if this is an abstract element, representing a class of other elements (used in w3c xsd)

setContent

public void setContent(java.lang.String content)

getChildElements

public java.util.List<ElementDecl> getChildElements()

findReplacements

public java.util.List<ElementDecl> findReplacements()
Finds all elements which can be replaced by this one.

Returns:
a list of all elements with matching substitutionGroup, or null if there are none.

getAttribute

public ElementDecl.AttributeDecl getAttribute(java.lang.String attrname)

addAttribute

public void addAttribute(ElementDecl.AttributeDecl attribute)

getRequiredAttributesString

public java.lang.String getRequiredAttributesString(NamespaceBindings namespaces,
                                                    NamespaceBindings namespacesToInsert)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object