@API(type=EXTENDABLE,
src=PRIVATE)
public class CIElementAdapter
extends java.lang.Object
implements CIElement
CIElement adapter.
Simplifies the implementation.CONTENT_TYPE_ELEMENT_ONLY, CONTENT_TYPE_EMPTY, CONTENT_TYPE_MIXED, CONTENT_TYPE_NOT_DETERMINED| Constructor and Description |
|---|
CIElementAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGuessElement(CIElement childElement)
Add a child element to the list of element's children.
|
int |
compareTo(CIElement o) |
java.lang.String |
getAnnotation() |
java.lang.String |
getAssertions()
Returns the string representation for all assertions.
|
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.lang.String |
getFacetFractionDigitsValue()
Get the value of the
FRACTION_DIGITS facet,
can be null if it is not defined. |
java.lang.String |
getFacetLengthValue()
Get the value of the
LENGTH facet,
can be null if it is not defined. |
java.lang.String |
getFacetMaxExclusiveValue()
Get the value of the
MAX_EXCLUSIVE facet,
can be null if it is not defined. |
java.lang.String |
getFacetMaxInclusiveValue()
Get the value of the
MAX_INCLUSIVE facet,
can be null if it is not defined. |
java.lang.String |
getFacetMaxLengthValue()
Get the value of the
MAX LENGTH facet,
can be null if it is not defined. |
java.lang.String |
getFacetMinExclusiveValue()
Get the value of the
MIN_EXCLUSIVE facet,
can be null if it is not defined. |
java.lang.String |
getFacetMinInclusiveValue()
Get the value of the
MIN_INCLUSIVE facet,
can be null if it is not defined. |
java.lang.String |
getFacetMinLengthValue()
Get the value of the
MIN LENGTH facet,
can be null if it is not defined. |
java.lang.String |
getFacetPattern()
Get the value of the
PATTERN facets as String,
can be null if is not defined. |
java.lang.String |
getFacetTotalDigitsValue()
Get the value of the
TOTAL_DIGITS facet,
can be null if it is not defined. |
java.lang.String |
getFacetWhitespaceValue()
Get the value of the
WHITESPACE facet,
can be null if it is not defined. |
java.util.List<CIElement> |
getGuessElements()
Get the list with the children elements of the current element.
|
java.lang.String |
getModelDescription()
Get the model description.
|
java.lang.String |
getName()
Get the node(attribute or element) name.
|
java.lang.String |
getNamespace() |
java.lang.String |
getOpenContentMode()
Returns the mode of the open content.
|
java.lang.String |
getOpenContentWildcardDescription()
Returns the description for the open content wildcard.
|
java.util.List<java.lang.String> |
getPossibleValues()
Get the possible values as a list of
String values. |
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 |
setAssertions(java.lang.String assertions)
Sets the string representation for the node type assertions.
|
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 |
setFacetFractionDigitsValue(java.lang.String fractionDigitsFacetValue)
Set the value of the
FRACTION_DIGITS facet. |
void |
setFacetLengthValue(java.lang.String lengthFacetValue)
Set the value of the
LENGTH facet. |
void |
setFacetMaxExclusiveValue(java.lang.String maxExclusiveFacetValue)
Set the value of the
MAX_EXCLUSIVE facet. |
void |
setFacetMaxInclusiveValue(java.lang.String maxInclusiveFacetValue)
Set the value of the
MAX_INCLUSIVE facet. |
void |
setFacetMaxLengthValue(java.lang.String maxLengthFacetValue)
Set the value of the
MAX_LENGTH facet. |
void |
setFacetMinExclusiveValue(java.lang.String minExclusiveFacetValue)
Set the value of the
MIN_EXCLUSIVE facet. |
void |
setFacetMinInclusiveValue(java.lang.String minInclusiveFacetValue)
Set the value of the
MIN_INCLUSIVE facet. |
void |
setFacetMinLengthValue(java.lang.String minLengthFacetValue)
Set the value of the
MIN_LENGTH facet. |
void |
setFacetPattern(java.lang.String patternFacets)
Set the value of the
PATTERN facets. |
void |
setFacetTotalDigitsValue(java.lang.String totalDigitsFacetValue)
Set the value of the
TOTAL_DIGITS facet. |
void |
setFacetWhitespaceValue(java.lang.String whitespaceFacetValue)
Set the value of the
WHITESPACE facet. |
void |
setHasFixedValueType(boolean hasFixedValue)
Set if the element has a fixed value.
|
void |
setModelDescription(java.lang.String modelDescription)
Set the model description for the node.
|
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 |
setOpenContentMode(java.lang.String mode)
Sets the mode of the open content.
|
void |
setOpenContentWildcardDescription(java.lang.String wildcardDescription)
Sets the description for the open content wildcard.
|
void |
setPossiblesValues(java.util.List<java.lang.String> possiblesValues)
Set the list of possible values for the node.
|
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
|
public void addGuessElement(CIElement childElement)
CIElementCIElement 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.addGuessElement in interface CIElementchildElement - The CIElement element to be added as child.CIElement.addGuessElement(ro.sync.contentcompletion.xml.CIElement)public java.util.List<CIAttribute> getAttributes()
CIElementgetAttributes in interface CIElementCIAttribute or null if the
element has no attributes.CIElement.getAttributes()public java.util.List<CIAttribute> getAttributesWithDefaultValues()
CIElementgetAttributesWithDefaultValues in interface CIElementCIAttribute which have default values or null if the
element has no attributes.CIElement.getAttributesWithDefaultValues()public int getContentType()
CIElementgetContentType in interface CIElementCIElement.CONTENT_TYPE_ELEMENT_ONLY, CIElement.CONTENT_TYPE_EMPTY,
CIElement.CONTENT_TYPE_MIXED, CIElement.CONTENT_TYPE_NOT_DETERMINED.CIElement.getContentType()public java.util.List<CIElement> getGuessElements()
CIElementCIElement 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.getGuessElements in interface CIElementCIElement objects, or null if the element accepts
no children.CIElement.getGuessElements()public java.lang.String getNamespace()
getNamespace in interface CIElementnull if the
element has no namespace.CIElement.getNamespace()public java.lang.String getPrefix()
getPrefix in interface CIElementnull if the element has no prefix set.CIElement.getPrefix()public java.lang.String getQName()
CIElementgetQName in interface CIElementnull
if the local name and prefix are null.CIElement.getQName()public java.lang.String getTypeDescription()
CIElementgetTypeDescription in interface CIElementString description of the element type.CIElement.getTypeDescription()public boolean hasPrefix()
hasPrefix in interface CIElementtrue if a namespace prefix was previously set.CIElement.hasPrefix()public boolean isDeclareXmlns()
isDeclareXmlns in interface CIElementtrue if the element has an xmlns declaration.CIElement.isDeclareXmlns()public boolean isEmpty()
CIElementtrue if the element is empty because
it has empty content type or the element type is nillable.isEmpty in interface CIElementCIElement.isEmpty()public boolean isNillable()
isNillable in interface CIElementtrue if the content of the element is nillable.
Used only for XML Schema elements.CIElement.isNillable()public void setAnnotation(java.lang.String annotation)
CIElementsetAnnotation in interface CIElementannotation - A text annotation for the element, or null.CIElement.setAnnotation(java.lang.String)public void setAttributes(java.util.List<CIAttribute> attributes)
CIElementsetAttributes in interface CIElementattributes - The list of CIAttribute to be set.CIElement.setAttributes(java.util.List)public void setContentType(int contentType)
CIElementsetContentType in interface CIElementcontentType - The content type of the element.
It can be one of the constants:
CIElement.CONTENT_TYPE_ELEMENT_ONLY, CIElement.CONTENT_TYPE_EMPTY,
CIElement.CONTENT_TYPE_MIXED, CIElement.CONTENT_TYPE_NOT_DETERMINED.CIElement.setContentType(int)public void setDeclareXmlns(boolean declareXmlns)
CIElementxmlns declaration must be added
for the element.setDeclareXmlns in interface CIElementdeclareXmlns - true if the namespace must be declared.CIElement.setDeclareXmlns(boolean)public void setName(java.lang.String name)
CIElementsetName in interface CIElementname - the name of the element.CIElement.setName(java.lang.String)public void setNamespace(java.lang.String namespace)
CIElementsetNamespace in interface CIElementnamespace - The namespace URI to be set.CIElement.setNamespace(java.lang.String)public void setNillable(boolean nillable)
CIElementnillable attribute of element.
Used only for elements defined in an XML Schema.setNillable in interface CIElementnillable - true if the content of the element defined in the XML Schema
is nillable.CIElement.setNillable(boolean)public void setPrefix(java.lang.String prefix)
CIElementsetPrefix in interface CIElementprefix - The namespace prefix to be set.CIElement.setPrefix(java.lang.String)public void setTypeDescription(java.lang.String typeDescription)
CIElementsetTypeDescription in interface CIElementtypeDescription - The String representing the type description.CIElement.setTypeDescription(java.lang.String)public int compareTo(CIElement o)
compareTo in interface java.lang.Comparable<CIElement>Comparable.compareTo(java.lang.Object)public java.lang.String getAnnotation()
getAnnotation in interface NodeDescriptionnull.NodeDescription.getAnnotation()public java.lang.String getFacetFractionDigitsValue()
NodeDescriptionFRACTION_DIGITS facet,
can be null if it is not defined.getFacetFractionDigitsValue in interface NodeDescriptionFRACTION_DIGITS facet.NodeDescription.getFacetFractionDigitsValue()public java.lang.String getFacetLengthValue()
NodeDescriptionLENGTH facet,
can be null if it is not defined.getFacetLengthValue in interface NodeDescriptionLENGTH facet.NodeDescription.getFacetLengthValue()public java.lang.String getFacetMaxExclusiveValue()
NodeDescriptionMAX_EXCLUSIVE facet,
can be null if it is not defined.getFacetMaxExclusiveValue in interface NodeDescriptionMAX_EXCLUSIVE facet.NodeDescription.getFacetMaxExclusiveValue()public java.lang.String getFacetMaxInclusiveValue()
NodeDescriptionMAX_INCLUSIVE facet,
can be null if it is not defined.getFacetMaxInclusiveValue in interface NodeDescriptionMAX_INCLUSIVE facet.NodeDescription.getFacetMaxInclusiveValue()public java.lang.String getFacetMaxLengthValue()
NodeDescriptionMAX LENGTH facet,
can be null if it is not defined.getFacetMaxLengthValue in interface NodeDescriptionMAX LENGTH facet.NodeDescription.getFacetMaxLengthValue()public java.lang.String getFacetMinExclusiveValue()
NodeDescriptionMIN_EXCLUSIVE facet,
can be null if it is not defined.getFacetMinExclusiveValue in interface NodeDescriptionMIN_EXCLUSIVE facet.NodeDescription.getFacetMinExclusiveValue()public java.lang.String getFacetMinInclusiveValue()
NodeDescriptionMIN_INCLUSIVE facet,
can be null if it is not defined.getFacetMinInclusiveValue in interface NodeDescriptionMIN_INCLUSIVE facet.NodeDescription.getFacetMinInclusiveValue()public java.lang.String getFacetMinLengthValue()
NodeDescriptionMIN LENGTH facet,
can be null if it is not defined.getFacetMinLengthValue in interface NodeDescriptionMIN LENGTH facet.NodeDescription.getFacetMinLengthValue()public java.lang.String getFacetPattern()
NodeDescriptionPATTERN facets as String,
can be null if is not defined.getFacetPattern in interface NodeDescriptionPATTERN facets as a String.NodeDescription.getFacetPattern()public java.lang.String getFacetTotalDigitsValue()
NodeDescriptionTOTAL_DIGITS facet,
can be null if it is not defined.getFacetTotalDigitsValue in interface NodeDescriptionTOTAL_DIGITS facet.NodeDescription.getFacetTotalDigitsValue()public java.lang.String getFacetWhitespaceValue()
NodeDescriptionWHITESPACE facet,
can be null if it is not defined.getFacetWhitespaceValue in interface NodeDescriptionWHITESPACE facet.NodeDescription.getFacetWhitespaceValue()public java.lang.String getModelDescription()
NodeDescriptiongetModelDescription in interface NodeDescriptionNodeDescription.getModelDescription()public java.lang.String getName()
NodeDescriptiongetName in interface NodeDescriptionNodeDescription.getName()public java.util.List<java.lang.String> getPossibleValues()
NodeDescriptionString values.getPossibleValues in interface NodeDescriptionNodeDescription.getPossibleValues()public void setFacetFractionDigitsValue(java.lang.String fractionDigitsFacetValue)
NodeDescriptionFRACTION_DIGITS facet.setFacetFractionDigitsValue in interface NodeDescriptionfractionDigitsFacetValue - The value of the FRACTION_DIGITS facet to set.NodeDescription.setFacetFractionDigitsValue(java.lang.String)public void setFacetLengthValue(java.lang.String lengthFacetValue)
NodeDescriptionLENGTH facet.setFacetLengthValue in interface NodeDescriptionlengthFacetValue - The value of the LENGTH facet to set.NodeDescription.setFacetLengthValue(java.lang.String)public void setFacetMaxExclusiveValue(java.lang.String maxExclusiveFacetValue)
NodeDescriptionMAX_EXCLUSIVE facet.setFacetMaxExclusiveValue in interface NodeDescriptionmaxExclusiveFacetValue - The value of the MAX_EXCLUSIVE facet to set.NodeDescription.setFacetMaxExclusiveValue(java.lang.String)public void setFacetMaxInclusiveValue(java.lang.String maxInclusiveFacetValue)
NodeDescriptionMAX_INCLUSIVE facet.setFacetMaxInclusiveValue in interface NodeDescriptionmaxInclusiveFacetValue - The value of the MAX_INCLUSIVE facet to set.NodeDescription.setFacetMaxInclusiveValue(java.lang.String)public void setFacetMaxLengthValue(java.lang.String maxLengthFacetValue)
NodeDescriptionMAX_LENGTH facet.setFacetMaxLengthValue in interface NodeDescriptionmaxLengthFacetValue - The value of the MAX_LENGTH facet to set.NodeDescription.setFacetMaxLengthValue(java.lang.String)public void setFacetMinExclusiveValue(java.lang.String minExclusiveFacetValue)
NodeDescriptionMIN_EXCLUSIVE facet.setFacetMinExclusiveValue in interface NodeDescriptionminExclusiveFacetValue - The value of the MIN_EXCLUSIVE facet to set.NodeDescription.setFacetMinExclusiveValue(java.lang.String)public void setFacetMinInclusiveValue(java.lang.String minInclusiveFacetValue)
NodeDescriptionMIN_INCLUSIVE facet.setFacetMinInclusiveValue in interface NodeDescriptionminInclusiveFacetValue - The value of the MIN_INCLUSIVE facet to set.NodeDescription.setFacetMinInclusiveValue(java.lang.String)public void setFacetMinLengthValue(java.lang.String minLengthFacetValue)
NodeDescriptionMIN_LENGTH facet.setFacetMinLengthValue in interface NodeDescriptionminLengthFacetValue - The value of the MIN_LENGTH facet to set.NodeDescription.setFacetMinLengthValue(java.lang.String)public void setFacetPattern(java.lang.String patternFacets)
NodeDescriptionPATTERN facets.setFacetPattern in interface NodeDescriptionpatternFacets - The value of the PATTERN facets to set.NodeDescription.setFacetPattern(java.lang.String)public void setFacetTotalDigitsValue(java.lang.String totalDigitsFacetValue)
NodeDescriptionTOTAL_DIGITS facet.setFacetTotalDigitsValue in interface NodeDescriptiontotalDigitsFacetValue - The value of the TOTAL_DIGITS facet to set.NodeDescription.setFacetTotalDigitsValue(java.lang.String)public void setFacetWhitespaceValue(java.lang.String whitespaceFacetValue)
NodeDescriptionWHITESPACE facet.setFacetWhitespaceValue in interface NodeDescriptionwhitespaceFacetValue - The value of the WHITESPACE facet to set.NodeDescription.setFacetWhitespaceValue(java.lang.String)public void setModelDescription(java.lang.String modelDescription)
NodeDescriptionsetModelDescription in interface NodeDescriptionmodelDescription - The modelDescription to set.NodeDescription.setModelDescription(java.lang.String)public void setPossiblesValues(java.util.List<java.lang.String> possiblesValues)
NodeDescriptionsetPossiblesValues in interface NodeDescriptionpossiblesValues - The list with possible (String) values.NodeDescription.setPossiblesValues(java.util.List)public void setAssertions(java.lang.String assertions)
NodeDescriptionsetAssertions in interface NodeDescriptionassertions - The string representing all assertions.NodeDescription.setAssertions(String)public java.lang.String getAssertions()
NodeDescriptiongetAssertions in interface NodeDescriptionNodeDescription.getAssertions()public void setOpenContentMode(java.lang.String mode)
NodeDescriptionsetOpenContentMode in interface NodeDescriptionmode - The mode of the open content.NodeDescription.setOpenContentMode(java.lang.String)public java.lang.String getOpenContentMode()
NodeDescriptiongetOpenContentMode in interface NodeDescriptionNodeDescription.getOpenContentMode()public void setOpenContentWildcardDescription(java.lang.String wildcardDescription)
NodeDescriptionsetOpenContentWildcardDescription in interface NodeDescriptionwildcardDescription - The wildcard description.NodeDescription.setOpenContentWildcardDescription(java.lang.String)public java.lang.String getOpenContentWildcardDescription()
NodeDescriptiongetOpenContentWildcardDescription in interface NodeDescriptionNodeDescription.getOpenContentWildcardDescription()public boolean hasFixedValue()
CIElementtrue if the element has a fixed value.hasFixedValue in interface CIElementCIElement.hasFixedValue()public void setHasFixedValueType(boolean hasFixedValue)
CIElementsetHasFixedValueType in interface CIElementhasFixedValue - true if the element has a fixed value.CIElement.setHasFixedValueType(boolean)© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.