|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.model.Path.Builder
public static class Path.Builder
The Builder class provides a model for incrementally constructing new
Path
relative or absolute instances.
Method Summary | |
---|---|
boolean |
addIfAttribute(QName id)
Conditionally adds a new attribute path step. |
boolean |
addIfElement(QName id)
Conditionally adds a new element path step. |
Path.Builder |
addStep(MetadataKey<?> step)
Adds a new path step to the end of the path. |
Path |
build()
Returns a new Path instance based upon the current state of the
builder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Path.Builder addStep(MetadataKey<?> step)
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.
step
- metadata key for new path step
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 boolean addIfElement(QName id)
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.
id
- qualified name of child element step to add
true
if added successfully, false
otherwise.
PathException
- if this path is an attribute path. Once a path has
an attribute key no more steps may be added.public boolean addIfAttribute(QName id)
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.
id
- qualified name of child attribute step to add
true
if added successfully, false
otherwise.
PathException
- if this path is an attribute path. Once a path has
an attribute key no more steps may be added.public Path build()
Path
instance based upon the current state of the
builder.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |