@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_ANT_EXTENSION_POINT
Marks that the value represents an Ant extension-point.
|
static int |
TYPE_ANT_PROPERTY
Marks that the value represents an Ant property.
|
static int |
TYPE_ANT_REFERENCE
Marks that the value represents an Ant reference.
|
static int |
TYPE_ANT_TARGET
Marks that the value represents an Ant target.
|
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_SCH_DIAGNOSTIC
Marks that the value represents a schematron diagnostic type.
|
static int |
TYPE_SCH_PATTERN
Marks that the value represents a schematron pattern type.
|
static int |
TYPE_SCH_PHASE
Marks that the value represents a schematron phase type.
|
static int |
TYPE_SCH_RULE
Marks that the value represents a schematron rule type.
|
static int |
TYPE_SCH_VARIABLE
Marks that the value represents a schematron variable type.
|
static int |
TYPE_UNKNOWN
Marks that value represents either a name of a file or a name of a folder,
but it cannot be easily established because of a very time-consuming operation involved.
|
static int |
TYPE_WSDL_BINDING
Marks that the value represents a WSDL binding type.
|
static int |
TYPE_WSDL_MESSAGE
Marks that the value represents a WSDL message type.
|
static int |
TYPE_WSDL_MESSAGE_PART
Marks that the value represents a WSDL message part type.
|
static int |
TYPE_WSDL_OPERATION_FAULT
Marks that the value represents a WSDL operation fault type.
|
static int |
TYPE_WSDL_OPERATION_INPUT
Marks that the value represents a WSDL operation input type.
|
static int |
TYPE_WSDL_OPERATION_OUTPUT
Marks that the value represents a WSDL operation output type.
|
static int |
TYPE_WSDL_PORT_TYPE
Marks that the value represents a WSDL port type type.
|
static int |
TYPE_WSDL_PORT_TYPE_OPERATION
Marks that the value represents a WSDL port type operation type.
|
static int |
TYPE_XSD_ATTRIBUTE
Marks that the value represents a XSD attribute.
|
static int |
TYPE_XSD_ATTRIBUTE_GROUP
Marks that the value represents a XSD attribute group.
|
static int |
TYPE_XSD_COMPLEX_TYPE
Marks that the value represents a XSD complex type.
|
static int |
TYPE_XSD_CONSTRAINT
Marks that the value represents a XSD key or unique element.
|
static int |
TYPE_XSD_ELEMENT
Marks that the value represents a XSD element.
|
static int |
TYPE_XSD_GROUP
Marks that the value represents a XSD group.
|
static int |
TYPE_XSD_NOTATION
Marks that the value represents a XSD notation.
|
static int |
TYPE_XSD_SIMPLE_OR_COMPLEX_TYPE
Marks that the value represents a XSD simple or complex type.
|
static int |
TYPE_XSD_SIMPLE_TYPE
Marks that the value represents a XSD simple type.
|
static int |
TYPE_XSLT_ATTRIBUTE
Marks that the value represents a name of an attribute from the document.
|
static int |
TYPE_XSLT_ATTRIBUTE_SET
Marks that the value represents a XSLT attribute set.
|
static int |
TYPE_XSLT_AXIS
Marks that the value represents an axis in XSLT.
|
static int |
TYPE_XSLT_CHARACTER_MAP
Marks that the value represents a XSLT character map.
|
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.
|
static int |
TYPE_XSLT_KEY
Marks that the value represents a XSLT key.
|
static int |
TYPE_XSLT_LOCAL_PARAM
Marks that the value represents an XSLT local parameter.
|
static int |
TYPE_XSLT_LOCAL_VARIABLE
Marks that the value represents an XSLT local variable.
|
static int |
TYPE_XSLT_MODE
Marks that the value represents a XSLT mode.
|
static int |
TYPE_XSLT_OUTPUT
Marks that the value represents a XSLT output.
|
static int |
TYPE_XSLT_PARAM
Marks that the value represents a XSLT param.
|
static int |
TYPE_XSLT_TEMPLATE
Marks that the value represents a XSLT template.
|
static int |
TYPE_XSLT_VARIABLE
Marks that the value represents a XSLT variable.
|
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.
|
CIValue(java.lang.String value,
java.lang.String annotation,
int type)
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 CIValue[] |
getCIValues(java.util.Collection<java.lang.String> values,
int type)
Utility method to get an array of
CIValue from a list of strings. |
static CIValue[] |
getCIValues(java.util.Collection<java.lang.String> values,
int type,
boolean listValue)
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. |
static java.util.List<CIValue> |
getCIValuesAsList(java.util.Collection<java.lang.String> values,
java.lang.String defaultValue,
int type)
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.
|
void |
setType(int type)
Set the value type.
|
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
0
public static final int TYPE_XSLT_AXIS
1
public static final int TYPE_XSLT_FUNCTION
2
public static final int TYPE_XSLT_ELEMENT
3
public static final int TYPE_XSLT_ATTRIBUTE
4
public static final int TYPE_FOLDER
5
public static final int TYPE_FILE_NAME
6
public static final int TYPE_UNKNOWN
7
public static final int TYPE_ANT_PROPERTY
8
public static final int TYPE_ANT_TARGET
9
public static final int TYPE_ANT_EXTENSION_POINT
10
public static final int TYPE_ANT_REFERENCE
11
public static final int TYPE_XSLT_PARAM
12
public static final int TYPE_XSLT_MODE
13
public static final int TYPE_XSLT_TEMPLATE
14
public static final int TYPE_XSLT_KEY
15
public static final int TYPE_XSLT_OUTPUT
16
public static final int TYPE_XSLT_ATTRIBUTE_SET
17
public static final int TYPE_XSLT_CHARACTER_MAP
18
public static final int TYPE_XSLT_VARIABLE
19
public static final int TYPE_XSD_COMPLEX_TYPE
20
public static final int TYPE_XSD_SIMPLE_TYPE
21
public static final int TYPE_XSD_ATTRIBUTE
22
public static final int TYPE_XSD_ATTRIBUTE_GROUP
23
public static final int TYPE_XSD_ELEMENT
24
public static final int TYPE_XSD_NOTATION
25
public static final int TYPE_XSD_GROUP
26
public static final int TYPE_XSD_SIMPLE_OR_COMPLEX_TYPE
27
public static final int TYPE_WSDL_PORT_TYPE_OPERATION
public static final int TYPE_WSDL_PORT_TYPE
public static final int TYPE_WSDL_MESSAGE
public static final int TYPE_WSDL_OPERATION_INPUT
public static final int TYPE_WSDL_OPERATION_OUTPUT
public static final int TYPE_WSDL_OPERATION_FAULT
public static final int TYPE_WSDL_BINDING
public static final int TYPE_WSDL_MESSAGE_PART
public static final int TYPE_XSD_CONSTRAINT
public static final int TYPE_SCH_VARIABLE
public static final int TYPE_SCH_DIAGNOSTIC
public static final int TYPE_SCH_PATTERN
public static final int TYPE_SCH_PHASE
public static final int TYPE_SCH_RULE
public static final int TYPE_XSLT_LOCAL_PARAM
public static final int TYPE_XSLT_LOCAL_VARIABLE
public 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, java.lang.String annotation, int type)
value
- The actual value.annotation
- The annotation associated with this value.type
- The value type.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_ATTRIBUTE
,
TYPE_ANT_EXTENSION_POINT
, TYPE_ANT_PROPERTY
, TYPE_ANT_REFERENCE
,
TYPE_ANT_TARGET
.public 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_ATTRIBUTE
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, 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_ATTRIBUTE
defaultValue
- 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[] getCIValues(java.util.Collection<java.lang.String> values, int type)
CIValue
from a list of strings.
Assumes no annotations and no list types are present.values
- A collection of String
values.type
- The type of value.public static CIValue[] getCIValues(java.util.Collection<java.lang.String> values, int type, boolean listValue)
CIValue
from a list of strings.
Assumes no annotations and no list types are present.values
- A collection of String
values.type
- The type of value.listValue
- true
if the values must be marked as belonging to a list.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 static java.util.List<CIValue> getCIValuesAsList(java.util.Collection<java.lang.String> values, java.lang.String defaultValue, int type)
CIValue
from a list of strings.
Assumes no annotation and no list types are present.values
- A collection of String
values.defaultValue
- The default valuetype
- The value type.CIValues
.public boolean equals(java.lang.Object obj)
CIValue
is equal with this one.equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isDefaultValue()
public void setDefaultValue()
public java.lang.String toString()
CIValue
.toString
in class java.lang.Object
Object.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
,
TYPE_XSLT_ATTRIBUTE
,
TYPE_FILE_NAME
,
TYPE_FOLDER
or
TYPE_UNKNOWN
.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.public void setType(int type)
type
- The value type.© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.