Author: lgiessmann Date: Tue Jun 21 06:10:50 2011 New Revision: 492
Log: gdl-frontend: TmEngine: fixed a package-name problem; fixed a problem when calling virtual methods of a JavaScriptObject
Added: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/Base/ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/Base/TmEngine.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/ - copied from r491, branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/JtmsTmEngine.java - copied, changed from r490, branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/GDL_TmEngine.java Deleted: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/GDL_TmEngine.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/ Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/GDL_TmEngine.gwt.xml branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Association.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Construct.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/DatatypeAware.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Locator.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Name.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Occurrence.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Reifiable.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Role.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Scoped.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Topic.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/TopicMap.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Typed.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Variant.java branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/TestClass.java
Added: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/Base/TmEngine.java ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/Base/TmEngine.java Tue Jun 21 06:10:50 2011 (r492) @@ -0,0 +1,10 @@ +package us.isidor.gdl.anaToMia.TmEngine.Base; + +import us.isidor.gdl.anaToMia.TmEngine.TopicMaps.Locator; +import us.isidor.gdl.anaToMia.TmEngine.TopicMaps.TopicMap; + +public interface TmEngine { + public TopicMap read(String jtm_1_0, TopicMap tm); + public String write(TopicMap tm); + public TopicMap createTopicMap(Locator locator); +}
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/GDL_TmEngine.gwt.xml ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/GDL_TmEngine.gwt.xml Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/GDL_TmEngine.gwt.xml Tue Jun 21 06:10:50 2011 (r492) @@ -19,6 +19,7 @@ <!-- Specify the paths for translatable code --> <source path='jtmsBasedEngine'/> <source path="TopicMaps"/> + <source path="Base"/>
<!-- Reference the javascript file that is necessary for tmjs --> <script src="lib/tm.min.js" />
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Association.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Association.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Association.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.util.Set;
@@ -13,85 +13,71 @@ }-*/;
- @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override public final native TopicMap getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override public final native void setReifier(Topic reifier) /*-{ this.setReifier(reifier); }-*/;
- @Override public final native void addTheme(Topic theme) /*-{ this.addTheme(theme); }-*/;
- @Override public final native void removeTheme(Topic theme) /*-{ this.removeTheme(theme); }-*/;
- @Override public final native Set<Topic> getScope() /*-{ return this.getScope(); }-*/;
- @Override public final native Topic getType() /*-{ return this.getType(); }-*/;
- @Override public final native void setType(Topic type) /*-{ this.setType(type); }-*/;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Construct.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Construct.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Construct.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,14 +1,23 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
-import java.util.Set;
public interface Construct { - public String getId(); - public boolean equals(Object other); - void addItemIdentifier(Locator itemIdentifier); - public Set<Locator> getItemIdentifiers(); - public Construct getParent(); - public TopicMap getTopicMap(); - public void remove(); - public void removeItemIdentifier(Locator itemIdentifier); + /* instances of JavaScriptObject are not allowed to implement interfaces + * defining methods, so all interfaces in the package + * us.isidor.gdl.anaToMia.TmEngine.TopicMaps have no mehtods defined. + * That means classes derived of such an interfaces must be implemented carefully + * and take all commented methods into account. + */ + + + /* + public String getId(); + public boolean equals(Object other); + void addItemIdentifier(Locator itemIdentifier); + public Set<Locator> getItemIdentifiers(); + public Construct getParent(); + public TopicMap getTopicMap(); + public void remove(); + public void removeItemIdentifier(Locator itemIdentifier); + */ }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/DatatypeAware.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/DatatypeAware.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/DatatypeAware.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,23 +1,30 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
-import java.math.BigDecimal; -import java.math.BigInteger;
public interface DatatypeAware extends Scoped, Reifiable{ - public BigDecimal decimalValue(); - public float floatValue(); - public Locator getDatatype(); - public String getValue(); - public BigInteger integerValue(); - public int intValue(); - public Locator locatorValue(); - public long longValue(); - public void setValue(BigDecimal value); - public void setValue(BigInteger value); - public void setValue(float value); - public void setValue(int value); - public void setValue(Locator value); - public void setValue(long value); - public void setValue(String value); - public void setValue(String value, Locator datatype); + /* instances of JavaScriptObject are not allowed to implement interfaces + * defining methods, so all interfaces in the package + * us.isidor.gdl.anaToMia.TmEngine.TopicMaps have no mehtods defined. + * That means classes derived of such an interfaces must be implemented carefully + * and take all commented methods into account. + */ + + /* + public BigDecimal decimalValue(); + public float floatValue(); + public Locator getDatatype(); + public String getValue(); + public BigInteger integerValue(); + public int intValue(); + public Locator locatorValue(); + //public long longValue(); //long is not supported by JSNI + public void setValue(BigDecimal value); + public void setValue(BigInteger value); + public void setValue(float value); + public void setValue(int value); + public void setValue(Locator value); + //public void setValue(long value); //long is not supported by JSNI + public void setValue(String value); + public void setValue(String value, Locator datatype); + */ }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Locator.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Locator.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Locator.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import com.google.gwt.core.client.JavaScriptObject;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Name.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Name.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Name.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.util.Collection; import java.util.Set; @@ -37,86 +37,72 @@ }-*/; - @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override public final native Topic getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Topic getType() /*-{ return this.getType(); }-*/;
- @Override public final native void setType(Topic type) /*-{ this.setType(type); }-*/;
- @Override public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override public final native void setReifier(Topic reifier) /*-{ this.setReiffier(reifier); }-*/;
- @Override public final native void addTheme(Topic theme) /*-{ this.addTheme(theme); }-*/;
- @Override public final native void removeTheme(Topic theme) /*-{ this.removeTheme(theme); }-*/;
- @Override public final native Set<Topic> getScope() /*-{ return this.getScope(); }-*/;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Occurrence.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Occurrence.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Occurrence.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.math.BigDecimal; import java.math.BigInteger; @@ -10,181 +10,141 @@ protected Occurrence() {} - @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override public final native Topic getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(); }-*/;
- @Override public final native Topic getType() /*-{ return this.getType(); }-*/;
- @Override public final native void setType(Topic type) /*-{ this.setType(type); }-*/;
- @Override public final native void addTheme(Topic theme) /*-{ this.addTheme(theme); }-*/;
- @Override public final native void removeTheme(Topic theme) /*-{ this.removeTheme(theme); }-*/;
- @Override public final native Set<Topic> getScope() /*-{ return this.getScope(); }-*/;
- @Override public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override public final native void setReifier(Topic reifier) /*-{ tis.setReifier(reifier); }-*/;
- @Override public final native BigDecimal decimalValue() /*-{ return this.decimalValue(); }-*/;
- @Override public final native float floatValue() /*-{ return this.floatValue(); }-*/;
- @Override public final native Locator getDatatype() /*-{ return this.getDatatype(); }-*/;
- @Override public final native String getValue() /*-{ return this.getValue(); }-*/;
- @Override public final native BigInteger integerValue() /*-{ return this.integerValue(); }-*/;
- @Override public final native int intValue() /*-{ return this.intValue(); }-*/;
- @Override public final native Locator locatorValue() /*-{ return this.locatorValue(); }-*/;
- @Override - public final native long longValue() /*-{ - return this.longValue(); - }-*/; - - - @Override public final native void setValue(BigDecimal value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(BigInteger value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(float value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(int value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(Locator value) /*-{ this.setValue(value); }-*/;
- @Override - public final native void setValue(long value) /*-{ - this.setValue(value); - }-*/; - - - @Override public final native void setValue(String value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(String value, Locator datatype) /*-{ this.setValue(value); }-*/;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Reifiable.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Reifiable.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Reifiable.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,6 +1,15 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
public interface Reifiable extends Construct{ - public Topic getReifier(); - public void setReifier(Topic reifier); + /* instances of JavaScriptObject are not allowed to implement interfaces + * defining methods, so all interfaces in the package + * us.isidor.gdl.anaToMia.TmEngine.TopicMaps have no mehtods defined. + * That means classes derived of such an interfaces must be implemented carefully + * and take all commented methods into account. + */ + + /* + public Topic getReifier(); + public void setReifier(Topic reifier); + */ }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Role.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Role.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Role.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.util.Set;
@@ -18,63 +18,52 @@ }-*/; - @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override public final native Association getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Topic getType() /*-{ return this.getType(); }-*/;
- @Override public final native void setType(Topic type) /*-{ this.setType(type); }-*/;
- @Override public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override public final native void setReifier(Topic reifier) /*-{ this.setReifier(reifier); }-*/;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Scoped.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Scoped.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Scoped.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,9 +1,18 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
-import java.util.Set;
public interface Scoped extends Construct{ - public void addTheme(Topic theme); - public void removeTheme(Topic theme); - public Set<Topic> getScope(); + /* instances of JavaScriptObject are not allowed to implement interfaces + * defining methods, so all interfaces in the package + * us.isidor.gdl.anaToMia.TmEngine.TopicMaps have no mehtods defined. + * That means classes derived of such an interfaces must be implemented carefully + * and take all commented methods into account. + */ + + + /* + public void addTheme(Topic theme); + public void removeTheme(Topic theme); + public Set<Topic> getScope(); + */ }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Topic.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Topic.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Topic.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.util.Collection; import java.util.Set; @@ -118,48 +118,41 @@ }-*/; - public final native void removeType(Topic type); /*-{ + public final native void removeType(Topic type) /*-{ this.removeType(type); }-*/;
- @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifier(); }-*/;
- @Override public final native TopicMap getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/TopicMap.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/TopicMap.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/TopicMap.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.util.Collection; import java.util.Set; @@ -84,50 +84,42 @@ }-*/;
- @Override - public native String getId() /*-{ + public final native String getId() /*-{ return this.getId(); }-*/;
- @Override - public native void addItemIdentifier(Locator itemIdentifier) /*-{ + public final native void addItemIdentifier(Locator itemIdentifier) /*-{ return this.addItemIdentifier(itemIdentifier); }-*/;
- @Override - public native Set<Locator> getItemIdentifiers() /*-{ + public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override - public native TopicMap getTopicMap() /*-{ + public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override - public native void remove() /*-{ + public final native void remove() /*-{ return this.remove(); }-*/;
- @Override - public native void removeItemIdentifier(Locator itemIdentifier) /*-{ + public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
- @Override - public native Topic getReifier() /*-{ + public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override - public native void setReifier(Topic reifier) /*-{ + public final native void setReifier(Topic reifier) /*-{ this.setReifier(reifier); }-*/; }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Typed.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Typed.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Typed.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,6 +1,15 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
public interface Typed extends Construct{ - public Topic getType(); - public void setType(Topic type); + /* instances of JavaScriptObject are not allowed to implement interfaces + * defining methods, so all interfaces in the package + * us.isidor.gdl.anaToMia.TmEngine.TopicMaps have no mehtods defined. + * That means classes derived of such an interfaces must be implemented carefully + * and take all commented methods into account. + */ + + /* + public Topic getType(); + public void setType(Topic type); + */ }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Variant.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TopicMaps/Variant.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/TopicMaps/Variant.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,4 @@ -package us.isidor.gdl.anaToMia.TopicMaps; +package us.isidor.gdl.anaToMia.TmEngine.TopicMaps;
import java.math.BigDecimal; import java.math.BigInteger; @@ -9,169 +9,131 @@ public class Variant extends JavaScriptObject implements DatatypeAware{ protected Variant() {}
- @Override public final native void addTheme(Topic theme) /*-{ this.addTheme(theme); }-*/;
- @Override public final native void removeTheme(Topic theme) /*-{ this.removeTheme(theme); }-*/;
- @Override public final native Set<Topic> getScope() /*-{ return this.getScope(); }-*/;
- @Override public final native String getId() /*-{ return this.getId(); }-*/;
- @Override public final native void addItemIdentifier(Locator itemIdentifier) /*-{ this.addItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Set<Locator> getItemIdentifiers() /*-{ return this.getItemIdentifiers(); }-*/;
- @Override public final native Name getParent() /*-{ return this.getParent(); }-*/;
- @Override public final native TopicMap getTopicMap() /*-{ return this.getTopicMap(); }-*/;
- @Override public final native void remove() /*-{ this.remove(); }-*/;
- @Override public final native void removeItemIdentifier(Locator itemIdentifier) /*-{ this.removeItemIdentifier(itemIdentifier); }-*/;
- @Override public final native Topic getReifier() /*-{ return this.getReifier(); }-*/;
- @Override public final native void setReifier(Topic reifier) /*-{ this.setReifier(reifier); }-*/;
- @Override public final native BigDecimal decimalValue() /*-{ return this.decimalValue(); }-*/;
- @Override public final native float floatValue() /*-{ return this.floatValue(); }-*/;
- @Override public final native Locator getDatatype() /*-{ return this.getDatatype(); }-*/;
- @Override public final native String getValue() /*-{ return this.getValue(); }-*/;
- @Override public final native BigInteger integerValue() /*-{ return this.integerValue(); }-*/;
- @Override public final native int intValue() /*-{ return this.intValue(); }-*/;
- @Override public final native Locator locatorValue() /*-{ return this.locatorValue(); }-*/;
- @Override - public final native long longValue() /*-{ - return this.longValue(); - }-*/; - - - @Override public final native void setValue(BigDecimal value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(BigInteger value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(float value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(int value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(Locator value) /*-{ this.setValue(value); }-*/;
- @Override - public final native void setValue(long value) /*-{ - this.setValue(value); - }-*/; - - - @Override public final native void setValue(String value) /*-{ this.setValue(value); }-*/;
- @Override public final native void setValue(String value, Locator datatype) /*-{ this.setValue(value); }-*/;
Copied and modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/JtmsTmEngine.java (from r490, branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/GDL_TmEngine.java) ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/GDL_TmEngine.java Mon Jun 20 02:35:52 2011 (r490, copy source) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/JtmsTmEngine.java Tue Jun 21 06:10:50 2011 (r492) @@ -1,4 +1,28 @@ package us.isidor.gdl.anaToMia.TmEngine.jtmsBasedEngine;
-public class GDL_TmEngine { +import us.isidor.gdl.anaToMia.TmEngine.Base.TmEngine; +import us.isidor.gdl.anaToMia.TmEngine.TopicMaps.Locator; +import us.isidor.gdl.anaToMia.TmEngine.TopicMaps.TopicMap; + +public class JtmsTmEngine implements TmEngine{ + + @Override + public TopicMap read(String jtm_1_0, TopicMap tm) { + // TODO Auto-generated method stub + return null; + } + + + @Override + public String write(TopicMap tm) { + // TODO Auto-generated method stub + return null; + } + + + @Override + public TopicMap createTopicMap(Locator locator) { + // TODO Auto-generated method stub + return null; + } }
Modified: branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/TestClass.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/TestClass.java Mon Jun 20 14:21:16 2011 (r491) +++ branches/gdl-frontend/src/anaToMia/GDL_TmEngine/src/us/isidor/gdl/anaToMia/TmEngine/jtmsBasedEngine/TestClass.java Tue Jun 21 06:10:50 2011 (r492) @@ -2,12 +2,27 @@
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.Window; +import us.isidor.gdl.anaToMia.TmEngine.TopicMaps.TopicMap; +
public class TestClass implements EntryPoint{
@Override public void onModuleLoad() { Window.alert("TEST !!!"); + Window.alert(">> " + createTM().getLocator().getReference()); }
+ + + public static native TopicMap createTM()/*-{ + var factory, sys, tmid, tm; + factory = $wnd.TopicMapSystemFactory.newInstance(); + factory.setProperty('com.semanticheadache.tmjs.backend', 'memory'); + sys = factory.newTopicMapSystem(); + tmid = sys.createLocator("http://example.org/mytm"); + tm = sys.createTopicMap(tmid); + return tm; + }-*/; + }