public abstract class Item extends Object implements Serializable
ITEM_TYPE
that is used to identify the type of a specific Item via getItemType(java.lang.Class)
. It is therefore important that
ITEM_TYPE
be unique across all persisted type of Items. Similarly, since Items are persisted according to their type, an Item's identifier must be unique among
Items of the same type.
Additionally, Items are also gathered by scope allowing the context server to group together related Items (usually pertaining to a given site being analyzed,
though scopes could span across sites depending on the desired analysis granularity). Scopes allow clients accessing the context server to filter data. The context server
defines a built-in scope (Metadata.SYSTEM_SCOPE
) that clients can use to share data across scopes.
Modifier and Type | Field and Description |
---|---|
protected String |
itemId |
protected String |
itemType |
protected String |
scope |
protected Map<String,Object> |
systemMetadata |
protected Long |
version |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getItemId()
Retrieves the Item's identifier used to uniquely identify this Item when persisted or when referred to.
|
String |
getItemType()
Retrieves the Item's type used to assert metadata and structure common to Items of this type, notably for persistence purposes.
|
static String |
getItemType(Class clazz) |
String |
getScope()
Retrieves the Item's scope.
|
Object |
getSystemMetadata(String key) |
Long |
getVersion() |
int |
hashCode() |
void |
setItemId(String itemId) |
void |
setItemType(String itemType) |
void |
setScope(String scope) |
void |
setSystemMetadata(String key,
Object value) |
void |
setVersion(Long version) |
protected String itemId
protected String itemType
protected String scope
protected Long version
public Item()
public Item(String itemId)
public String getItemId()
public void setItemId(String itemId)
public String getItemType()
ITEM_TYPE
public constant.ITEM_TYPE
valuepublic void setItemType(String itemType)
public String getScope()
public void setScope(String scope)
public Long getVersion()
public void setVersion(Long version)
Copyright © 2014–2023 Apache Software Foundation. All rights reserved.