Skip to content

Instantly share code, notes, and snippets.

@ptbrowne
Created December 20, 2011 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptbrowne/1502206 to your computer and use it in GitHub Desktop.
Save ptbrowne/1502206 to your computer and use it in GitHub Desktop.
#
# HCI memory structure - core interface
#
#
## Objects as structures
namespace java fr.sciencespo.medialab.hci.memorystructure.domain
struct MetadataItem {
1: string id,
2: string name,
3: bool multiple,
4: string dataType,
5: string defaultValue
}
struct LRUItem {
1: string id,
2: string url,
3: string lru,
4: string crawlerTimestamp,
5: i32 httpStatusCode,
6: i32 depth,
7: string errorCode,
8: bool isFullPrecision = false,
9: bool isNode,
10: bool isPage,
11: bool isWebEntity,
12: list<MetadataItem> metadataItems
}
struct NodeLink {
1: string id,
2: string sourceLRU,
3: string targetLRU,
4: i32 weight=1
}
# Services
service MemoryStructure {
// LRUItems
/**
*
* @param 1 lruItems : list of LRUItem objects
* @return true if success, false else
**/
bool storeLRUItems(1:list<LRUItem> lruItems),
// NodeLinks
/**
*
* @param 1 nodeLinks : list of NodeLink objects
* @return true if success, false else
**/
bool storeNodeLinks(1:list<NodeLink> nodeLinks),
// WebEntity
/**
*
* @param 1 lruItem : the lruItem to be marked as WebEntity
* @return true if success, false else
**/
bool storeWebEntity(1:LRUItem lruItem),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment