Package systems.dmx.core.model
Interface ChildTopicsModel
-
- All Superinterfaces:
Iterable<String>,JSONEnabled
- All Known Subinterfaces:
FacetValueModel
public interface ChildTopicsModel extends JSONEnabled, Iterable<String>
The data that underly aChildTopicsobject.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChildTopicsModeladd(String compDefUri, Object value)Convenience method to add a *simple* value to a multiple-valued child.ChildTopicsModeladd(String compDefUri, ChildTopicsModel value)Convenience method to add a *composite* value to a multiple-valued child.ChildTopicsModeladd(String compDefUri, RelatedTopicModel value)Adds a value to a multiple-valued child.ChildTopicsModeladd(String compDefUri, TopicModel value)ChildTopicsModeladdDeletionRef(String compDefUri, long assocId)Adds a topic deletion reference to a multiple-valued child.ChildTopicsModeladdRef(String compDefUri, long refTopicId)Adds a by-ID topic reference to a multiple-valued child.ChildTopicsModeladdRef(String compDefUri, long refTopicId, AssocModel assoc)Adds a by-ID topic reference to a multiple-valued child.ChildTopicsModeladdRef(String compDefUri, String refTopicUri)Adds a by-URI topic reference to a multiple-valued child.ChildTopicsModeladdRef(String compDefUri, String refTopicUri, AssocModel assoc)Adds a by-URI topic reference to a multiple-valued child.ChildTopicsModelclone()Objectget(String compDefUri)Accesses a child generically, regardless of single-valued or multiple-valued.booleangetBoolean(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.booleangetBoolean(String compDefUri, boolean defaultValue)Convenience accessor for the *simple* value of a single-valued child.ChildTopicsModelgetChildTopics(String compDefUri)Convenience accessor for the *composite* value of a single-valued child.ChildTopicsModelgetChildTopics(String compDefUri, ChildTopicsModel defaultValue)Convenience accessor for the *composite* value of a single-valued child.doublegetDouble(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.doublegetDouble(String compDefUri, double defaultValue)Convenience accessor for the *simple* value of a single-valued child.intgetInt(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.intgetInt(String compDefUri, int defaultValue)Convenience accessor for the *simple* value of a single-valued child.longgetLong(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.longgetLong(String compDefUri, long defaultValue)Convenience accessor for the *simple* value of a single-valued child.StringgetString(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.StringgetString(String compDefUri, String defaultValue)Convenience accessor for the *simple* value of a single-valued child.RelatedTopicModelgetTopic(String compDefUri)Accesses a single-valued child.RelatedTopicModelgetTopicOrNull(String compDefUri)Accesses a single-valued child.List<? extends RelatedTopicModel>getTopics(String compDefUri)Accesses a multiple-valued child.List<? extends RelatedTopicModel>getTopicsOrNull(String compDefUri)Accesses a multiple-valued child.ObjectgetValue(String compDefUri)Convenience accessor for the *simple* value of a single-valued child.ObjectgetValue(String compDefUri, Object defaultValue)Convenience accessor for the *simple* value of a single-valued child.booleanhas(String compDefUri)Checks if a child is contained in this ChildTopicsModel.ChildTopicsModelremove(String compDefUri)Removes a single-valued child.ChildTopicsModelremove(String compDefUri, TopicModel value)Removes a value from a multiple-valued child.ChildTopicsModelset(String compDefUri, Object value)Convenience method to put a *simple* value in a single-valued child.ChildTopicsModelset(String compDefUri, List<RelatedTopicModel> values)Sets the values of a multiple-valued child.ChildTopicsModelset(String compDefUri, ChildTopicsModel value)Convenience method to put a *composite* value in a single-valued child.ChildTopicsModelset(String compDefUri, RelatedTopicModel value)Puts a value in a single-valued child.ChildTopicsModelset(String compDefUri, TopicModel value)ChildTopicsModelsetDeletionRef(String compDefUri, long refTopicId)Puts a by-ID topic deletion reference in a single-valued child.ChildTopicsModelsetDeletionRef(String compDefUri, String refTopicUri)Puts a by-URI topic deletion reference in a single-valued child.ChildTopicsModelsetRef(String compDefUri, long refTopicId)Puts a by-ID topic reference in a single-valued child.ChildTopicsModelsetRef(String compDefUri, long refTopicId, AssocModel assoc)Puts a by-ID topic reference in a single-valued child.ChildTopicsModelsetRef(String compDefUri, String refTopicUri)Puts a by-URI topic reference in a single-valued child.ChildTopicsModelsetRef(String compDefUri, String refTopicUri, AssocModel assoc)Puts a by-URI topic reference in a single-valued child.intsize()Returns the number of children contained in this ChildTopicsModel.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface systems.dmx.core.JSONEnabled
dump, toJSON
-
-
-
-
Method Detail
-
getTopic
RelatedTopicModel getTopic(String compDefUri)
Accesses a single-valued child. Throws if there is no such child.
-
getTopicOrNull
RelatedTopicModel getTopicOrNull(String compDefUri)
Accesses a single-valued child. Returnsnullif there is no such child.
-
getTopics
List<? extends RelatedTopicModel> getTopics(String compDefUri)
Accesses a multiple-valued child. Throws if there is no such child. ### TODO: explain why not return an empty list instead
-
getTopicsOrNull
List<? extends RelatedTopicModel> getTopicsOrNull(String compDefUri)
Accesses a multiple-valued child. Returnsnullif there is no such child. ### TODO: explain why not return an empty list instead
-
get
Object get(String compDefUri)
Accesses a child generically, regardless of single-valued or multiple-valued. Returns null if there is no such child.- Returns:
- A RelatedTopicModel or List
, or null if there is no such child.
-
has
boolean has(String compDefUri)
Checks if a child is contained in this ChildTopicsModel.
-
size
int size()
Returns the number of children contained in this ChildTopicsModel. Multiple-valued children count as one.
-
getString
String getString(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.
-
getString
String getString(String compDefUri, String defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.
-
getInt
int getInt(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.
-
getInt
int getInt(String compDefUri, int defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.
-
getLong
long getLong(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.
-
getLong
long getLong(String compDefUri, long defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.
-
getDouble
double getDouble(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.
-
getDouble
double getDouble(String compDefUri, double defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.
-
getBoolean
boolean getBoolean(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.
-
getBoolean
boolean getBoolean(String compDefUri, boolean defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.
-
getValue
Object getValue(String compDefUri)
Convenience accessor for the *simple* value of a single-valued child. Throws if the child doesn't exist.- Returns:
- String, Integer, Long, Double, or Boolean. Never null.
-
getValue
Object getValue(String compDefUri, Object defaultValue)
Convenience accessor for the *simple* value of a single-valued child. Returns a default value if the child doesn't exist.- Returns:
- String, Integer, Long, Double, or Boolean. Never null.
-
getChildTopics
ChildTopicsModel getChildTopics(String compDefUri)
Convenience accessor for the *composite* value of a single-valued child. Throws if the child doesn't exist.
-
getChildTopics
ChildTopicsModel getChildTopics(String compDefUri, ChildTopicsModel defaultValue)
Convenience accessor for the *composite* value of a single-valued child. Returns a default value if the child doesn't exist.
-
set
ChildTopicsModel set(String compDefUri, RelatedTopicModel value)
Puts a value in a single-valued child. An existing value is overwritten.
-
set
ChildTopicsModel set(String compDefUri, TopicModel value)
-
set
ChildTopicsModel set(String compDefUri, Object value)
Convenience method to put a *simple* value in a single-valued child. An existing value is overwritten.- Parameters:
value- the simple value: a String, Integer, Long, Double, or a Boolean. Primitive values are auto-boxed.- Returns:
- this ChildTopicsModel.
-
set
ChildTopicsModel set(String compDefUri, ChildTopicsModel value)
Convenience method to put a *composite* value in a single-valued child. An existing value is overwritten.- Returns:
- this ChildTopicsModel.
-
setRef
ChildTopicsModel setRef(String compDefUri, long refTopicId)
Puts a by-ID topic reference in a single-valued child. An existing reference is overwritten.
-
setRef
ChildTopicsModel setRef(String compDefUri, String refTopicUri)
Puts a by-URI topic reference in a single-valued child. An existing reference is overwritten.
-
setRef
ChildTopicsModel setRef(String compDefUri, long refTopicId, AssocModel assoc)
Puts a by-ID topic reference in a single-valued child. An existing reference is overwritten.- Parameters:
assoc- provides a value (simple or composite) for the created relating association.
-
setRef
ChildTopicsModel setRef(String compDefUri, String refTopicUri, AssocModel assoc)
Puts a by-URI topic reference in a single-valued child. An existing reference is overwritten.- Parameters:
assoc- provides a value (simple or composite) for the created relating association.
-
setDeletionRef
ChildTopicsModel setDeletionRef(String compDefUri, long refTopicId)
Puts a by-ID topic deletion reference in a single-valued child. An existing value is overwritten.
-
setDeletionRef
ChildTopicsModel setDeletionRef(String compDefUri, String refTopicUri)
Puts a by-URI topic deletion reference in a single-valued child. An existing value is overwritten.
-
remove
ChildTopicsModel remove(String compDefUri)
Removes a single-valued child.
-
add
ChildTopicsModel add(String compDefUri, RelatedTopicModel value)
Adds a value to a multiple-valued child.
-
add
ChildTopicsModel add(String compDefUri, TopicModel value)
-
add
ChildTopicsModel add(String compDefUri, Object value)
Convenience method to add a *simple* value to a multiple-valued child.- Parameters:
value- the simple value: a String, Integer, Long, Double, or a Boolean. Primitive values are auto-boxed.- Returns:
- this ChildTopicsModel.
-
add
ChildTopicsModel add(String compDefUri, ChildTopicsModel value)
Convenience method to add a *composite* value to a multiple-valued child.- Returns:
- this ChildTopicsModel.
-
set
ChildTopicsModel set(String compDefUri, List<RelatedTopicModel> values)
Sets the values of a multiple-valued child. Existing values are overwritten.
-
remove
ChildTopicsModel remove(String compDefUri, TopicModel value)
Removes a value from a multiple-valued child.
-
addRef
ChildTopicsModel addRef(String compDefUri, long refTopicId)
Adds a by-ID topic reference to a multiple-valued child.
-
addRef
ChildTopicsModel addRef(String compDefUri, String refTopicUri)
Adds a by-URI topic reference to a multiple-valued child.
-
addRef
ChildTopicsModel addRef(String compDefUri, long refTopicId, AssocModel assoc)
Adds a by-ID topic reference to a multiple-valued child.- Parameters:
assoc- provides a value (simple or composite) for the created relating association.
-
addRef
ChildTopicsModel addRef(String compDefUri, String refTopicUri, AssocModel assoc)
Adds a by-URI topic reference to a multiple-valued child.- Parameters:
assoc- provides a value (simple or composite) for the created relating association.
-
addDeletionRef
ChildTopicsModel addDeletionRef(String compDefUri, long assocId)
Adds a topic deletion reference to a multiple-valued child. Note: the topic to be deleted is referred to by association ID. The topic might occur several times in the same multi-value, so topic ID/URI would not be unique.- Parameters:
assocId- ID of the association that connects the to be deleted topic with the parent.
-
clone
ChildTopicsModel clone()
-
-