Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Introduction:

Hierarchy APIs is for creating, updating or reading the entire hierarchy of collection mimetypes. As part of refactoring hierarchy APIs, below are implementation changes.

Design:

UpdateHierarchy API:

Ontology Engine Changes

Introduce `mode=edit` in DataNode.update(), to upsert hierarchy to `rootId.img`

API changes

read rootnode -> If live fetch image node
construct new nodes and validate the same against schema
construct hierarchy
call dataNode.update() with `mode=edit`


GetHierarchy API:

if(mode == edit) {
	DataNode.read() using rootNodeId with `mode=edit`
	DataNode.read() with `mode=edit` and fields=hierarchy
	merge the above responses and return
}
else {
	get Hierarchy from redis
	if(Hierarchy not present in redis){
		DataNode.read() using rootNodeId and fields=hierarchy
		if(Hierarchy is not present in cassandra)
			throw ResourceNot Found
	}
}



  • No labels