001package systems.dmx.core.impl; 002 003import systems.dmx.core.Topic; 004import systems.dmx.core.TopicRole; 005 006 007 008/** 009 * A topic role that is attached to the {@link PersistenceLayer}. 010 */ 011class TopicRoleImpl extends RoleImpl implements TopicRole { 012 013 // ---------------------------------------------------------------------------------------------------- Constructors 014 015 TopicRoleImpl(TopicRoleModelImpl model, AssociationModelImpl assoc) { 016 super(model, assoc); 017 } 018 019 // -------------------------------------------------------------------------------------------------- Public Methods 020 021 022 023 // === TopicRole Implementation === 024 025 @Override 026 public Topic getTopic() { 027 return (Topic) getPlayer(); 028 } 029 030 // --- 031 032 @Override 033 public String getTopicUri() { 034 return getModel().getTopicUri(); 035 } 036 037 @Override 038 public boolean topicIdentifiedByUri() { 039 return getModel().topicIdentifiedByUri(); 040 } 041 042 043 044 // === RoleImpl Overrides === 045 046 @Override 047 public TopicRoleModelImpl getModel() { 048 return (TopicRoleModelImpl) model; 049 } 050}