svn commit: r17569 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java
Thomas Neustupny <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: thn
Date: 2009-12-01 07:43:39-0800
New Revision: 17569
Modified:
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java
Log:
use public id instead of system id for the uri of models (suggestion from Luis)
Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java?view=diff&pathrev=17569&r1=17568&r2=17569
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java (original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java 2009-12-01 07:43:39-0800
@@ -139,20 +139,15 @@
throw new UnsupportedOperationException();
}
- String id = inputSource.getSystemId();
+ String id = inputSource.getPublicId();
if (id == null) {
- id = inputSource.getPublicId();
- }
- // The id contains the whole path, which is not what we want in models
- // (it's a tradeoff, but collisions will be unlikely with the xmi.id)
- if (id != null) {
- // for ArgoUML internal profiles, id will start with "org/argouml"
- int ix = id.indexOf("org/argouml/");
- if (ix != -1) {
- id = id.substring(ix);
- } else if ((ix = id.lastIndexOf('/')) != -1) {
- // for user profiles, use the filename only
- id = id.substring(ix + 1);
+ id = inputSource.getSystemId();
+ if (id != null) {
+ // we only take the filename, not the whole system path
+ int ix = id.lastIndexOf('/');
+ if (ix != -1) {
+ id = id.substring(ix + 1);
+ }
}
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2425912
To unsubscribe from this discussion, e-mail: [[email protected]].