public interface DMXObject extends Identifiable, JSONEnabled
Topic
and Assoc
.
A DMXObject
has 5 parts: an ID, an URI, a type URI, a SimpleValue
, and,
in case of a composite DMXObject, a (recursive) collection of ChildTopics
objects.
DMXObject
provides methods for updating, deleting, and traversal alongside associations.
Modifier and Type | Method and Description |
---|---|
void |
checkWriteAccess()
Checks if current user has write access to this object.
|
void |
delete()
Deletes the DMX object in its entirety, that is
- the object itself (the parent)
- all child topics associated via "dmx.core.composition", recusively
- all the remaining direct associations, e.g.
|
Assoc |
getAssoc(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
long othersTopicId) |
List<Assoc> |
getAssocs()
Fetches all associations this object is a player in.
|
ChildTopics |
getChildTopics() |
Object |
getDatabaseVendorObject() |
long |
getId() |
DMXObjectModel |
getModel() |
Object |
getProperty(String propUri)
Returns this object's property value associated with the given property URI.
|
RelatedAssoc |
getRelatedAssoc(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
List<RelatedAssoc> |
getRelatedAssocs() |
List<RelatedAssoc> |
getRelatedAssocs(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersAssocTypeUri) |
RelatedTopic |
getRelatedTopic(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri)
Fetches and returns a related topic or
null if no such topic extists. |
List<RelatedTopic> |
getRelatedTopics() |
List<RelatedTopic> |
getRelatedTopics(String assocTypeUri,
String myRoleTypeUri,
String othersRoleTypeUri,
String othersTopicTypeUri) |
SimpleValue |
getSimpleValue() |
DMXType |
getType()
Returns the type of this object.
|
String |
getTypeUri() |
String |
getUri() |
boolean |
hasProperty(String propUri)
Checks whether for this object a property value is associated with a given property URI.
|
<O extends DMXObject> |
loadChildTopics() |
<O extends DMXObject> |
loadChildTopics(String compDefUri) |
void |
removeProperty(String propUri)
Removes this object's property associated with the given property URI.
|
void |
setProperty(String propUri,
Object propValue,
boolean addToIndex) |
void |
setSimpleValue(boolean value) |
void |
setSimpleValue(int value) |
void |
setSimpleValue(long value) |
void |
setSimpleValue(SimpleValue value) |
void |
setSimpleValue(String value) |
void |
setTypeUri(String typeUri) |
void |
setUri(String uri) |
void |
update(ChildTopicsModel updateModel)
Convenience that constructs a DMXObjectModel from a ChildTopicsModel and calls canonic update() with it.
|
<M extends DMXObjectModel> |
update(M updateModel) |
void |
updateChildTopics(ChildTopicsModel updateModel,
CompDef compDef)
Note: this method is meant only for facet updates.
|
dump, toJSON
long getId()
getId
in interface Identifiable
String getUri()
void setUri(String uri)
String getTypeUri()
void setTypeUri(String typeUri)
SimpleValue getSimpleValue()
void setSimpleValue(String value)
void setSimpleValue(int value)
void setSimpleValue(long value)
void setSimpleValue(boolean value)
void setSimpleValue(SimpleValue value)
ChildTopics getChildTopics()
<O extends DMXObject> O loadChildTopics()
DMXType getType()
No access control is performed as Implicit READ permission applies: if a user has READ access to an object she has READ access to its type as well.
Note: if the user would have no READ access to this object the DMX Core would not instantiate it in the
first place, but throw an AccessControlException
.
DMXObjectModel getModel()
<M extends DMXObjectModel> void update(M updateModel)
void update(ChildTopicsModel updateModel)
void updateChildTopics(ChildTopicsModel updateModel, CompDef compDef)
void delete()
RelatedTopic getRelatedTopic(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
null
if no such topic extists.assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullList<RelatedTopic> getRelatedTopics()
List<RelatedTopic> getRelatedTopics(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersTopicTypeUri)
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersTopicTypeUri
- may be nullRelatedAssoc getRelatedAssoc(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersAssocTypeUri
- may be nullList<RelatedAssoc> getRelatedAssocs()
List<RelatedAssoc> getRelatedAssocs(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, String othersAssocTypeUri)
assocTypeUri
- may be nullmyRoleTypeUri
- may be nullothersRoleTypeUri
- may be nullothersAssocTypeUri
- may be nullAssoc getAssoc(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri, long othersTopicId)
Object getProperty(String propUri)
boolean hasProperty(String propUri)
void removeProperty(String propUri)
void checkWriteAccess()
AccessControlException
Object getDatabaseVendorObject()
Copyright © 2023. All Rights Reserved.