001package de.deepamehta.core.model;
002
003import java.util.Collection;
004import java.util.List;
005
006
007
008public interface TypeModel extends TopicModel, Iterable<String> {
009
010
011
012    // === Data Type ===
013
014    String getDataTypeUri();
015
016    void setDataTypeUri(String dataTypeUri);
017
018
019
020    // === Index Modes ===
021
022    List<IndexMode> getIndexModes();
023
024    void addIndexMode(IndexMode indexMode);
025
026
027
028    // === Association Definitions ===
029
030    Collection<? extends AssociationDefinitionModel> getAssocDefs();
031
032    AssociationDefinitionModel getAssocDef(String assocDefUri);
033
034    boolean hasAssocDef(String assocDefUri);
035
036    /**
037     * @param   assocDef    the assoc def to add.
038     *                      Note: its ID might be uninitialized (-1).
039     */
040    TypeModel addAssocDef(AssociationDefinitionModel assocDef);
041
042    /**
043     * @param   assocDef            the assoc def to add.
044     *                              Note: its ID might be uninitialized (-1).
045     * @param   beforeAssocDefUri   the URI of the assoc def <i>before</i> the given assoc def is inserted.
046     *                              If <code>null</code> the assoc def is appended at the end.
047     */
048    TypeModel addAssocDefBefore(AssociationDefinitionModel assocDef, String beforeAssocDefUri);
049
050    AssociationDefinitionModel removeAssocDef(String assocDefUri);
051
052
053
054    // === Label Configuration ===
055
056    List<String> getLabelConfig();
057
058    void setLabelConfig(List<String> labelConfig);
059
060
061
062    // === View Configuration ===
063
064    ViewConfigurationModel getViewConfigModel();
065
066    // FIXME: server-side operations on the view config settings possibly suggest they are not acually
067    // view config settings but part of the topic type model. Possibly this method should be dropped.
068    Object getViewConfig(String typeUri, String settingUri);
069
070    void setViewConfig(ViewConfigurationModel viewConfig);
071}