From: Xuan B. <med...@us...> - 2008-01-21 19:58:21
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/merged In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28499/src/org/tm4j/topicmap/tmdm/merged Added Files: MergedOccurrence.java MergedOccurrenceKey.java Removed Files: MergedOccurence.java MergedOccurenceKey.java Log Message: Spelling fix: s/ccurence/ccurrence/ part 1 (found thanks to a code-review by Benjamin Bock <bb-...@bo...>) --- NEW FILE: MergedOccurrenceKey.java --- package org.tm4j.topicmap.tmdm.merged; import java.util.Set; import java.util.HashSet; import java.util.Iterator; import java.util.Collection; import java.util.ArrayList; import org.tm4j.net.Locator; import org.tm4j.topicmap.tmdm.TopicMapEventListener; import org.tm4j.topicmap.tmdm.*; /** An Occurence in context of one MergedTopic. @author <a href="mailto:xua...@pu...">Xuân Baldauf</a> */ public class MergedOccurenceKey extends MergedScopeableKey { protected MergedTopic parent; protected MergedTopic type; protected String value; // FIXME: variants missing // FIXME: scope missing protected MergedOccurenceKey(MergedTopic parent,MergedTopic type,String value,MergedScopeKey scope) { super(scope); this.parent = parent; this.type = type; this.value = value; // FIXME: register at MergedTopics // parent.addUsedAsOccurenceParent(this); } protected MergedOccurenceKey changeScope(MergedScopeKey newScope) { throw new UnsupportedOperationException(); } protected MergedTopic getParent() { return parent; } public boolean equals(Object o) { return equals((MergedOccurenceKey) o); } public boolean equals(MergedOccurenceKey o) { return parent.equals(o.parent)&&type.equals(o.type)&&value.equals(o.value)&&super.equals(o); } public int hashCode() { return parent.hashCode()^type.hashCode()^value.hashCode()^super.hashCode(); } protected void destroy() { assert parent!=null; if (parent!=null) { // parent.removeUsedAsOccurenceParent(this); parent = null; } // FIXME: type.. } public String toString() { return "MergedOccurenceKey("+parent+","+type+",\""+value+"\")"; } } /* 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: --- MergedOccurence.java DELETED --- --- NEW FILE: MergedOccurrence.java --- package org.tm4j.topicmap.tmdm.merged; import java.util.Set; import java.util.HashSet; import java.util.Iterator; import java.util.Collection; import java.util.ArrayList; import org.tm4j.net.Locator; import org.tm4j.topicmap.tmdm.TopicMapEventListener; import org.tm4j.topicmap.tmdm.*; /** @author <a href="mailto:xua...@pu...">Xuân Baldauf</a> */ public class MergedOccurence extends MergedReifiable<ReadableOccurence,MergedOccurenceKey> /*implements ReadableOccurence*/ { protected MergedTopic parent; protected MergedOccurence(MergedTopic parent,MergedOccurenceKey key,Occurence firstComponent) { super(parent.getContainer(),key,firstComponent); this.parent = parent; } public MergedTopic getParent() { return parent; } } /* 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: --- MergedOccurenceKey.java DELETED --- |