@API(type=NOT_EXTENDABLE, src=PRIVATE) public interface CIElement extends java.lang.Comparable<CIElement>, NodeDescription
Modifier and Type | Field and Description |
---|---|
static int |
CONTENT_TYPE_ELEMENT_ONLY
Elements with complex content, element only content type.
|
static int |
CONTENT_TYPE_EMPTY
Elements with complex content, empty content type.
|
static int |
CONTENT_TYPE_MIXED
Elements with complex content, mixed content type.
|
static int |
CONTENT_TYPE_NOT_DETERMINED
Type for elements with simple content.
|
Modifier and Type | Method and Description |
---|---|
void |
addGuessElement(CIElement childElement)
Add a child element to the list of element's children.
|
java.util.List<CIAttribute> |
getAttributes()
Returns the list with the element attributes.
|
java.util.List<CIAttribute> |
getAttributesWithDefaultValues()
Returns the list with the element attributes which have default values.
|
int |
getContentType()
Get the content type of the element.
|
java.util.List<CIElement> |
getGuessElements()
Get the list with the children elements of the current element.
|
java.lang.String |
getNamespace() |
java.lang.String |
getPrefix() |
java.lang.String |
getQName()
Returns the qualified name of the element.
|
java.lang.String |
getTypeDescription()
Gets the type description for the element.
|
boolean |
hasFixedValue()
true if the element has a fixed value. |
boolean |
hasPrefix() |
boolean |
isDeclareXmlns() |
boolean |
isEmpty()
true if the element is empty because
it has empty content type or the element type is nillable . |
boolean |
isNillable() |
void |
setAnnotation(java.lang.String annotation)
Sets the annotation for the element.
|
void |
setAttributes(java.util.List<CIAttribute> attributes)
Sets the list with the element attributes.
|
void |
setContentType(int contentType)
Sets the content type of the element.
|
void |
setDeclareXmlns(boolean declareXmlns)
Sets the value of the flag indicating if the
xmlns declaration must be added
for the element. |
void |
setHasFixedValueType(boolean hasFixedValue)
Set if the element has a fixed value.
|
void |
setName(java.lang.String name)
Set the name of the element.
|
void |
setNamespace(java.lang.String namespace)
Set the namespace URI for the element.
|
void |
setNillable(boolean nillable)
Sets the flag representing the value of the
nillable attribute of element. |
void |
setPrefix(java.lang.String prefix)
Set the prefix associated with the element namespace.
|
void |
setTypeDescription(java.lang.String typeDescription)
Sets the type description for the current element
|
getAnnotation, getAssertions, getFacetFractionDigitsValue, getFacetLengthValue, getFacetMaxExclusiveValue, getFacetMaxInclusiveValue, getFacetMaxLengthValue, getFacetMinExclusiveValue, getFacetMinInclusiveValue, getFacetMinLengthValue, getFacetPattern, getFacetTotalDigitsValue, getFacetWhitespaceValue, getModelDescription, getName, getOpenContentMode, getOpenContentWildcardDescription, getPossibleValues, setAssertions, setFacetFractionDigitsValue, setFacetLengthValue, setFacetMaxExclusiveValue, setFacetMaxInclusiveValue, setFacetMaxLengthValue, setFacetMinExclusiveValue, setFacetMinInclusiveValue, setFacetMinLengthValue, setFacetPattern, setFacetTotalDigitsValue, setFacetWhitespaceValue, setModelDescription, setOpenContentMode, setOpenContentWildcardDescription, setPossiblesValues
static final int CONTENT_TYPE_NOT_DETERMINED
-1
static final int CONTENT_TYPE_EMPTY
1
.static final int CONTENT_TYPE_ELEMENT_ONLY
2
.static final int CONTENT_TYPE_MIXED
3
.java.util.List<CIElement> getGuessElements()
CIElement
is chosen from the list of proposed elements
(e.g. the list of proposals from the Content Completion window), the children elements
are also inserted in the document.
person
is the current CIElement
,
and the list of children contains the elements name
and address
, the result of choosing
the person entry from the Content Completion window
will be the insertion of the following sequence:
<person>
<name>...</name>
<address>...</address>
</person>
This method can be implemented by the CIElements returned by the
SchemaManagerFilter.filterElements(List, WhatElementsCanGoHereContext)
method
in order to return a customized list of children, thus modifying the original list proposed
by the SchemaManager
.CIElement
objects, or null
if the element accepts
no children.void addGuessElement(CIElement childElement)
CIElement
is chosen from the list of proposed elements
(e.g. the list of proposals from the Content Completion window), the children elements
are also inserted.
person
is the current CIElement
,
and the list of children contains the elements name
and address
, the result of choosing
the person entry from the Content Completion window
will be the insertion of the following sequence:
<person>
<name>...</name>
<address>...</address>
</person>
This method can be used in the SchemaManagerFilter.filterElements(List, WhatElementsCanGoHereContext)
method to add new children to the CIElements
proposed by the original SchemaManager
.childElement
- The CIElement
element to be added as child.java.lang.String getNamespace()
null
if the
element has no namespace.void setDeclareXmlns(boolean declareXmlns)
xmlns
declaration must be added
for the element.declareXmlns
- true
if the namespace must be declared.void setContentType(int contentType)
contentType
- The content type of the element.
It can be one of the constants:
CONTENT_TYPE_ELEMENT_ONLY
, CONTENT_TYPE_EMPTY
,
CONTENT_TYPE_MIXED
, CONTENT_TYPE_NOT_DETERMINED
.void setHasFixedValueType(boolean hasFixedValue)
hasFixedValue
- true
if the element has a fixed value.boolean isEmpty()
true
if the element is empty because
it has empty content type or the element type is nillable
.boolean hasFixedValue()
true
if the element has a fixed value.int getContentType()
CONTENT_TYPE_ELEMENT_ONLY
, CONTENT_TYPE_EMPTY
,
CONTENT_TYPE_MIXED
, CONTENT_TYPE_NOT_DETERMINED
.boolean isDeclareXmlns()
true
if the element has an xmlns
declaration.void setName(java.lang.String name)
name
- the name of the element.void setPrefix(java.lang.String prefix)
prefix
- The namespace prefix to be set.void setNamespace(java.lang.String namespace)
namespace
- The namespace URI to be set.java.lang.String getQName()
null
if the local name and prefix are null
.java.util.List<CIAttribute> getAttributes()
CIAttribute
or null
if the
element has no attributes.java.util.List<CIAttribute> getAttributesWithDefaultValues()
CIAttribute
which have default values or null
if the
element has no attributes.void setAttributes(java.util.List<CIAttribute> attributes)
attributes
- The list of CIAttribute
to be set.boolean hasPrefix()
true
if a namespace prefix was previously set.java.lang.String getPrefix()
null
if the element has no prefix set.void setAnnotation(java.lang.String annotation)
annotation
- A text annotation for the element, or null
.java.lang.String getTypeDescription()
String
description of the element type.void setTypeDescription(java.lang.String typeDescription)
typeDescription
- The String representing the type description.void setNillable(boolean nillable)
nillable
attribute of element.
Used only for elements defined in an XML Schema.nillable
- true
if the content of the element defined in the XML Schema
is nillable
.boolean isNillable()
true
if the content of the element is nillable
.
Used only for XML Schema elements.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.