Serializable
, Comparable<TraversalMode>
public enum TraversalMode extends Enum<TraversalMode>
TraversalMode
specifies on how data in retrieved from a
HAL-Resource. HAL-Data is processed depending on the TraversalMode
bing provided to the operation. The TraversalMode
specifies a
combination of the below means:
Self-HREFs are links to the retrieved data entities themselves and, when
enabled by the TraversalMode
, are stored below a special Meta-Data
section relative to the path of the entity in question.
Dangling-HREFs are links to the data entities skipped (not retrieved) and, when enabled, are stored below a special Meta-Data section relative to the path of the entity in question.
Importing children, when enabled by the TraversalMode
, instructs the
operation in question to retrieve the data referenced by the HREF. This means
that the child elements of an entity are retrieved too. Depending on the
result of the nextMode()
operation, just the direct
children are retrieved, all children recursively are retrieved or no children
at all are retrieved.
Dangling HREFs are considered to be those links which were not retrieved as
of the TraversalMode
and its nextMode()
configuration as well as those HREFs which are skipped as of HREF reference
cycles which would cause infinite loops upon recursive HREF retrieval.
Enum Constant | Description |
---|---|
IMPORT_CHILDREN |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: No
|
IMPORT_CHILDREN_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
IMPORT_CHILDREN_KEEP_SELF_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: No
|
IMPORT_CHILDREN_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
NONE |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: No
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: No
|
NONE_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: No
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
NONE_KEEP_SELF_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: No
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: No
|
NONE_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: No
Data related to child HREFs is imported recursively: No
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
RECURSIVE_IMPORT_CHILDREN |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: Yes
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: No
|
RECURSIVE_IMPORT_CHILDREN_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: Yes
Self-HREF Meta-Data for retrieved HAL data: No
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
RECURSIVE_IMPORT_CHILDREN_KEEP_SELF_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: Yes
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: No
|
RECURSIVE_IMPORT_CHILDREN_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS |
Hypermedia references (HREF) pointed to by a path (in terms of a key
regarding the concept of the
CanonicalMap ) are handled as
follows:
Data related to direct HREFs is imported: Yes
Data related to child HREFs is imported recursively: Yes
Self-HREF Meta-Data for retrieved HAL data: Yes
Dangling-HREF Meta-Data for skipped HAL data: Yes
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
isImportChildren() |
Indicates that HREFs for HAL-Data being loaded are followed and loaded as
well.
|
boolean |
isKeepDanglingHrefs() |
Indicates HREFs for HAL-Data not being loaded (e.g. we have a dangling
link) are(!)
|
boolean |
isKeepSelfHrefs() |
Indicates that HREFs for HAL-Data being loaded are(!)
|
TraversalMode |
nextMode() |
Returns the next TraversalMode to be applied to the children when the
current retrieval operation has finished.
|
static TraversalMode |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static TraversalMode[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TraversalMode NONE
CanonicalMap
) are handled as
follows:
public static final TraversalMode NONE_KEEP_SELF_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode NONE_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode NONE_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode IMPORT_CHILDREN
CanonicalMap
) are handled as
follows:
public static final TraversalMode IMPORT_CHILDREN_KEEP_SELF_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode IMPORT_CHILDREN_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode IMPORT_CHILDREN_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode RECURSIVE_IMPORT_CHILDREN
CanonicalMap
) are handled as
follows:
public static final TraversalMode RECURSIVE_IMPORT_CHILDREN_KEEP_SELF_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode RECURSIVE_IMPORT_CHILDREN_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static final TraversalMode RECURSIVE_IMPORT_CHILDREN_KEEP_SELF_HREFS_KEEP_DANGLING_HREFS
CanonicalMap
) are handled as
follows:
public static TraversalMode[] values()
for (TraversalMode c : TraversalMode.values()) System.out.println(c);
public static TraversalMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isKeepSelfHrefs()
Self-HREFs are are a result of loaded HAL-Data as of following a HREF.
public boolean isKeepDanglingHrefs()
Dangling-HREFs may be a result of not loading direct HREFs or recursive HREFs or we encountered a cycle when loading HREFs recursively.
public boolean isImportChildren()
The method nextMode()
determines whether the
children of this HAL-Data is being loaded as well. Depending on the
configuration of the according TraversalMode
we may just import
the direct childtren of a HAL-Data or all children recursively.
public TraversalMode nextMode()
TraversalMode
.Copyright © 2021. All rights reserved.