public class ChildPagingJsonConverter extends java.lang.Object implements JsonConverter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHILDREN_NODES
The Constant CHILDREN_NODES.
|
static java.lang.String |
NODES
The Constant NODES.
|
static java.lang.String |
ONTOLOGY_NODE_CHILD_COUNT
The Constant ONTOLOGY_NODE_CHILD_COUNT.
|
static java.lang.String |
ONTOLOGY_NODE_ID
The Constant ONTOLOGY_NODE_ID.
|
static java.lang.String |
ONTOLOGY_NODE_NAME
The Constant ONTOLOGY_NODE_NAME.
|
static java.lang.String |
ONTOLOGY_NODE_NS
The Constant ONTOLOGY_NODE_NS.
|
static java.lang.String |
PAGE
The Constant PAGE.
|
Constructor and Description |
---|
ChildPagingJsonConverter() |
ChildPagingJsonConverter(int maxChildren) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildChildrenNodes(LexEvsTreeNode focusNode)
Builds the children nodes.
|
java.lang.String |
buildChildrenNodes(LexEvsTreeNode focusNode,
int page)
Builds the children nodes, starting from a given 'page' of results.
|
org.json.JSONArray |
buildChildrenPathToRootNodes(LexEvsTreeNode focusNode)
Builds the children path to root nodes.
|
java.lang.String |
buildJsonPathFromRootTree(LexEvsTreeNode focusNode)
Builds the json path from root tree.
|
int |
expandableStatusToInt(LexEvsTreeNode.ExpandableStatus status)
Expandable status to int.
|
public static final java.lang.String ONTOLOGY_NODE_CHILD_COUNT
public static final java.lang.String ONTOLOGY_NODE_ID
public static final java.lang.String ONTOLOGY_NODE_NAME
public static final java.lang.String ONTOLOGY_NODE_NS
public static final java.lang.String CHILDREN_NODES
public static final java.lang.String NODES
public static final java.lang.String PAGE
public ChildPagingJsonConverter()
public ChildPagingJsonConverter(int maxChildren)
public java.lang.String buildJsonPathFromRootTree(LexEvsTreeNode focusNode)
JsonConverter
buildJsonPathFromRootTree
in interface JsonConverter
focusNode
- the focus nodepublic java.lang.String buildChildrenNodes(LexEvsTreeNode focusNode)
JsonConverter
buildChildrenNodes
in interface JsonConverter
focusNode
- the focus nodepublic java.lang.String buildChildrenNodes(LexEvsTreeNode focusNode, int page)
JsonConverter
buildChildrenNodes
in interface JsonConverter
focusNode
- the focus nodepage
- the pagepublic org.json.JSONArray buildChildrenPathToRootNodes(LexEvsTreeNode focusNode)
focusNode
- the focus nodepublic int expandableStatusToInt(LexEvsTreeNode.ExpandableStatus status)
status
- the status