001    package de.deepamehta.core;
002    
003    import de.deepamehta.core.model.TopicModel;
004    import de.deepamehta.core.service.ClientState;
005    import de.deepamehta.core.service.Directives;
006    
007    import java.util.List;
008    
009    
010    
011    /**
012     * Specification of a topic -- DeepaMehta's central data object.
013     *
014     * @author <a href="mailto:jri@deepamehta.de">Jörg Richter</a>
015     */
016    public interface Topic extends DeepaMehtaObject {
017    
018    
019    
020        // === Model ===
021    
022        TopicModel getModel();
023    
024    
025    
026        // === Updating ===
027    
028        void update(TopicModel model, ClientState clientState, Directives directives);
029    
030    
031    
032        // === Traversal ===
033    
034        // --- Association Retrieval ---
035    
036        // ### TODO: move to DeepaMehtaObject
037        /**
038         * @param   assocTypeUri        may be null
039         * @param   myRoleTypeUri       may be null
040         * @param   othersRoleTypeUri   may be null
041         * @param   othersAssocTypeUri  may be null
042         */
043        RelatedAssociation getRelatedAssociation(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri,
044                                         String othersAssocTypeUri, boolean fetchComposite, boolean fetchRelatingComposite);
045    
046        // ### TODO: move to DeepaMehtaObject
047        /**
048         * @param   assocTypeUri        may be null
049         * @param   myRoleTypeUri       may be null
050         * @param   othersRoleTypeUri   may be null
051         * @param   othersAssocTypeUri  may be null
052         */
053        List<RelatedAssociation> getRelatedAssociations(String assocTypeUri, String myRoleTypeUri, String othersRoleTypeUri,
054                                         String othersAssocTypeUri, boolean fetchComposite, boolean fetchRelatingComposite);
055    }