@API(type=EXTENDABLE,
src=PRIVATE)
public class CIValue
extends java.lang.Object
implements java.lang.Comparable<CIValue>
| Modifier and Type | Field and Description |
|---|---|
protected int |
afterInsertCaretPosition
The position in text where to place the caret position after insert value.
|
static int |
TYPE_FILE_NAME
Marks that the value represents a name of a file.
|
static int |
TYPE_FOLDER
Marks that the value represents a name of a folder.
|
static int |
TYPE_PLAIN
Marks that the value is a plain text value with no additional meaning.
|
static int |
TYPE_XSLT_ATTRIBUTE
Marks that the value represents a name of an attribute from the document.
|
static int |
TYPE_XSLT_AXIS
Marks that the value represents an axis in XSLT.
|
static int |
TYPE_XSLT_ELEMENT
Marks that the value represents a name of an element from the document.
|
static int |
TYPE_XSLT_FUNCTION
Marks that the value represents an XSLT function.
|
| Constructor and Description |
|---|
CIValue(java.lang.String value)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
boolean defaultValue)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type,
boolean defaultValue)
Creates a CIValue.
|
CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type,
boolean defaultValue,
int afterInsertCaretPosition)
Creates a CIValue.
|
CIValue(java.lang.String fullPrefix,
CIValue ciValue)
Create a CIValue from another one by adding a prefix to the original value.
|
CIValue(java.lang.String value,
java.lang.String annotation)
Creates a CIValue.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CIValue other)
Compares the String values.
|
boolean |
equals(java.lang.Object obj)
Test if a
CIValue is equal with this one. |
int |
getAfterInsertCaretPosition()
Get the relative position where to place the caret after the value is inserted.
|
java.lang.String |
getAnnotation()
Get the annotation associated with this value.
|
static CIValue[] |
getCIFromIDValues(java.util.Collection<ro.sync.xml.parser.IDValue> values,
boolean multipleValue)
Utility method to get an array of
CIValue from a list of strings. |
static CIValue[] |
getCIValues(java.util.Collection<java.lang.String> values)
Utility method to get an array of
CIValue from a list of strings. |
static java.util.List<CIValue> |
getCIValuesAsList(java.util.Collection<java.lang.String> values)
Get a list of
CIValue from a list of strings. |
static java.util.List<CIValue> |
getCIValuesAsList(java.util.Collection<java.lang.String> values,
java.lang.String defaultValue)
Get a list of
CIValue from a list of strings. |
java.lang.String |
getInsertString()
Get the insert string.
|
int |
getType()
Get the type of the value.
|
java.lang.String |
getValue()
Get the actual value as detected in the associated schema.
|
int |
hashCode() |
boolean |
isDefaultValue()
Get the default value flag.
|
boolean |
isListValue()
Check if the value is an entry in a list value.
|
void |
setAfterInsertCaretPosition(int afterInsertCaretPosition)
Set the relative position where to place the caret after the value is inserted.
|
void |
setAnnotation(java.lang.String annotation)
Set the annotation associated with this value.
|
void |
setDefaultValue()
Mark the value as default value.
|
void |
setInsertString(java.lang.String insertString)
Sets the insert string.
|
void |
setListValue()
Mark the value as belonging to a list value.
|
protected void |
setValue(java.lang.String value)
Sets the value.
|
java.lang.String |
toString()
Get a String representation of this
CIValue. |
java.lang.Object |
valueOf(java.lang.String str)
IMPORTANT DO NOT DELETE!
This is needed by a combo box editor to see if it is the same value as the old one.
|
protected int afterInsertCaretPosition
-1, then the caret position is not and must be computed.public static final int TYPE_PLAIN
0public static final int TYPE_XSLT_AXIS
1public static final int TYPE_XSLT_FUNCTION
2public static final int TYPE_XSLT_ELEMENT
3public static final int TYPE_XSLT_ATTRIBUTE
4public static final int TYPE_FOLDER
5public static final int TYPE_FILE_NAME
6public CIValue(java.lang.String value)
value - The actual value.public CIValue(java.lang.String value,
boolean listValue)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.public CIValue(java.lang.String value,
java.lang.String annotation)
value - The actual value.annotation - The annotation associated with this value.public CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.annotation - The annotation associated with this value.public CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
boolean defaultValue)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.annotation - The annotation associated with this value.defaultValue - true if it is the default value.public CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.annotation - The annotation associated with this value.insertString - The string to be inserted in the document when the CIValue
is chosen from the content completion list of proposals.
If null, the value will be used.type - The type of the value. Use by the renderer.
TYPE_PLAIN, TYPE_XSLT_AXIS,
TYPE_XSLT_FUNCTION, TYPE_XSLT_ELEMENT, TYPE_XSLT_ATTRIBUTEpublic CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type,
boolean defaultValue)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.annotation - The annotation associated with this value.insertString - The string to be inserted in the document when the CIValue
is chosen from the content completion list of proposals.
If null, the value will be used.type - The type of the value. Use by the renderer.
TYPE_PLAIN, TYPE_XSLT_AXIS,
TYPE_XSLT_FUNCTION, TYPE_XSLT_ELEMENT, TYPE_XSLT_ATTRIBUTEdefaultValue - true if it is the default value.public CIValue(java.lang.String value,
boolean listValue,
java.lang.String annotation,
java.lang.String insertString,
int type,
boolean defaultValue,
int afterInsertCaretPosition)
value - The actual value.listValue - Flag indicating if the value is an entry from a list value.annotation - The annotation associated with this value.insertString - The string to be inserted in the document when the CIValue
is chosen from the content completion list of proposals.
If null, the value will be used.type - The type of the value. Use by the renderer.
TYPE_PLAIN, TYPE_XSLT_AXIS,
TYPE_XSLT_FUNCTION, TYPE_XSLT_ELEMENT, TYPE_XSLT_ATTRIBUTEdefaultValue - true if it is the default value.afterInsertCaretPosition - The position in text where to place the caret position after insert value.
If value is -1, then the caret position is not and must be computed.public CIValue(java.lang.String fullPrefix,
CIValue ciValue)
fullPrefix - The full prefix of the value field.ciValue - The CIValue to use when creating a new one.public java.lang.String getValue()
CIValue.public boolean isListValue()
true if the value is part of a list.public void setListValue()
public java.lang.String getAnnotation()
public void setAnnotation(java.lang.String annotation)
annotation - The value annotation.public static CIValue[] getCIValues(java.util.Collection<java.lang.String> values)
CIValue from a list of strings.
Assumes no annotations and no list types are present.values - A collection of String values.public static CIValue[] getCIFromIDValues(java.util.Collection<ro.sync.xml.parser.IDValue> values, boolean multipleValue)
CIValue from a list of strings.
Assumes no annotations and no list types are present.values - A collection of String values.multipleValue - true if the value allows multiple values.public static java.util.List<CIValue> getCIValuesAsList(java.util.Collection<java.lang.String> values)
CIValue from a list of strings.
Assumes no annotation and no list types are present.values - A collection of String values.CIValues.public static java.util.List<CIValue> getCIValuesAsList(java.util.Collection<java.lang.String> values, java.lang.String defaultValue)
CIValue from a list of strings.
Assumes no annotation and no list types are present.values - A collection of String values.defaultValue - The default valueCIValues.public boolean equals(java.lang.Object obj)
CIValue is equal with this one.equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isDefaultValue()
public void setDefaultValue()
public java.lang.String toString()
CIValue.toString in class java.lang.ObjectObject.toString()public int compareTo(CIValue other)
compareTo in interface java.lang.Comparable<CIValue>Comparable.compareTo(java.lang.Object)public java.lang.String getInsertString()
public void setInsertString(java.lang.String insertString)
insertString - The value to be inserted in the document.public int getType()
TYPE_PLAIN,
TYPE_XSLT_AXIS,
TYPE_XSLT_FUNCTION,
TYPE_XSLT_ELEMENT or
TYPE_XSLT_ATTRIBUTE.public java.lang.Object valueOf(java.lang.String str)
str - The str.public int getAfterInsertCaretPosition()
-1 the caret position was not computed.public void setAfterInsertCaretPosition(int afterInsertCaretPosition)
afterInsertCaretPosition - The afterInsertCaretPosition to set.protected void setValue(java.lang.String value)
value - The new value.© Copyright SyncRO Soft SRL 2002 - 2014. All rights reserved.