From: Xuan B. <med...@us...> - 2008-01-21 19:58:21
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/basic In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28499/src/org/tm4j/topicmap/tmdm/basic Added Files: BasicOccurrence.java Removed Files: BasicOccurence.java Log Message: Spelling fix: s/ccurence/ccurrence/ part 1 (found thanks to a code-review by Benjamin Bock <bb-...@bo...>) --- BasicOccurence.java DELETED --- --- NEW FILE: BasicOccurrence.java --- package org.tm4j.topicmap.tmdm.basic; import java.util.Set; import java.util.Iterator; import org.tm4j.net.Locator; import org.tm4j.topicmap.tmdm.*; /** @author <a href="mailto:xua...@pu...">Xuân Baldauf</a> */ public class BasicOccurence extends BasicScopeable implements Occurence { BasicTopic parent; BasicTopic type; Locator datatype; String value; protected BasicOccurence(BasicTopic parent,BasicTopic type,Locator datatype,String value) { this.parent = parent; this.type = type; this.datatype = datatype; this.value = value; } @TMDM public BasicTopic getParent() { return parent; } @TMDM @TMAPI public void setType(Topic type) { setType((BasicTopic) type); } public void setType(BasicTopic type) { assert type.getContainingTopicMap()==getContainingTopicMap(); BasicTopic oldType = this.type; this.type = type; // We do not treat cases where the old value equals the new value specially. getEventListener().notifyOccurenceTypeChanged(getContainingTopicMap(),getParent(),this,oldType,type); } @TMDM @TMAPI public BasicTopic getType() { return type; } @TMDM public void setDatatype(Locator datatype) { Locator oldDatatype = this.datatype; this.datatype = datatype; // We do not treat cases where the old value equals the new value specially. getEventListener().notifyOccurenceDatatypeChanged(getContainingTopicMap(),getParent(),this,oldDatatype,datatype); } @TMDM public Locator getDatatype() { return datatype; } @TMDM @TMAPI public void setValue(String value) { String oldValue = this.value; this.value = value; // We do not treat cases where the old value equals the new value specially. getEventListener().notifyOccurenceValueChanged(getContainingTopicMap(),getParent(),this,oldValue,value); } @TMAPI public String getValue() { return value; } protected BasicTopicMap getContainingTopicMap() { return getParent().getContainingTopicMap(); } /** Remove as much as possible without conflicting with TMDM after this call. */ protected void internalPreRemove() { super.internalPreRemove(); } /** Remove everything else. */ protected void internalPostRemove() { super.internalPostRemove(); } protected void removeAtParent() { getParent().internalRemove(this); } } /* Copyright (c) 2007-2008 Xuân Baldauf. This software is licensed, under the terms of * Apache 2 License * GPL v2 License * GPL v3 License * LGPL v2.1 License * MPL v1.1 License as well as each later version of these licenses. This means: (1) If you are using this software, you can choose any subset of the licenses mentioned, and you can choose any version of each of these licenses (starting with the respective version indicated). (Note that, however, choosing the empty set of licenses means that you do not have any right granted by any license at all.) (2) If you are committing contributions to this software (i.e. this software as part of the official TM4J sourcecode), then you agree to each of these licenses for your contribution (such that each user of this software has still at least the same set of rights and licenses when using this software together with you contribution compared to when using this software without your contribution). */ // :tabSize=2:indentSize=2: |