|
Oracle® OLAP Java API Reference 12c Release 1 (12.1) E17708-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.olapi.data.source.Source
oracle.olapi.data.source.StringSource
public final class StringSource
A Source that has elements that have String objects as values. A StringSource has an OLAP Java API data type of String. This class implements some Source methods so that they use String values, such as appendValue, and implements other methods that perform String operations, such as toUppercase, substring, and trim.
| Field Summary |
|---|
| Fields inherited from class oracle.olapi.data.source.Source |
|---|
COMPARISON_RULE_ASCENDING, COMPARISON_RULE_ASCENDING_NULLS_FIRST, COMPARISON_RULE_ASCENDING_NULLS_LAST, COMPARISON_RULE_DESCENDING, COMPARISON_RULE_DESCENDING_NULLS_FIRST, COMPARISON_RULE_DESCENDING_NULLS_LAST, COMPARISON_RULE_REMOVE, COMPARISON_RULE_SELECT |
| Method Summary | |
|---|---|
StringSource |
appendValue(java.lang.String appendValue)Appends an element with the specified String value to the elements of this StringSource. |
StringSource |
appendValues(java.lang.String[] appendValues)Appends elements with the specified String values to the elements of this StringSource. |
BooleanSource |
eq(java.lang.String rhs)Compares the value of each element of this StringSource to the value of the specified String and determines if the values are equal. |
BooleanSource |
ge(java.lang.String rhs)Compares the value of each element of this StringSource to the specified String value, and determines whether it has a greater or equal value. |
Source |
getDataType()Gets the fundamental Source that represents the OLAP Java API data type of this StringSource, which is String. |
BooleanSource |
gt(java.lang.String rhs)Compares the value of each element of this StringSource to the specified String value, and determines whether it has a greater value. |
NumberSource |
indexOf(java.lang.String substring, int fromIndex)Starting at the fromIndex position in the value of each element of this StringSource, identifies the starting position of the first occurrence of substring in the value. |
NumberSource |
indexOf(StringSource substring, NumberSource fromIndex)Starting at the fromIndex position in the value of each element of this StringSource, identifies the starting position of the first occurrence of substring in the value. |
BooleanSource |
le(java.lang.String rhs)Compares the value of each element of this StringSource to the specified String value, and determines whether it has a lesser or equal value. |
NumberSource |
length()Determines the length of the value of each element of this StringSource. |
BooleanSource |
like(java.lang.String rhs)Compares the values of the elements of this StringSource to the specified String. |
BooleanSource |
like(StringSource rhs)Compares the values of the elements of this StringSource to the values of the elements of the specified StringSource. |
BooleanSource |
lt(java.lang.String rhs)Compares the value of each element of this StringSource to the specified String value, and determines whether it has a lesser value. |
BooleanSource |
ne(java.lang.String rhs)Compares the value of each element of this StringSource to the specified String value, and determines whether it is not equal to the value. |
StringSource |
plus(StringSource rhs)Appends the values of the elements of rhs to the values of the elements of this StringSource. |
NumberSource |
positionOfValue(java.lang.String value)Identifies the positions of the elements of this StringSource that have the specified String value. |
NumberSource |
positionOfValues(java.lang.String[] values)Identifies the positions of the elements of this StringSource that have the specified String values. |
StringSource |
remove(int index, int length)Removes length number of characters starting at position index from the values of the elements of this StringSource. |
StringSource |
remove(NumberSource index, NumberSource length)Removes length number of characters starting at position index from the values of the elements of this StringSource. |
StringSource |
removeValue(java.lang.String value)Removes the elements of this StringSource that have the specified String as a value. |
StringSource |
removeValues(java.lang.String[] values)Removes the elements of this StringSource that have a value specified by one of the String objects in the values array. |
StringSource |
replace(StringSource oldString, StringSource newString)Replaces each occurrence of oldString with newString in the value of each element of this StringSource. |
StringSource |
replace(java.lang.String oldString, java.lang.String newString)Replaces each occurrence of oldString with newString in the value of each element of this StringSource. |
StringSource |
selectDescendants(java.lang.String[] comparison, Source parent)Selects the elements of this StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents. |
StringSource |
selectDescendants(java.lang.String comparison, Source parent)Selects the elements of this StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents. |
StringSource |
selectValue(java.lang.String value)Selects the elements of this StringSource that have the specified value. |
StringSource |
selectValues(java.lang.String[] values)Selects the elements of this StringSource that have the specified values. |
StringSource |
substring(int index, int length)Selects the length number of characters, beginning at the position specified by index, from the values of the elements of this StringSource. |
StringSource |
substring(NumberSource index, NumberSource length)Selects the length number of characters, beginning at the position specified by index, from the values of the elements of this StringSource. |
StringSource |
textFill(int width)Resizes the values of the elements of this StringSource to the specified width. |
StringSource |
textFill(NumberSource width)Resizes the values of the elements of this StringSource to the specified width or widths. |
StringSource |
toLowercase()Converts the alphabetic characters in the values of the elements of this StringSource to lowercase. |
StringSource |
toUppercase()Converts the alphabetic characters in the values of the elements of this StringSource to uppercase. |
StringSource |
trim()Removes the leading and the trailing blank spaces from the values of the elements of this StringSource. |
StringSource |
trimLeading()Removes the leading blank spaces from the values of the elements of this StringSource. |
StringSource |
trimTrailing()Removes the trailing blank spaces from the values of the elements of this StringSource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public final StringSource appendValue(java.lang.String appendValue)
String value to the elements of this StringSource.appendValue - The String value that you want to append to this StringSource.StringSource that has the same elements as this StringSource and that has an additional appended element that has the specified String value.public final StringSource appendValues(java.lang.String[] appendValues)
String values to the elements of this StringSource.appendValues - An array of StringStringSource.StringSource that has the same elements as this StringSource and that has additional appended elements that have the specified String values.public final BooleanSource eq(java.lang.String rhs)
StringSource to the value of the specified String and determines if the values are equal.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element that has a value of true when the value of an element of this StringSource equals the specified String value, or false when it does not.public final BooleanSource ge(java.lang.String rhs)
StringSource to the specified String value, and determines whether it has a greater or equal value.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of an element of this StringSource is greater than or equal to the specified String value, or false when it is not.public Source getDataType()
Source that represents the OLAP Java API data type of this StringSource, which is String.getDataType in class SourceSource that represents the OLAP Java API String data type.public final BooleanSource gt(java.lang.String rhs)
StringSource to the specified String value, and determines whether it has a greater value.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of an element of this StringSource is greater than the specified String value, or false when it is not.
public final NumberSource indexOf(java.lang.String substring,
int fromIndex)
fromIndex position in the value of each element of this StringSource, identifies the starting position of the first occurrence of substring in the value.substring - A String the beginning position of which you want to locate in the value of each element of this StringSource.fromIndex - An int that is the one-based position in the value of each element of this StringSource at which this method begins searching for substring.NumberSource that has the beginning position of the first occurrence of substring in the values of the elements of this StringSource or zero if substring is not in the value.
public final NumberSource indexOf(StringSource substring,
NumberSource fromIndex)
fromIndex position in the value of each element of this StringSource, identifies the starting position of the first occurrence of substring in the value.substring - A String the beginning position of which you want to locate in each element of this StringSource.fromIndex - An NumberSource that has the one-based position in the value of each element of this StringSource at which this method begins searching for substring.NumberSource that has the beginning position of the first occurrence of substring in the values of the elements of this StringSource or zero if substring is not in the value.public final BooleanSource le(java.lang.String rhs)
StringSource to the specified String value, and determines whether it has a lesser or equal value.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of an element of this StringSource is less than or equal to the specified String value, or false when it is not.public final NumberSource length()
StringSource.NumberSource, the value of each element of which is the length of the value of the corresponding element of this StringSource.public final BooleanSource like(java.lang.String rhs)
StringSource to the specified String.
This method supports the percent sign wildcard and the underline position marker. For example, the following code uses the percent sign wildcard in producing prodSel, which is a Source that specifies the elements of shortDescrByProd that contain the String External. The shortDescrByProd object is the result of joining prodDim, which is the Source for the Product dimension, to prodShortDescr, which is the Source for the short value description attribute of the Product dimension.
Source shortDescrByProd = prodShortDescr.join(prodDim);
Source prodSel = shortDescrByProd.select(
((StringSource) shortDescrByProd.value())
.like("%External%");
The following code uses the underline position marker and the percent sign wildcard in producing prodSel2, which is a Source that specifies the elements of shortDescrByProd that have the String tern at element positions three through six. The first two characters of the String passed to the like method are underline characters.
Source prodSel2 = shortDescrByProd.select(
((StringSource) shortDescrByProd.value())
.like("__tern%");
A Cursor for prodSel has the following values.
PRODUCT_PRIMARY::ITEM::EXT CD ROM, External 48X CD-ROM PRODUCT_PRIMARY::ITEM::EXT DVD, External - DVD-RW - 8X PRODUCT_PRIMARY::ITEM::144MB DISK, 1.44MB External 3.5" Diskette PRODUCT_PRIMARY::ITEM::ENVY EXT KBD, Envoy External Keyboard PRODUCT_PRIMARY::ITEM::EXT KBD, External 101-key keyboardA
Cursor for prodSel2 has the following values.
PRODUCT_PRIMARY::ITEM::EXT CD ROM, External 48X CD-ROM PRODUCT_PRIMARY::ITEM::EXT DVD, External - DVD-RW - 8X PRODUCT_PRIMARY::ITEM::INT 8X DVD, Internal - DVD-RW - 8X PRODUCT_PRIMARY::ITEM::INT CD ROM, Internal 48X CD-ROM PRODUCT_PRIMARY::ITEM::INT CD USB, Internal 48X CD-ROM USB PRODUCT_PRIMARY::ITEM::INT RW DVD, Internal - DVD-RW - 6X PRODUCT_PRIMARY::ITEM::EXT KBD, External 101-key keyboard
rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of the corresponding element of this StringSource matches the value of the specified String, or false when it is does not.public final BooleanSource like(StringSource rhs)
StringSource to the values of the elements of the specified StringSource.
This method supports the percent sign wildcard and the underline position marker.
rhs - A StringSource, the values of the elements of which you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when a value of an element of this StringSource matches the value of an element of the specified StringSource, or false when it is does not.public final BooleanSource lt(java.lang.String rhs)
StringSource to the specified String value, and determines whether it has a lesser value.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of an element of this StringSource is less than the specified String value, or false when it is not.public final BooleanSource ne(java.lang.String rhs)
StringSource to the specified String value, and determines whether it is not equal to the value.rhs - The String value that you want to compare to the values of the elements of this StringSource.BooleanSource that has an element with a value of true when the value of an element of this StringSource is not equal to the specified String value, or false when it is equal to the specified value.public final NumberSource positionOfValue(java.lang.String value)
StringSource that have the specified String value.value - The String value that you want to compare to the values of the elements of this StringSource.NumberSource whose elements have int values that identify the positions of the elements of this StringSource that have the specified String value. If this StringSource does not have any elements that have the specified value, then this method returns an empty NumberSource, which has no elements.public final NumberSource positionOfValues(java.lang.String[] values)
StringSource that have the specified String values.values - An array ofString values that you want to compare to the values of the elements of this StringSource.NumberSource whose elements have int values that identify the positions of the elements of this StringSource that have the specified String values. If this StringSource does not have any elements that have a specified value, then this method returns an empty NumberSource, which has no elements.
public final StringSource remove(int index,
int length)
length number of characters starting at position index from the values of the elements of this StringSource. This method returns a StringSource that has the values of the elements of this StringSource with the specified characters removed.index - An int value that is the one-based position within the value of each element of this StringSource that is the first of the characters that you want to remove.length - An int value that is the number of characters that you want to remove.StringSource that has elements that have the values of the elements of this StringSource with the specified number of characters removed.
public final StringSource remove(NumberSource index,
NumberSource length)
length number of characters starting at position index from the values of the elements of this StringSource.index - A NumberSource that has elements that have the integer values that are the one-based character positions within the value of each element of this StringSource that is the first of the characters that you want to remove.length - A NumberSource that has elements that have the integer values that are the number of characters that you want to remove.StringSource that has elements that have the values of the elements of this StringSource with the specified number of characters removed.public final StringSource removeValue(java.lang.String value)
StringSource that have the specified String as a value.value - A String that has the value of the element or elements you do not want to have in the returned StringSource.StringSource that has the elements of this StringSource except for those that have values that match the specified value.public final StringSource removeValues(java.lang.String[] values)
StringSource that have a value specified by one of the String objects in the values array. This method returns a StringSource that has the elements of this StringSource except for any elements that have a value that matches one of the specified String objects values.values - An array of String objects that have the values that you do not want to have in the returned StringSource.StringSource that has the elements of this StringSource except for those that have values that match the specified values.
public final StringSource replace(java.lang.String oldString,
java.lang.String newString)
oldString with newString in the value of each element of this StringSource.oldString - A String that has the value that you want to replace with newString.newString - A String that has the value with which you want to replace oldString.StringSource that has the elements of this StringSource but that has oldString replaced by newString in value of each element.
public final StringSource replace(StringSource oldString,
StringSource newString)
oldString with newString in the value of each element of this StringSource.oldString - A StringSource that has elements that have the values that you want to replace with the values of the elements of newString.newString - A StringSource that has elements that have the values with which you want to replace the values of the elements of oldString.StringSource that has the elements of this StringSource but that has the values of the elements of oldString replaced by the values of the elements of newString.
public final StringSource selectDescendants(java.lang.String comparison,
Source parent)
StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents. Call this method only on a StringSource that is the Source for an MdmHierarchy or on a subtype of such a Source.comparison - A String that has the value of the element or elements that you want to select from this StringSource.parent - The Source, or a subtype of the Source, for the MdmAttribute returned by the getParentAttribute method of the MdmHierarchy for the hierarchy that this StringSource represents.StringSource that has the elements of this StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents.
public final StringSource selectDescendants(java.lang.String[] comparison,
Source parent)
StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents. Call this method only on a StringSource that is the Source for an MdmHierarchy or on a subtype of such a Source.comparison - An array of String objects that have the values of the elements that you want to select from this StringSource.parent - The Source, or a subtype of the Source, for the MdmAttribute returned by the getParentAttribute method of the MdmHierarchy for the hierarchy that this StringSource represents.StringSource that has the elements of this StringSource that are specified by comparison and the descendants of those elements in the hierarchy that this StringSource represents.public final StringSource selectValue(java.lang.String value)
StringSource that have the specified value.value - A String that has the value of the elements of this StringSource that you want to have in the returned StringSource.StringSource that has the elements of this StringSource that have the specified String value.public final StringSource selectValues(java.lang.String[] values)
StringSource that have the specified values.values - An array of String objects that have the values of the elements of this StringSource that you want to have in the returned StringSource.StringSource that has the elements of this StringSource that have the values specified by values.
public final StringSource substring(int index,
int length)
length number of characters, beginning at the position specified by index, from the values of the elements of this StringSource.index - An int value that is the one-based position within the value of each element of this StringSource of the first character of the substring to select.length - An int value that is the number of characters in the substring.StringSource that has the specified characters selected from the values of the elements of this StringSource.
public final StringSource substring(NumberSource index,
NumberSource length)
length number of characters, beginning at the position specified by index, from the values of the elements of this StringSource.index - A NumberSource that has the one-based positions within the values of the elements of this StringSource of the first character of the substring or substrings to select.length - A NumberSource that has the number of characters in the substring or substrings.StringSource that has the specified characters selected from the values of the elements of this StringSource.public final StringSource textFill(int width)
StringSource to the specified width.width - An int value that specifies the length that you want the values of the returned StringSource to be.StringSource that has elements that have the values of the elements of this StringSource with the values truncated or lengthened by blank spaces to the number of characters specified by width.public final StringSource textFill(NumberSource width)
StringSource to the specified width or widths.width - A NumberSource that has elements that have the value or values that specify the length that you want the values of the returned StringSource to be.StringSource that has elements that have the values of the elements of this StringSource with the values truncated or lengthened by blank spaces to the number of characters specified by width.public final StringSource toLowercase()
StringSource to lowercase.StringSource that has the elements of this StringSource with the alphabetic characters in the values of those elements converted to lowercase.public final StringSource toUppercase()
StringSource to uppercase.StringSource that has the elements of this StringSource with the alphabetic characters in the values of those elements converted to uppercase.public final StringSource trim()
StringSource.StringSource with the same elements as this StringSource but with all of the leading and trailing blank spaces removed from the values of the elements.public final StringSource trimLeading()
StringSource.StringSource with the same elements as this StringSource but with all of the leading blank spaces removed from the values of the elements.public final StringSource trimTrailing()
StringSource.StringSource with the same elements as this StringSource but with all of the trailing blank spaces removed from the values of the elements.public final StringSource plus(StringSource rhs)
rhs to the values of the elements of this StringSource.rhs - A StringSource whose elements have the values that you want to append to the values of the elements of this StringSource.StringSource that has the elements of this StringSource with the values of rhs appended to them.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||