001    package de.deepamehta.core.model;
002    
003    import org.codehaus.jettison.json.JSONObject;
004    
005    import java.util.List;
006    import java.util.logging.Logger;
007    
008    
009    
010    /**
011     * Collection of the data that makes up an {@link AssociationType}.
012     *
013     * @author <a href="mailto:jri@deepamehta.de">Jörg Richter</a>
014     */
015    public class AssociationTypeModel extends TypeModel {
016    
017        // ---------------------------------------------------------------------------------------------- Instance Variables
018    
019        private Logger logger = Logger.getLogger(getClass().getName());
020    
021        // ---------------------------------------------------------------------------------------------------- Constructors
022    
023        public AssociationTypeModel(String uri, String value, String dataTypeUri) {
024            super(uri, "dm4.core.assoc_type", new SimpleValue(value), dataTypeUri);
025        }
026    
027        public AssociationTypeModel(TopicModel topic, String dataTypeUri, List<IndexMode> indexModes,
028                                    List<AssociationDefinitionModel> assocDefs, List<String> labelConfig,
029                                    ViewConfigurationModel viewConfig) {
030            super(topic, dataTypeUri, indexModes, assocDefs, labelConfig, viewConfig);
031        }
032    
033        public AssociationTypeModel(JSONObject assocType) {
034            super(assocType, "dm4.core.assoc_type");
035        }
036    
037        // -------------------------------------------------------------------------------------------------- Public Methods
038    
039        @Override
040        public String toString() {
041            return "association type (" + super.toString() + ")";
042        }
043    }