Author: lgiessmann Date: Thu Jul 28 06:35:52 2011 New Revision: 690
Log: gdl-frontend: Widgets: implemented the method GdlText.getDefaultValue()
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/IGdlHasValueGroup.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/IGdlHasValueGroup.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/IGdlHasValueGroup.java Thu Jul 28 04:44:52 2011 (r689) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/IGdlHasValueGroup.java Thu Jul 28 06:35:52 2011 (r690) @@ -20,17 +20,22 @@ // root constraint public Topic getRootConstraint() throws InvalidGdlSchemaException; - // returns all topics that are set as default values for this value group - public ArrayList<Topic> getDefaultTmValues() throws InvalidGdlSchemaException; + // returns the topic that represents the default value + public Topic getDefaultTmValue() throws InvalidGdlSchemaException; - // returns the literal default value for this value group - public String getDefaultLiteralValue() throws InvalidGdlSchemaException; + // returns the topic that represents the literal default value + // for this value group + public Topic getDefaultLiteralValue() throws InvalidGdlSchemaException; + + // returns the topic that is the default value of this value group, + // i.e. is is one value of getDefaultTmValue(), getDefaultLiteralValue() + public Topic getDefaultValue() throws InvalidGdlSchemaException; // returns all possible topics that can be used as values for this value group public ArrayList<Topic> getTmValues() throws InvalidGdlSchemaException; // returns all possible literals that can be used as values for this value group - public ArrayList<String> getLiteralValues() throws InvalidGdlSchemaException; + public ArrayList<Topic> getLiteralValues() throws InvalidGdlSchemaException; // returns the literal value that is set on an item public String getSetLiteralValue() throws InvalidGdlSchemaException;
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Thu Jul 28 04:44:52 2011 (r689) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Thu Jul 28 06:35:52 2011 (r690) @@ -847,18 +847,23 @@
@Override - public ArrayList<Topic> getDefaultTmValues() - throws InvalidGdlSchemaException { + public Topic getDefaultTmValue() throws InvalidGdlSchemaException { // TODO Auto-generated method stub return null; }
@Override - public String getDefaultLiteralValue() throws InvalidGdlSchemaException { + public Topic getDefaultLiteralValue() throws InvalidGdlSchemaException { // TODO Auto-generated method stub return null; } + + + @Override + public Topic getDefaultValue() throws InvalidGdlSchemaException { + return this.getDefaultLiteralValue() == null ? this.getDefaultTmValue() : this.getDefaultLiteralValue(); + }
@Override @@ -869,8 +874,7 @@
@Override - public ArrayList<String> getLiteralValues() - throws InvalidGdlSchemaException { + public ArrayList<Topic> getLiteralValues() throws InvalidGdlSchemaException { // TODO Auto-generated method stub return null; }