| java.lang.Object |
| ↳ |
com.google.gdata.model.Path.Builder |
Class Overview
The Builder class provides a model for incrementally constructing new
Path relative or absolute instances.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Fields
private
boolean
selectsAttribute
Public Methods
public
boolean
addIfAttribute
(QName id)
Conditionally adds a new attribute path step. For absolute paths, it will
be added if the QName matches a valid child attribute type for
the current selected element. If the path is relative a new
ElementKey step corresponding to the name will be unconditionally
added.
Parameters
| id
| Qualified name of child attribute step to add |
Returns
true if added successfully, false otherwise.
Throws
| PathException
| if this path is an attribute path. Once a path has
an attribute key no more steps may be added.
|
public
boolean
addIfElement
(QName id)
Conditionally adds a new element path step. For absolute paths, it will
be added if the QName matches a valid child element type for the
current selected element. If the path is relative a new
ElementKey step corresponding to the name will be unconditionally
added.
Parameters
| id
| Qualified name of child element step to add |
Returns
true if added successfully, false otherwise.
Throws
| PathException
| if this path is an attribute path. Once a path has
an attribute key no more steps may be added.
|
Adds a new path step to the end of the path. If the path is absolute the
step will be validated against the element type currently selected by the
path. If the step parameter is an ElementKey, then the step will
be valid if there is a child element type with the same QName. If
the step parameter is an AttributeKey, then it will be valid if
there is a matching child attribute type with the same QName. If
invalid, a PathException will be thrown. No validation is
performed for relative paths.
Parameters
| step
| Metadata key for new path step |
Throws
| PathException
| if this path has been bound to a
metadata instance and no key with the given step can be found, or
if the path is an attribute path. Once a path has an attribute key
no more steps may be added.
|
public
Path
build
()
Returns a new Path instance based upon the current state of the
builder.