|
From: <jan...@us...> - 2008-02-07 22:02:14
|
Revision: 732
http://magicmap.svn.sourceforge.net/magicmap/?rev=732&view=rev
Author: jan_fride
Date: 2008-02-07 13:27:03 -0800 (Thu, 07 Feb 2008)
Log Message:
-----------
changed uris to strings
Modified Paths:
--------------
trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNode.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNodeModel.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/node/NodeKeyFunction.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNode.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNodeModel.java
Removed Paths:
-------------
trunk/magicmapclient/src/net/sf/magicmap/core/model/URI.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/UnsupportedUriException.java
trunk/magicmapclient/src/net/sf/magicmap/core/model/impl/URIImpl.java
Deleted: trunk/magicmapclient/src/net/sf/magicmap/core/model/URI.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/URI.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/URI.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -1,42 +0,0 @@
-package net.sf.magicmap.core.model;
-
-import java.net.URL;
-
-/**
- * <p>
- * Class URI ZUSAMMENFASSUNG
- * </p>
- * <p>
- * DETAILS
- * </p>
- *
- * @author Jan Friderici
- * Date: 21.01.2008
- * Time: 21:52:54
- */
-public interface URI {
- /**
- * Get the protocol.
- * @return
- */
- String getProtocol();
-
- /**
- * Return the uri as string....
- * @return
- */
- String toString();
-
- /**
- *
- * @return
- */
- java.net.URI toJavaURI();
-
- /**
- *
- * @return
- * @throws UnsupportedUriException
- */
- URL toJavaURL() throws UnsupportedUriException;
-}
Deleted: trunk/magicmapclient/src/net/sf/magicmap/core/model/UnsupportedUriException.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/UnsupportedUriException.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/UnsupportedUriException.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -1,28 +0,0 @@
-package net.sf.magicmap.core.model;
-
-/**
- * <p>
- * Class UnsupportedUriException ZUSAMMENFASSUNG
- * </p>
- * <p>
- * DETAILS
- * </p>
- *
- * @author Jan Friderici
- * Date: 21.01.2008
- * Time: 21:53:51
- */
-public class UnsupportedUriException extends RuntimeException {
-
- public UnsupportedUriException(String s) {
- super(s);
- }
-
- public UnsupportedUriException(String s, Throwable throwable) {
- super(s, throwable);
- }
-
- public UnsupportedUriException(Throwable throwable) {
- super(throwable);
- }
-}
Deleted: trunk/magicmapclient/src/net/sf/magicmap/core/model/impl/URIImpl.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/impl/URIImpl.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/impl/URIImpl.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -1,67 +0,0 @@
-package net.sf.magicmap.core.model.impl;
-
-import net.sf.magicmap.core.model.URI;
-import net.sf.magicmap.core.model.UnsupportedUriException;
-
-import java.net.MalformedURLException;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-/**
- * <p>
- * Class URIImpl ZUSAMMENFASSUNG
- * </p>
- * <p>
- * DETAILS
- * </p>
- *
- * @author Jan Friderici
- * Date: 13.01.2008
- * Time: 11:35:41
- */
-public class URIImpl implements URI {
- private final String uri;
-
-
- public URIImpl(String uri) {
- this.uri = uri;
- }
-
- /**
- *
- * @return
- */
- public String getProtocol() {
- return uri.substring(0, uri.indexOf(":"));
- }
-
- public String toString() {
- return uri;
- }
-
- /**
- *
- * @return
- */
- public java.net.URI toJavaURI() {
- try {
- return new java.net.URI(uri);
- } catch (URISyntaxException e) {
- throw new UnsupportedUriException(e);
- }
- }
-
- /**
- *
- * @return
- * @throws UnsupportedUriException
- */
- public URL toJavaURL() throws UnsupportedUriException {
- try {
- return new java.net.URL(uri);
- } catch (MalformedURLException e) {
- throw new UnsupportedUriException(e);
- }
- }
-
-}
Modified: trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNode.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNode.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNode.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -2,7 +2,6 @@
import net.sf.magicmap.client.model.node.INode;
import net.sf.magicmap.client.model.node.Node;
-import net.sf.magicmap.core.model.URI;
/**
* <p>
@@ -20,15 +19,15 @@
/**
* <p>Get the server the nodes is stored.</p>
- * @return the server id the node is stored with.
+ * @return the server id the perception is stored with.
*/
- URI getServerID();
+ String getServerID();
/**
* <p>The nodes id. This ID will vary depending....</p>
- * @return a unique id for this node.
+ * @return a unique id for this perception.
*/
- URI getNodeID();
+ String getNodeID();
/**
* <p>For objects that need the old class.</p>
Modified: trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNodeModel.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNodeModel.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/node/IMagicNodeModel.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -2,7 +2,6 @@
import net.sf.magicmap.client.model.node.INode;
import net.sf.magicmap.client.model.node.INodeModel;
-import net.sf.magicmap.core.model.URI;
import java.util.List;
@@ -21,10 +20,10 @@
public interface IMagicNodeModel extends INodeModel {
/**
- * <p>return the server this node model is connected with - if any.</p>
+ * <p>return the server this perception model is connected with - if any.</p>
* @return the uri for the connected server.
*/
- URI getServerID();
+ String getServerID();
/**
*
@@ -34,8 +33,8 @@
/**
- * get an magic node.
- * @param node the magic node to get.
+ * get an magic perception.
+ * @param node the magic perception to get.
* @return
*/
IMagicNode getMagicNode(INode node);
Modified: trunk/magicmapclient/src/net/sf/magicmap/core/model/node/NodeKeyFunction.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/node/NodeKeyFunction.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/node/NodeKeyFunction.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -21,8 +21,8 @@
Class<N> getNodeClass();
/**
- * Calculate a key for the given node.
- * @param node the node to create a key for.
+ * Calculate a key for the given perception.
+ * @param node the perception to create a key for.
* @return
*/
K key(N node);
Modified: trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNode.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNode.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNode.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -2,8 +2,6 @@
import net.sf.magicmap.client.model.node.Node;
import net.sf.magicmap.client.model.node.NodeContainer;
-import net.sf.magicmap.core.model.URI;
-import net.sf.magicmap.core.model.impl.URIImpl;
import net.sf.magicmap.core.model.node.IMagicNode;
import net.sf.magicmap.core.model.node.IMagicNodeModel;
@@ -25,15 +23,15 @@
public class MagicNode implements IMagicNode {
private final Node delegate;
private final IMagicNodeModel magicNodeModel;
- private final URI nodeURI;
+ private final String nodeURI;
public MagicNode(Node delegate, IMagicNodeModel magicNodeModel) {
this.delegate = delegate;
this.magicNodeModel = magicNodeModel;
- nodeURI = new URIImpl(
- magicNodeModel.getServerID().toString()
+ nodeURI =
+ magicNodeModel.getServerID()
+ "/" + delegate.getType()
- + " /" + delegate.getId());
+ + " /" + delegate.getId();
}
@@ -141,11 +139,11 @@
return delegate.getNodeContainer();
}
- public URI getServerID() {
+ public String getServerID() {
return getModel().getServerID();
}
- public URI getNodeID() {
+ public String getNodeID() {
return nodeURI;
}
Modified: trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNodeModel.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNodeModel.java 2008-02-04 15:51:35 UTC (rev 731)
+++ trunk/magicmapclient/src/net/sf/magicmap/core/model/node/impl/MagicNodeModel.java 2008-02-07 21:27:03 UTC (rev 732)
@@ -4,8 +4,6 @@
import net.sf.magicmap.client.meta.MapInfo;
import net.sf.magicmap.client.model.location.INodePlacer;
import net.sf.magicmap.client.model.node.*;
-import net.sf.magicmap.core.model.URI;
-import net.sf.magicmap.core.model.impl.URIImpl;
import net.sf.magicmap.core.model.node.IMagicNode;
import net.sf.magicmap.core.model.node.IMagicNodeModel;
import net.sf.magicmap.core.model.node.INodeIndex;
@@ -27,7 +25,7 @@
*/
public class MagicNodeModel implements IMagicNodeModel {
private final INodeModel delegate;
- private URI serverID;
+ private String serverID;
private final WeakHashMap<Node, IMagicNode> nodeMap = new WeakHashMap<Node, IMagicNode>();
@@ -42,10 +40,6 @@
}
- public void setServerID(String serverURL) {
- serverID = new URIImpl(serverURL);
- }
-
/**
* <p>Create an index to find nodes with a quicknesssssss..</\x9F>
* @param function the function to use.
@@ -105,7 +99,7 @@
*
* @return get the id of the server....
*/
- public URI getServerID() {
+ public String getServerID() {
return serverID;
}
@@ -113,7 +107,7 @@
*
* @param serverID
*/
- public void setServerID(URI serverID) {
+ public void setServerID(String serverID) {
this.serverID = serverID;
}
@@ -217,7 +211,7 @@
}
/**
- * Returns the rotigionals node placer.
+ * Returns the rotigionals perception placer.
* @return
*/
public INodePlacer getNodePlacer() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|