|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.sync.contentcompletion.xml.CIElementAdapter
public class CIElementAdapter
A CIElement
adapter.
Simplifies the implementation.
Field Summary |
---|
Fields inherited from interface ro.sync.contentcompletion.xml.CIElement |
---|
CONTENT_TYPE_ELEMENT_ONLY, CONTENT_TYPE_EMPTY, CONTENT_TYPE_MIXED, CONTENT_TYPE_NOT_DETERMINED |
Constructor Summary | |
---|---|
CIElementAdapter()
|
Method Summary | |
---|---|
void |
addGuessElement(CIElement childElement)
Add a child element to the list of element's children. |
int |
compareTo(CIElement o)
|
java.lang.String |
getAnnotation()
|
java.util.List<CIAttribute> |
getAttributes()
Returns the list with the element attributes. |
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.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 |
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 |
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 |
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 |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CIElementAdapter()
Method Detail |
---|
public void addGuessElement(CIElement childElement)
CIElement
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
.
addGuessElement
in interface CIElement
childElement
- The CIElement
element to be added as child.CIElement.addGuessElement(ro.sync.contentcompletion.xml.CIElement)
public java.util.List<CIAttribute> getAttributes()
CIElement
getAttributes
in interface CIElement
CIAttribute
or null
if the
element has no attributes.CIElement.getAttributes()
public int getContentType()
CIElement
getContentType
in interface CIElement
CIElement.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()
CIElement
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
.
getGuessElements
in interface CIElement
CIElement
objects, or null
if the element accepts
no children.CIElement.getGuessElements()
public java.lang.String getNamespace()
getNamespace
in interface CIElement
null
if the
element has no namespace.CIElement.getNamespace()
public java.lang.String getPrefix()
getPrefix
in interface CIElement
null
if the element has no prefix set.CIElement.getPrefix()
public java.lang.String getQName()
CIElement
getQName
in interface CIElement
null
if the local name and prefix are null
.CIElement.getQName()
public java.lang.String getTypeDescription()
CIElement
getTypeDescription
in interface CIElement
String
description of the element type.CIElement.getTypeDescription()
public boolean hasPrefix()
hasPrefix
in interface CIElement
true
if a namespace prefix was previously set.CIElement.hasPrefix()
public boolean isDeclareXmlns()
isDeclareXmlns
in interface CIElement
true
if the element has an xmlns
declaration.CIElement.isDeclareXmlns()
public boolean isEmpty()
CIElement
true
if the element is empty because
it has empty content type or the element type is nillable
.
isEmpty
in interface CIElement
CIElement.isEmpty()
public boolean isNillable()
isNillable
in interface CIElement
true
if the content of the element is nillable
.
Used only for XML Schema elements.CIElement.isNillable()
public void setAnnotation(java.lang.String annotation)
CIElement
setAnnotation
in interface CIElement
annotation
- A text annotation for the element, or null
.CIElement.setAnnotation(java.lang.String)
public void setAttributes(java.util.List<CIAttribute> attributes)
CIElement
setAttributes
in interface CIElement
attributes
- The list of CIAttribute
to be set.CIElement.setAttributes(java.util.List)
public void setContentType(int contentType)
CIElement
setContentType
in interface CIElement
contentType
- 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)
CIElement
xmlns
declaration must be added
for the element.
setDeclareXmlns
in interface CIElement
declareXmlns
- true
if the namespace must be declared.CIElement.setDeclareXmlns(boolean)
public void setName(java.lang.String name)
CIElement
setName
in interface CIElement
name
- the name of the element.CIElement.setName(java.lang.String)
public void setNamespace(java.lang.String namespace)
CIElement
setNamespace
in interface CIElement
namespace
- The namespace URI to be set.CIElement.setNamespace(java.lang.String)
public void setNillable(boolean nillable)
CIElement
nillable
attribute of element.
Used only for elements defined in an XML Schema.
setNillable
in interface CIElement
nillable
- true
if the content of the element defined in the XML Schema
is nillable
.CIElement.setNillable(boolean)
public void setPrefix(java.lang.String prefix)
CIElement
setPrefix
in interface CIElement
prefix
- The namespace prefix to be set.CIElement.setPrefix(java.lang.String)
public void setTypeDescription(java.lang.String typeDescription)
CIElement
setTypeDescription
in interface CIElement
typeDescription
- 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 NodeDescription
null
.NodeDescription.getAnnotation()
public java.lang.String getFacetFractionDigitsValue()
NodeDescription
FRACTION_DIGITS
facet,
can be null
if it is not defined.
getFacetFractionDigitsValue
in interface NodeDescription
FRACTION_DIGITS
facet.NodeDescription.getFacetFractionDigitsValue()
public java.lang.String getFacetLengthValue()
NodeDescription
LENGTH
facet,
can be null
if it is not defined.
getFacetLengthValue
in interface NodeDescription
LENGTH
facet.NodeDescription.getFacetLengthValue()
public java.lang.String getFacetMaxExclusiveValue()
NodeDescription
MAX_EXCLUSIVE
facet,
can be null
if it is not defined.
getFacetMaxExclusiveValue
in interface NodeDescription
MAX_EXCLUSIVE
facet.NodeDescription.getFacetMaxExclusiveValue()
public java.lang.String getFacetMaxInclusiveValue()
NodeDescription
MAX_INCLUSIVE
facet,
can be null
if it is not defined.
getFacetMaxInclusiveValue
in interface NodeDescription
MAX_INCLUSIVE
facet.NodeDescription.getFacetMaxInclusiveValue()
public java.lang.String getFacetMaxLengthValue()
NodeDescription
MAX LENGTH
facet,
can be null
if it is not defined.
getFacetMaxLengthValue
in interface NodeDescription
MAX LENGTH
facet.NodeDescription.getFacetMaxLengthValue()
public java.lang.String getFacetMinExclusiveValue()
NodeDescription
MIN_EXCLUSIVE
facet,
can be null
if it is not defined.
getFacetMinExclusiveValue
in interface NodeDescription
MIN_EXCLUSIVE
facet.NodeDescription.getFacetMinExclusiveValue()
public java.lang.String getFacetMinInclusiveValue()
NodeDescription
MIN_INCLUSIVE
facet,
can be null
if it is not defined.
getFacetMinInclusiveValue
in interface NodeDescription
MIN_INCLUSIVE
facet.NodeDescription.getFacetMinInclusiveValue()
public java.lang.String getFacetMinLengthValue()
NodeDescription
MIN LENGTH
facet,
can be null
if it is not defined.
getFacetMinLengthValue
in interface NodeDescription
MIN LENGTH
facet.NodeDescription.getFacetMinLengthValue()
public java.lang.String getFacetPattern()
NodeDescription
PATTERN
facets as String
,
can be null
if is not defined.
getFacetPattern
in interface NodeDescription
PATTERN
facets as a String
.NodeDescription.getFacetPattern()
public java.lang.String getFacetTotalDigitsValue()
NodeDescription
TOTAL_DIGITS
facet,
can be null
if it is not defined.
getFacetTotalDigitsValue
in interface NodeDescription
TOTAL_DIGITS
facet.NodeDescription.getFacetTotalDigitsValue()
public java.lang.String getFacetWhitespaceValue()
NodeDescription
WHITESPACE
facet,
can be null
if it is not defined.
getFacetWhitespaceValue
in interface NodeDescription
WHITESPACE
facet.NodeDescription.getFacetWhitespaceValue()
public java.lang.String getModelDescription()
NodeDescription
getModelDescription
in interface NodeDescription
NodeDescription.getModelDescription()
public java.lang.String getName()
NodeDescription
getName
in interface NodeDescription
NodeDescription.getName()
public java.util.List<java.lang.String> getPossibleValues()
NodeDescription
String
values.
getPossibleValues
in interface NodeDescription
NodeDescription.getPossibleValues()
public void setFacetFractionDigitsValue(java.lang.String fractionDigitsFacetValue)
NodeDescription
FRACTION_DIGITS
facet.
setFacetFractionDigitsValue
in interface NodeDescription
fractionDigitsFacetValue
- The value of the FRACTION_DIGITS
facet to set.NodeDescription.setFacetFractionDigitsValue(java.lang.String)
public void setFacetLengthValue(java.lang.String lengthFacetValue)
NodeDescription
LENGTH
facet.
setFacetLengthValue
in interface NodeDescription
lengthFacetValue
- The value of the LENGTH
facet to set.NodeDescription.setFacetLengthValue(java.lang.String)
public void setFacetMaxExclusiveValue(java.lang.String maxExclusiveFacetValue)
NodeDescription
MAX_EXCLUSIVE
facet.
setFacetMaxExclusiveValue
in interface NodeDescription
maxExclusiveFacetValue
- The value of the MAX_EXCLUSIVE
facet to set.NodeDescription.setFacetMaxExclusiveValue(java.lang.String)
public void setFacetMaxInclusiveValue(java.lang.String maxInclusiveFacetValue)
NodeDescription
MAX_INCLUSIVE
facet.
setFacetMaxInclusiveValue
in interface NodeDescription
maxInclusiveFacetValue
- The value of the MAX_INCLUSIVE
facet to set.NodeDescription.setFacetMaxInclusiveValue(java.lang.String)
public void setFacetMaxLengthValue(java.lang.String maxLengthFacetValue)
NodeDescription
MAX_LENGTH
facet.
setFacetMaxLengthValue
in interface NodeDescription
maxLengthFacetValue
- The value of the MAX_LENGTH
facet to set.NodeDescription.setFacetMaxLengthValue(java.lang.String)
public void setFacetMinExclusiveValue(java.lang.String minExclusiveFacetValue)
NodeDescription
MIN_EXCLUSIVE
facet.
setFacetMinExclusiveValue
in interface NodeDescription
minExclusiveFacetValue
- The value of the MIN_EXCLUSIVE
facet to set.NodeDescription.setFacetMinExclusiveValue(java.lang.String)
public void setFacetMinInclusiveValue(java.lang.String minInclusiveFacetValue)
NodeDescription
MIN_INCLUSIVE
facet.
setFacetMinInclusiveValue
in interface NodeDescription
minInclusiveFacetValue
- The value of the MIN_INCLUSIVE
facet to set.NodeDescription.setFacetMinInclusiveValue(java.lang.String)
public void setFacetMinLengthValue(java.lang.String minLengthFacetValue)
NodeDescription
MIN_LENGTH
facet.
setFacetMinLengthValue
in interface NodeDescription
minLengthFacetValue
- The value of the MIN_LENGTH
facet to set.NodeDescription.setFacetMinLengthValue(java.lang.String)
public void setFacetPattern(java.lang.String patternFacets)
NodeDescription
PATTERN
facets.
setFacetPattern
in interface NodeDescription
patternFacets
- The value of the PATTERN
facets to set.NodeDescription.setFacetPattern(java.lang.String)
public void setFacetTotalDigitsValue(java.lang.String totalDigitsFacetValue)
NodeDescription
TOTAL_DIGITS
facet.
setFacetTotalDigitsValue
in interface NodeDescription
totalDigitsFacetValue
- The value of the TOTAL_DIGITS
facet to set.NodeDescription.setFacetTotalDigitsValue(java.lang.String)
public void setFacetWhitespaceValue(java.lang.String whitespaceFacetValue)
NodeDescription
WHITESPACE
facet.
setFacetWhitespaceValue
in interface NodeDescription
whitespaceFacetValue
- The value of the WHITESPACE
facet to set.NodeDescription.setFacetWhitespaceValue(java.lang.String)
public void setModelDescription(java.lang.String modelDescription)
NodeDescription
setModelDescription
in interface NodeDescription
modelDescription
- The modelDescription to set.NodeDescription.setModelDescription(java.lang.String)
public void setPossiblesValues(java.util.List<java.lang.String> possiblesValues)
NodeDescription
setPossiblesValues
in interface NodeDescription
possiblesValues
- The list with possible (String
) values.NodeDescription.setPossiblesValues(java.util.List)
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |