public interface CMElementDeclaration
Modifier and Type | Field and Description |
---|---|
static Collection<CMElementDeclaration> |
ANY_ELEMENT_DECLARATIONS |
Modifier and Type | Method and Description |
---|---|
default CMAttributeDeclaration |
findCMAttribute(DOMAttr attr)
Returns the declared attribute which match the given name and null otherwise.
|
CMAttributeDeclaration |
findCMAttribute(String attributeName,
String namespace)
Returns the declared attribute which match the given name and null otherwise.
|
CMElementDeclaration |
findCMElement(String tag,
String namespace)
Returns the declared element which matches the given XML tag name / namespace
and null otherwise.
|
Collection<CMAttributeDeclaration> |
getAttributes()
Returns the attributes of this declared element.
|
String |
getDocumentation(ISharedSettingsRequest request)
Returns formatted documentation of the declared element, according to
settings defined in
request . |
String |
getDocumentURI()
Returns the owner document URI where the element is declared.
|
Collection<CMElementDeclaration> |
getElements()
Returns the children declared element of this declared element.
|
Collection<String> |
getEnumerationValues()
Return the enumeration values.
|
String |
getLocalName()
Returns the declared element local name.
|
default String |
getName(String prefix)
Returns the declared element name with the given prefix.
|
String |
getNamespace()
Returns the target namespace and null otherwise.
|
Collection<CMElementDeclaration> |
getPossibleElements(DOMElement parentElement,
int offset)
Returns the possible declared elements at the given offset of the given
parent element.
|
String |
getPrefix(String namespaceURI)
Returns the xmlns prefix from the given namespace URI and null otherwise.
|
String |
getTextDocumentation(String value,
ISharedSettingsRequest request)
Returns the documentation for the given enumeration value and null otherwise.
|
boolean |
isEmpty()
Returns true if the element cannot contains element children or text content
and false otherwise.
|
boolean |
isMixedContent()
Returns true if the element can contains text and element both and false
otherwise.
|
boolean |
isNillable()
Returns true if the element can have an explicit null value assigned to it.
|
boolean |
isOptional(String childElementName)
Returns true if the child element name is optional and false otherwise.
|
boolean |
isStringType()
Returns true if the element is a string type (ex : xs:string) and false
otherwise.
|
static final Collection<CMElementDeclaration> ANY_ELEMENT_DECLARATIONS
String getLocalName()
String getNamespace()
String getPrefix(String namespaceURI)
namespaceURI
- the namespacedefault String getName(String prefix)
Collection<CMAttributeDeclaration> getAttributes()
Collection<CMElementDeclaration> getElements()
Collection<CMElementDeclaration> getPossibleElements(DOMElement parentElement, int offset)
parentElement
- the parent elementoffset
- the offsetCMElementDeclaration findCMElement(String tag, String namespace)
tag
- namespace
- default CMAttributeDeclaration findCMAttribute(DOMAttr attr)
attribute
- the DOM attributeCMAttributeDeclaration findCMAttribute(String attributeName, String namespace)
attributeName
- the attribute name.namespace
- the attribute namespace and null otherwise.String getDocumentation(ISharedSettingsRequest request)
request
.request
- the request containing settingsrequest
.boolean isEmpty()
boolean isNillable()
Collection<String> getEnumerationValues()
String getTextDocumentation(String value, ISharedSettingsRequest request)
value
- the enumeration value.request
- the shared settings.String getDocumentURI()
boolean isStringType()
boolean isMixedContent()
boolean isOptional(String childElementName)
Copyright © 2022. All rights reserved.