|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.wave.api.BlipContentRefs
public class BlipContentRefs
A class that represents a set of references to contents in a blip.
A BlipContentRefs instance for example can represent the
results of a search, an explicitly set range, a regular expression, or refer
to the entire blip.
BlipContentRefs are used to express operations on a blip in a
consistent way that can be easily transfered to the server.
| Method Summary | |
|---|---|
static BlipContentRefs |
all(Blip blip)
Constructs an instance representing the entire blip content. |
static BlipContentRefs |
all(Blip blip,
ElementType target,
int maxResult,
Restriction... restrictions)
Constructs an instance representing the search for element ElementType, that has the properties specified in
restrictions. |
static BlipContentRefs |
all(Blip blip,
java.lang.String target,
int maxResult)
Constructs an instance representing the search for text target. |
BlipContentRefs |
annotate(java.lang.String key,
java.lang.String... values)
Annotates the contents at the matched positions. |
BlipContentRefs |
clearAnnotation(java.lang.String key)
Clears the annotations at the matched positions. |
BlipContentRefs |
delete()
Deletes the contents at the matched positions. |
BlipContentRefs |
insert(BlipContent... arguments)
Inserts the given arguments at the matched positions. |
BlipContentRefs |
insert(Function.BlipContentFunction... functions)
Inserts computed contents at the matched positions. |
BlipContentRefs |
insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
Inserts the given arguments at the matched positions. |
BlipContentRefs |
insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
Inserts computed contents at the matched positions. |
BlipContentRefs |
insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
Inserts the given strings at the matched positions. |
BlipContentRefs |
insert(java.lang.String... arguments)
Inserts the given strings at the matched positions. |
BlipContentRefs |
insertAfter(BlipContent... arguments)
Inserts the given arguments just after the matched positions. |
BlipContentRefs |
insertAfter(Function.BlipContentFunction... functions)
Inserts computed contents just after the matched positions. |
BlipContentRefs |
insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
Inserts the given arguments just after the matched positions. |
BlipContentRefs |
insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
Inserts computed contents just after the matched positions. |
BlipContentRefs |
insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
Inserts the given strings just after the matched positions. |
BlipContentRefs |
insertAfter(java.lang.String... arguments)
Inserts the given strings just after the matched positions. |
boolean |
isEmpty()
Checks whether this blip references contains any matches or not. |
java.util.Iterator<Range> |
iterator()
|
static BlipContentRefs |
range(Blip blip,
int start,
int end)
Constructs an instance representing an explicitly set range. |
BlipContentRefs |
replace(BlipContent... arguments)
Replaces the matched positions with the given arguments. |
BlipContentRefs |
replace(Function.BlipContentFunction... functions)
Replaces the matched positions with computed contents. |
BlipContentRefs |
replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
Replaces the matched positions with the given arguments. |
BlipContentRefs |
replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
Replaces the matched positions with computed contents. |
BlipContentRefs |
replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
Replaces the matched positions with the given strings. |
BlipContentRefs |
replace(java.lang.String... arguments)
Replaces the matched positions with the given strings. |
BlipContentRefs |
updateElement(Function.MapFunction... functions)
Updates the properties of all elements at the matched positions with computed properties maps. |
BlipContentRefs |
updateElement(Function.MapFunction function)
Updates the properties of all elements at the matched positions with computed properties map. |
BlipContentRefs |
updateElement(java.util.Map<java.lang.String,java.lang.String>... newProperties)
Updates the properties of all elements at the matched positions with the given properties maps. |
BlipContentRefs |
updateElement(java.util.Map<java.lang.String,java.lang.String> newProperties)
Updates the properties of all elements at the matched positions with the given properties map. |
BlipContent |
value()
Returns the first hit. |
java.util.List<BlipContent> |
values()
Returns all matches. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BlipContentRefs all(Blip blip,
java.lang.String target,
int maxResult)
target.
blip - the blip to find target in.target - the target to search.maxResult - the maximum number of results.
public static BlipContentRefs all(Blip blip,
ElementType target,
int maxResult,
Restriction... restrictions)
ElementType, that has the properties specified in
restrictions.
blip - the blip to find target in.target - the element type to search.maxResult - the maximum number of results.restrictions - the additional properties filter that need to be
matched.
public static BlipContentRefs all(Blip blip)
blip - the blip to represent.
public static BlipContentRefs range(Blip blip,
int start,
int end)
blip - the blip to represent.start - the start index of the range.end - the end index of the range.
public BlipContentRefs insert(BlipContent... arguments)
arguments - the new contents to be inserted.
public BlipContentRefs insert(Function.BlipContentFunction... functions)
functions - the functions to compute the new contents based on the
matched contents.
public BlipContentRefs insert(java.lang.String... arguments)
arguments - the new strings to be inserted.
public BlipContentRefs insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new contents to be inserted.
public BlipContentRefs insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
bundledAnnotations - annotations to immediately apply to the inserted
text.functions - the functions to compute the new contents based on the
matched contents.
public BlipContentRefs insert(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new strings to be inserted.
public BlipContentRefs insertAfter(BlipContent... arguments)
arguments - the new contents to be inserted.
public BlipContentRefs insertAfter(Function.BlipContentFunction... functions)
functions - the functions to compute the new contents based on the
matched contents.
public BlipContentRefs insertAfter(java.lang.String... arguments)
arguments - the new strings to be inserted.
public BlipContentRefs insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new contents to be inserted.
public BlipContentRefs insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
bundledAnnotations - annotations to immediately apply to the inserted
text.functions - the functions to compute the new contents based on the
matched contents.
public BlipContentRefs insertAfter(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new strings to be inserted.
public BlipContentRefs replace(BlipContent... arguments)
arguments - the new contents to replace the original contents.
public BlipContentRefs replace(Function.BlipContentFunction... functions)
functions - the functions to compute the new contents.
public BlipContentRefs replace(java.lang.String... arguments)
arguments - the new strings to replace the original contents.
public BlipContentRefs replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
BlipContent... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new contents to replace the original contents.
public BlipContentRefs replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
Function.BlipContentFunction... functions)
bundledAnnotations - annotations to immediately apply to the inserted
text.functions - the functions to compute the new contents.
public BlipContentRefs replace(java.util.List<com.google.wave.api.impl.DocumentModifyAction.BundledAnnotation> bundledAnnotations,
java.lang.String... arguments)
bundledAnnotations - annotations to immediately apply to the inserted
text.arguments - the new strings to replace the original contents.
public BlipContentRefs delete()
public BlipContentRefs annotate(java.lang.String key,
java.lang.String... values)
key - the annotation key.values - the annotation values.
public BlipContentRefs clearAnnotation(java.lang.String key)
key - the annotation key to be cleared.
public BlipContentRefs updateElement(java.util.Map<java.lang.String,java.lang.String> newProperties)
newProperties - the new properties map.
public BlipContentRefs updateElement(Function.MapFunction function)
function - the function to compute the new properties map.
public BlipContentRefs updateElement(java.util.Map<java.lang.String,java.lang.String>... newProperties)
newProperties - an array of new properties map.
public BlipContentRefs updateElement(Function.MapFunction... functions)
functions - an array of function to compute new properties maps.
public boolean isEmpty()
true if it has any more matches. Otherwise, returns
false.public java.util.List<BlipContent> values()
BlipContent that represents the hits.public BlipContent value()
BlipContent, that represents the first hit.public java.util.Iterator<Range> iterator()
iterator in interface java.lang.Iterable<Range>
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||