class ValueStorage extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
LABEL_CHILD_SEPARATOR |
private static String |
LABEL_TOPIC_SEPARATOR |
private Logger |
logger |
private PersistenceLayer |
pl |
Constructor and Description |
---|
ValueStorage(PersistenceLayer pl) |
Modifier and Type | Method and Description |
---|---|
private void |
appendLabel(String label,
StringBuilder builder,
String separator) |
(package private) void |
associateChildTopic(DeepaMehtaObjectModel parent,
RelatedTopicModel childTopic,
AssociationDefinitionModel assocDef)
Creates an association between the given parent object ("Parent" role) and the child topic ("Child" role).
|
private String |
buildChildLabel(DeepaMehtaObjectModel parent,
String assocDefUri) |
private String |
calculateLabel(DeepaMehtaObjectModelImpl model) |
private RelatedTopicModel |
fetchChildTopic(long parentId,
AssociationDefinitionModel assocDef)
Fetches and returns a child topic or
null if no such topic extists. |
(package private) void |
fetchChildTopics(DeepaMehtaObjectModel parent)
Fetches the child topic models (recursively) of the given parent object model and updates it in-place.
|
(package private) void |
fetchChildTopics(DeepaMehtaObjectModel parent,
AssociationDefinitionModel assocDef)
Fetches the child topic models (recursively) of the given parent object model and updates it in-place.
|
private List<RelatedTopicModelImpl> |
fetchChildTopics(long parentId,
AssociationDefinitionModel assocDef) |
private TopicModel |
fetchReferencedTopic(TopicReferenceModel topicRef) |
(package private) List<String> |
getLabelAssocDefUris(DeepaMehtaObjectModel parent)
Prerequisite: parent is a composite model.
|
(package private) void |
recalculateLabel(DeepaMehtaObjectModelImpl parent)
Recalculates the label of the given parent object model and updates it in-place.
|
(package private) void |
resolveReference(TopicReferenceModel topicRef)
Replaces a reference with the real thing.
|
private void |
storeChildTopic(RelatedTopicModel childTopic,
DeepaMehtaObjectModel parent,
AssociationDefinitionModel assocDef) |
private void |
storeChildTopics(DeepaMehtaObjectModelImpl parent)
Stores the composite value (child topics) of the specified topic or association model.
|
(package private) void |
storeValue(DeepaMehtaObjectModelImpl model)
Stores and indexes the specified model's value, either a simple value or a composite value (child topics).
|
private static final String LABEL_CHILD_SEPARATOR
private static final String LABEL_TOPIC_SEPARATOR
private PersistenceLayer pl
ValueStorage(PersistenceLayer pl)
void fetchChildTopics(DeepaMehtaObjectModel parent)
void fetchChildTopics(DeepaMehtaObjectModel parent, AssociationDefinitionModel assocDef)
Works for both, "one" and "many" association definitions.
assocDef
- The child topic models according to this association definition are fetched.void storeValue(DeepaMehtaObjectModelImpl model)
Called to store the initial value of a newly created topic/association.
void recalculateLabel(DeepaMehtaObjectModelImpl parent)
parent
- The object model the label is calculated for. This is expected to be a composite model.private void storeChildTopics(DeepaMehtaObjectModelImpl parent)
Note: the given model can contain childs not defined in the type definition. Only the childs defined in the type definition are stored.
private void storeChildTopic(RelatedTopicModel childTopic, DeepaMehtaObjectModel parent, AssociationDefinitionModel assocDef)
void resolveReference(TopicReferenceModel topicRef)
private TopicModel fetchReferencedTopic(TopicReferenceModel topicRef)
void associateChildTopic(DeepaMehtaObjectModel parent, RelatedTopicModel childTopic, AssociationDefinitionModel assocDef)
private String calculateLabel(DeepaMehtaObjectModelImpl model)
List<String> getLabelAssocDefUris(DeepaMehtaObjectModel parent)
private String buildChildLabel(DeepaMehtaObjectModel parent, String assocDefUri)
private void appendLabel(String label, StringBuilder builder, String separator)
private RelatedTopicModel fetchChildTopic(long parentId, AssociationDefinitionModel assocDef)
null
if no such topic extists.private List<RelatedTopicModelImpl> fetchChildTopics(long parentId, AssociationDefinitionModel assocDef)
Copyright © 2016. All Rights Reserved.