|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.spectacle.gee.EntityContext
public class EntityContext
Class EntityContext represents the context for one type of Entities. It maintains the set of Entities itself, its corresponding set of labels, and any views on the content.
| Field Summary | |
|---|---|
protected Channel |
_channel
The channel used to store the content and its labels in. |
protected LabelDispenser |
_dispenser
The maintainer of the labels. |
protected List<String> |
_orderFields
The field sequence that controls sorting. |
protected EntityProducer |
_producer
The producer of the content. |
protected Map<Object,View> |
_views
The views defined on the content. |
| Constructor Summary | |
|---|---|
EntityContext()
Construct a new empty EntityContext. |
|
EntityContext(Channel channel,
EntityProducer producer,
LabelDispenser dispenser)
Constuct a new EntityContext. |
|
| Method Summary | |
|---|---|
protected void |
_init(Channel channel,
EntityProducer producer,
LabelDispenser dispenser)
Initialize this context. |
void |
addView(Channel channel)
Add a view constructed from the specified channel. |
void |
addView(Object viewID,
View view)
Add a view. |
Channel |
getChannel()
|
String |
getChannelName()
|
Map<Object,Entity> |
getEntities()
|
Object |
getLabelClassification(String label)
|
String |
getLabelDescription(String label)
|
String |
getNewLabel(Object classification)
|
View |
getView(Object viewID)
|
void |
render(EntryRenderer renderer)
Render all information on the server. |
static List<Entity> |
selectEntities(String label,
List<Entity> entities,
boolean forEmptyOnly)
Select all entities that have the specified label. |
void |
setOrderField(String orderField)
|
void |
setOrderFields(List<String> orderFields)
|
void |
sync()
Sync the current content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<String> _orderFields
protected Channel _channel
protected EntityProducer _producer
protected LabelDispenser _dispenser
protected Map<Object,View> _views
| Constructor Detail |
|---|
public EntityContext()
public EntityContext(Channel channel,
EntityProducer producer,
LabelDispenser dispenser)
channel - the channel used to store the content and its labels inproducer - the producer of the contentdispenser - the maintainer of the labels| Method Detail |
|---|
protected void _init(Channel channel,
EntityProducer producer,
LabelDispenser dispenser)
channel - the channel used to store the content and its labels inproducer - the producer of the contentdispenser - the maintainer of the labelspublic String getChannelName()
public Channel getChannel()
public Map<Object,Entity> getEntities()
EntityProducer.getEntities()public String getNewLabel(Object classification)
LabelDispenser.getNewLabel(java.lang.Object)public String getLabelDescription(String label)
LabelDispenser.getLabelDescription(java.lang.String)public Object getLabelClassification(String label)
LabelDispenser.getLabelClassification(java.lang.String)
public void sync()
throws ChannelException
ChannelExceptionpublic void setOrderFields(List<String> orderFields)
orderFields - the sequence of fields that control the sequence of rendering.public void setOrderField(String orderField)
orderField - the field that controls the sequence of rendering.
public void render(EntryRenderer renderer)
throws ChannelException
ChannelException
public void addView(Object viewID,
View view)
viewID - an identification for the Viewview - the View to addpublic void addView(Channel channel)
channel - the channel to add as a viewpublic View getView(Object viewID)
viewID - the ID of the View to get
public static List<Entity> selectEntities(String label,
List<Entity> entities,
boolean forEmptyOnly)
label - the labelentities - the set of entities to examineforEmptyOnly - return either 1 entity or none at all
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||