ontology/solr-facet-tree/src/main/java/uk/co/flax/biosolr/TreeFacetField.java
/**
	 * Convert this object to a SimpleOrderedMap, making it easier to serialize.
	 * @return the equivalent SimpleOrderedMap for this object.
	 */
Convert this object to a SimpleOrderedMap, making it easier to serialize.
@return the equivalent SimpleOrderedMap for this object.
Convert this object to a SimpleOrderedMap making it easier to serialize . @return the equivalent SimpleOrderedMap for this object .
public SimpleOrderedMap<Object> toMap() {
		SimpleOrderedMap<Object> map = new SimpleOrderedMap<>();
		if (label != null) {
			map.add(LABEL_KEY, label);
		}
		map.add(VALUE_KEY, value);
		map.add(COUNT_KEY, count);
		map.add(TOTAL_KEY, getTotal());
		if (hierarchy != null && hierarchy.size() > 0) {
			List<NamedList<Object>> hierarchyList = 
					hierarchy.stream().map(TreeFacetField::toMap).collect(Collectors.toList());
			map.add(HIERARCHY_KEY, hierarchyList);
		}
		return map;
	}
public SimpleOrderedMap < Object > toMap ( ) { SimpleOrderedMap < Object > map = new SimpleOrderedMap < > ( ) ; if ( label != null ) { map . add ( LABEL_KEY , label ) ; } map . add ( VALUE_KEY , value ) ; map . add ( COUNT_KEY , count ) ; map . add ( TOTAL_KEY , getTotal ( ) ) ; if ( hierarchy != null && hierarchy . size ( ) > 0 ) { List < NamedList < Object > > hierarchyList = hierarchy . stream ( ) . map ( TreeFacetField :: toMap ) . collect ( Collectors . toList ( ) ) ; map . add ( HIERARCHY_KEY , hierarchyList ) ; } return map ; }
Convert this object to a SimpleOrderedMap, making it easier to serialize.
Convert this object to a SimpleOrderedMap making it easier to serialize .
// Recurse through the child nodes, converting each to a map