
Author: lgiessmann Date: Wed Aug 24 08:47:02 2011 New Revision: 778 Log: gdl-frontend: Widgets: changed the PSIs class Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/PSIs.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java 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/GdlTextObject.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPanel.java Wed Aug 24 08:47:02 2011 (r778) @@ -42,7 +42,7 @@ // the topic map that is the base of the created GDL view private TopicMap requestedSchemaTm = null; // the locator of the topic map "requestedSchemaTm" - private final String REQUESTED_SCHEMA_TOPIC_MAP_LOCATOR = PSIs.gdl + "topicmap/tm-1"; + private final String REQUESTED_SCHEMA_TOPIC_MAP_LOCATOR = PSIs.GDL.gdl + "topicmap/tm-1"; // callback instance for getting/loading the GDL schema private ILoadSchemaCallback loadSchemaCallback = null; Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlPosition.java Wed Aug 24 08:47:02 2011 (r778) @@ -64,7 +64,7 @@ public AutoNumUnitValue getTop() throws InvalidGdlSchemaException { Occurrence topOcc = null; - topOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTop); + topOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTop); if(topOcc == null) return null; else return new AutoNumUnitValue(topOcc.getValue()); @@ -73,7 +73,7 @@ public AutoNumUnitValue getRight() throws InvalidGdlSchemaException { Occurrence rightOcc = null; - rightOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlRight); + rightOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlRight); if(rightOcc == null) return null; else return new AutoNumUnitValue(rightOcc.getValue()); @@ -82,7 +82,7 @@ public AutoNumUnitValue getBottom() throws InvalidGdlSchemaException { Occurrence bottomOcc = null; - bottomOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBottom); + bottomOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBottom); if(bottomOcc == null) return null; else return new AutoNumUnitValue(bottomOcc.getValue()); @@ -91,7 +91,7 @@ public AutoNumUnitValue getLeft() throws InvalidGdlSchemaException { Occurrence leftOcc = null; - leftOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlLeft); + leftOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlLeft); if(leftOcc == null) return null; else return new AutoNumUnitValue(leftOcc.getValue()); @@ -100,7 +100,7 @@ public PositionStyleValue getPositionStyle()throws InvalidGdlSchemaException { Occurrence positionStyleOcc = null; - positionStyleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPositionStyle); + positionStyleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPositionStyle); if(positionStyleOcc == null) return null; else try{ Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/GdlVisibleObject.java Wed Aug 24 08:47:02 2011 (r778) @@ -225,9 +225,9 @@ // returns the string value of a gdl:id occurrence public String getId() throws InvalidGdlSchemaException { - JsArray<Occurrence> idOccs = getOccurrences(PSIs.OccurrenceType.gdlId); + JsArray<Occurrence> idOccs = getOccurrences(PSIs.GDL.OccurrenceType.gdlId); if(idOccs.length() != 1){ - throw new InvalidGdlSchemaException("The topic " + TmHelper.getAnyIdOfTopic(this.tmRepresentative) + " must be bound to exactly one occurrence of the type " + PSIs.OccurrenceType.gdlId + ", but is bound " + idOccs.length() + " times to it"); + throw new InvalidGdlSchemaException("The topic " + TmHelper.getAnyIdOfTopic(this.tmRepresentative) + " must be bound to exactly one occurrence of the type " + PSIs.GDL.OccurrenceType.gdlId + ", but is bound " + idOccs.length() + " times to it"); } else { return idOccs.get(0).getValue(); } @@ -237,7 +237,7 @@ // returns a Display instance of a gdl:display occurrence. // If no gdl:display occurrence is set, the default value is returned public Display getDisplay() throws InvalidGdlSchemaException { - Occurrence displayOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlDisplay); + Occurrence displayOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlDisplay); if(displayOcc != null){ String value = displayOcc.getValue().toLowerCase(); @@ -250,7 +250,7 @@ } else if(value.equals("block")){ return Display.BLOCK; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlDisplay + " must be set to one of \"none\", \"inline\", \"inline-block\" or \"block\", but is \"" + displayOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlDisplay + " must be set to one of \"none\", \"inline\", \"inline-block\" or \"block\", but is \"" + displayOcc.getValue() + "\""); } } else { return Display.INLINE_BLOCK; @@ -261,7 +261,7 @@ // returns an AutoNumValue instance of a gdl:z-index occurrence. // If no gdl:z-index occurrence is set, the default value is returned public AutoNumValue getZindex() throws InvalidGdlSchemaException { - Occurrence zOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlZindex); + Occurrence zOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlZindex); if(zOcc != null){ return new AutoNumValue(zOcc.getValue()); } else { @@ -273,7 +273,7 @@ // returns a Float instance of a gdl:float occurrence or the default value for // this property if no gdl:float occurrence is available public Float getFloat() throws InvalidGdlSchemaException { - Occurrence floatOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFloat); + Occurrence floatOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFloat); if(floatOcc != null){ String value = floatOcc.getValue().toLowerCase(); @@ -284,7 +284,7 @@ } else if (value.equals("right")){ return Float.RIGHT; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlFloat + " must be set to one of \"none\", \"left\" or \"right\", but is \"" + floatOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlFloat + " must be set to one of \"none\", \"left\" or \"right\", but is \"" + floatOcc.getValue() + "\""); } } else { return Float.NONE; @@ -295,13 +295,13 @@ // returns a ClearValue instance of a gdl:clear occurrence or the default value for // this property if no gdl:clear occurrence is available public ClearValue getClear() throws InvalidGdlSchemaException { - Occurrence clearOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlClear); + Occurrence clearOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlClear); if(clearOcc != null){ try{ return ClearValue.valueOf(clearOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlClear + " must be set to one of \"none\", \"left\", \"right\" or \"both\", but is \"" + clearOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlClear + " must be set to one of \"none\", \"left\", \"right\" or \"both\", but is \"" + clearOcc.getValue() + "\""); } } else { return ClearValue.NONE; @@ -312,13 +312,13 @@ // returns a ContentOrientationValue instance of a gdl:content-orientation occurrence or the default value for // this property if no gdl:content-orientation occurrence is available public ContentOrientationValue getContentOrientation() throws InvalidGdlSchemaException { - Occurrence orientationOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlContentOrientation); + Occurrence orientationOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlContentOrientation); if(orientationOcc != null){ try{ return ContentOrientationValue.valueOf(orientationOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlContentOrientation + " must be set to one of \"horizontal\" or \"vertical\", but is \"" + orientationOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlContentOrientation + " must be set to one of \"horizontal\" or \"vertical\", but is \"" + orientationOcc.getValue() + "\""); } } else { return ContentOrientationValue.VERTICAL; @@ -333,9 +333,9 @@ public VerticalAlign getVerticalAlign(String styleClass) throws InvalidGdlSchemaException { Occurrence vaOcc = null; if(styleClass != null){ - vaOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlVerticalAlign, styleClass); + vaOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlVerticalAlign, styleClass); } else { - vaOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlVerticalAlign); + vaOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlVerticalAlign); } if(vaOcc == null && styleClass != null){ @@ -361,7 +361,7 @@ }else if(value.equals("text-bottom")) { return VerticalAlign.TEXT_BOTTOM; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlVerticalAlign + " must be set to one of \"baseline\", \"sub\", \"super\", \"top\", \"text-top\", \"middle\", \"bottom\" or \"text-bottom\", but is \"" + vaOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlVerticalAlign + " must be set to one of \"baseline\", \"sub\", \"super\", \"top\", \"text-top\", \"middle\", \"bottom\" or \"text-bottom\", but is \"" + vaOcc.getValue() + "\""); } } } @@ -374,9 +374,9 @@ public NumUnitValue getMargin(String styleClass) throws InvalidGdlSchemaException { Occurrence marginOcc = null; if(styleClass != null){ - marginOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMargin, styleClass); + marginOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMargin, styleClass); } else { - marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMargin); + marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMargin); } if(marginOcc == null && styleClass != null){ @@ -395,9 +395,9 @@ public NumUnitValue getMarginTop(String styleClass) throws InvalidGdlSchemaException { Occurrence marginOcc = null; if(styleClass != null){ - marginOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMarginTop, styleClass); + marginOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginTop, styleClass); } else { - marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMarginTop); + marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginTop); } if(marginOcc == null){ @@ -414,9 +414,9 @@ public NumUnitValue getMarginRight(String styleClass) throws InvalidGdlSchemaException { Occurrence marginOcc = null; if(styleClass != null){ - marginOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMarginRight, styleClass); + marginOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginRight, styleClass); } else { - marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMarginRight); + marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginRight); } if(marginOcc == null){ @@ -433,9 +433,9 @@ public NumUnitValue getMarginBottom(String styleClass) throws InvalidGdlSchemaException { Occurrence marginOcc = null; if(styleClass != null){ - marginOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMarginBottom, styleClass); + marginOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginBottom, styleClass); } else { - marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMarginBottom); + marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginBottom); } if(marginOcc == null){ @@ -452,9 +452,9 @@ public NumUnitValue getMarginLeft(String styleClass) throws InvalidGdlSchemaException { Occurrence marginOcc = null; if(styleClass != null){ - marginOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMarginLeft, styleClass); + marginOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginLeft, styleClass); } else { - marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMarginLeft); + marginOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMarginLeft); } if(marginOcc == null){ @@ -472,9 +472,9 @@ public ColorValue getBorderColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor); } if(colorOcc == null && styleClass != null){ @@ -493,9 +493,9 @@ public ColorValue getBorderTopColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopColor); } if(colorOcc == null ){ @@ -512,9 +512,9 @@ public ColorValue getBorderRightColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightColor); } if(colorOcc == null ){ @@ -531,9 +531,9 @@ public ColorValue getBorderBottomColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomColor); } if(colorOcc == null ){ @@ -550,9 +550,9 @@ public ColorValue getBorderLeftColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftColor); } if(colorOcc == null ){ @@ -570,9 +570,9 @@ public BorderStyleValue getBorderStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle); } if(styleOcc == null && styleClass != null){ @@ -596,9 +596,9 @@ public BorderStyleValue getBorderTopStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopStyle); } if(styleOcc == null){ @@ -620,9 +620,9 @@ public BorderStyleValue getBorderRightStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightStyle); } if(styleOcc == null){ @@ -644,9 +644,9 @@ public BorderStyleValue getBorderBottomStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomStyle); } if(styleOcc == null){ @@ -668,9 +668,9 @@ public BorderStyleValue getBorderLeftStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftStyle); } if(styleOcc == null){ @@ -693,9 +693,9 @@ public AbsoluteNumValue getBorderWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth); } if(widthOcc == null && styleClass != null){ @@ -714,9 +714,9 @@ public AbsoluteNumValue getBorderTopWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopWidth); } if(widthOcc == null){ @@ -733,9 +733,9 @@ public AbsoluteNumValue getBorderRightWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightWidth); } if(widthOcc == null){ @@ -752,9 +752,9 @@ public AbsoluteNumValue getBorderBottomWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomWidth); } if(widthOcc == null){ @@ -771,9 +771,9 @@ public AbsoluteNumValue getBorderLeftWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftWidth); } if(widthOcc == null){ @@ -791,9 +791,9 @@ public NumUnitValue getBorderRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius); } if(radiusOcc == null && styleClass != null){ @@ -812,9 +812,9 @@ public NumUnitValue getBorderTopLeftRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopLeftRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopLeftRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopLeftRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopLeftRadius); } if(radiusOcc == null && styleClass != null){ @@ -833,9 +833,9 @@ public NumUnitValue getBorderTopRightRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopRightRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopRightRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopRightRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopRightRadius); } if(radiusOcc == null && styleClass != null){ @@ -854,9 +854,9 @@ public NumUnitValue getBorderBottomLeftRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomLeftRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomLeftRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomLeftRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomLeftRadius); } if(radiusOcc == null && styleClass != null){ @@ -875,9 +875,9 @@ public NumUnitValue getBorderBottomRightRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomRightRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomRightRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomRightRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomRightRadius); } if(radiusOcc == null && styleClass != null){ @@ -897,9 +897,9 @@ public NumUnitValue getPadding(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPadding, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPadding, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPadding); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPadding); } if(paddingOcc == null && styleClass != null){ @@ -918,9 +918,9 @@ public NumUnitValue getPaddingTop(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPaddingTop, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingTop, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPaddingTop); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingTop); } if(paddingOcc == null){ @@ -937,9 +937,9 @@ public NumUnitValue getPaddingRight(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPaddingRight, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingRight, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPaddingRight); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingRight); } if(paddingOcc == null){ @@ -956,9 +956,9 @@ public NumUnitValue getPaddingBottom(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPaddingBottom, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingBottom, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPaddingBottom); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingBottom); } if(paddingOcc == null){ @@ -975,9 +975,9 @@ public NumUnitValue getPaddingLeft(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPaddingLeft, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingLeft, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPaddingLeft); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPaddingLeft); } if(paddingOcc == null){ @@ -995,9 +995,9 @@ public AutoNumUnitValue getWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlWidth); } if(widthOcc == null && styleClass != null){ @@ -1017,9 +1017,9 @@ public AutoNumUnitValue getMinWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMinWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMinWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMinWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMinWidth); } if(widthOcc == null && styleClass != null){ @@ -1039,9 +1039,9 @@ public AutoNumUnitValue getMaxWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMaxWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMaxWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMaxWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMaxWidth); } if(widthOcc == null && styleClass != null){ @@ -1061,9 +1061,9 @@ public AutoNumUnitValue getHeight(String styleClass) throws InvalidGdlSchemaException { Occurrence heightOcc = null; if(styleClass != null){ - heightOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlHeight, styleClass); + heightOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlHeight, styleClass); } else { - heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlHeight); + heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlHeight); } if(heightOcc == null && styleClass != null){ @@ -1083,9 +1083,9 @@ public AutoNumUnitValue getMinHeight(String styleClass) throws InvalidGdlSchemaException { Occurrence heightOcc = null; if(styleClass != null){ - heightOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMinHeight, styleClass); + heightOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMinHeight, styleClass); } else { - heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMinHeight); + heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMinHeight); } if(heightOcc == null && styleClass != null){ @@ -1105,9 +1105,9 @@ public AutoNumUnitValue getMaxHeight(String styleClass) throws InvalidGdlSchemaException { Occurrence heightOcc = null; if(styleClass != null){ - heightOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlMaxHeight, styleClass); + heightOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlMaxHeight, styleClass); } else { - heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMaxHeight); + heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMaxHeight); } if(heightOcc == null && styleClass != null){ @@ -1127,9 +1127,9 @@ public CursorValue getCursor(String styleClass) throws InvalidGdlSchemaException { Occurrence cursorOcc = null; if(styleClass != null){ - cursorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlCursor, styleClass); + cursorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor, styleClass); } else { - cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlCursor); + cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor); } if(cursorOcc == null && styleClass != null){ @@ -1156,9 +1156,9 @@ public ColorValue getBackgroundColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBackgroundColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBackgroundColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBackgroundColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBackgroundColor); } if(colorOcc == null && styleClass != null){ @@ -1464,14 +1464,14 @@ if(styleClass == null){ DOM.setStyleAttribute(this.getElement(), cssProperty, cssValue); - } else if(styleClass.equals(PSIs.Scope.gdlActive)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlActive)){ this.activeCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if(styleClass.equals(PSIs.Scope.gdlFocus)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlFocus)){ this.focusCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if (styleClass.equals(PSIs.Scope.gdlHover)){ + } else if (styleClass.equals(PSIs.GDL.Scope.gdlHover)){ this.hoverCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); } else { - String values = PSIs.Scope.gdlActive + ", " + PSIs.Scope.gdlFocus + ", " + PSIs.Scope.gdlHover; + String values = PSIs.GDL.Scope.gdlActive + ", " + PSIs.GDL.Scope.gdlFocus + ", " + PSIs.GDL.Scope.gdlHover; throw new InvalidGdlSchemaException("GDL defines only the style classes " + values + ", but found " + styleClass); } } @@ -1483,14 +1483,14 @@ if(styleClass == null){ DOM.setStyleAttribute(elem.getElement(), cssProperty, cssValue); - } else if(styleClass.equals(PSIs.Scope.gdlActive)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlActive)){ this.activeCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if(styleClass.equals(PSIs.Scope.gdlFocus)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlFocus)){ this.focusCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if (styleClass.equals(PSIs.Scope.gdlHover)){ + } else if (styleClass.equals(PSIs.GDL.Scope.gdlHover)){ this.hoverCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); } else { - String values = PSIs.Scope.gdlActive + ", " + PSIs.Scope.gdlFocus + ", " + PSIs.Scope.gdlHover; + String values = PSIs.GDL.Scope.gdlActive + ", " + PSIs.GDL.Scope.gdlFocus + ", " + PSIs.GDL.Scope.gdlHover; throw new InvalidGdlSchemaException("GDL defines only the style classes " + values + ", but found " + styleClass); } } @@ -1502,14 +1502,14 @@ if(styleClass == null){ DOM.setStyleAttribute(elem, cssProperty, cssValue); - } else if(styleClass.equals(PSIs.Scope.gdlActive)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlActive)){ this.activeCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if(styleClass.equals(PSIs.Scope.gdlFocus)){ + } else if(styleClass.equals(PSIs.GDL.Scope.gdlFocus)){ this.focusCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); - } else if (styleClass.equals(PSIs.Scope.gdlHover)){ + } else if (styleClass.equals(PSIs.GDL.Scope.gdlHover)){ this.hoverCssNamesAndStyles.add(new Pair<String, String>(cssProperty, cssValue)); } else { - String values = PSIs.Scope.gdlActive + ", " + PSIs.Scope.gdlFocus + ", " + PSIs.Scope.gdlHover; + String values = PSIs.GDL.Scope.gdlActive + ", " + PSIs.GDL.Scope.gdlFocus + ", " + PSIs.GDL.Scope.gdlHover; throw new InvalidGdlSchemaException("GDL defines only the style classes " + values + ", but found " + styleClass); } } @@ -1517,7 +1517,7 @@ // sets all GDL styles that are defined by the topic map representative to tha passed widget public void setGdlStyle(Widget widget) throws InvalidGdlSchemaException, ExecutionException { - String[] styleClasses = new String[]{null, PSIs.Scope.gdlActive, PSIs.Scope.gdlFocus, PSIs.Scope.gdlHover}; + String[] styleClasses = new String[]{null, PSIs.GDL.Scope.gdlActive, PSIs.GDL.Scope.gdlFocus, PSIs.GDL.Scope.gdlHover}; for (String styleClass : styleClasses) { this.setVerticalAlign(widget, this.getVerticalAlign(styleClass), styleClass); Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/PSIs.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/PSIs.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/PSIs.java Wed Aug 24 08:47:02 2011 (r778) @@ -3,8 +3,6 @@ public class PSIs { - public final static String gdl = "http://psi.isidor.us/gdl/"; - // some psis of the TMDM public class TMDM{ public final static String tmdm = "http://psi.topicmaps.org/iso13250/model/"; @@ -51,204 +49,208 @@ } - // topic types - public class TopicType{ - public final static String gdlt = gdl + "types/"; - public final static String gdlSchema = gdlt + "Schema"; - public final static String gdlView = gdlt + "View"; - public final static String gdlAssociationView = gdlt + "Association-View"; - public final static String gdlCreatorAssociationview = gdlt + "Creator-Association-View"; - public final static String gdlEditorAssociationView = gdlt + "Editor-Association-View"; - public final static String gdlTopicView = gdlt + "Topic-View"; - public final static String gdlDefaultTopicView = gdlt + "Default-Topic-View"; - public final static String gdlDefaultCreatorTopicView = gdlt + "Default-Creator-Topic-View"; - public final static String gdlDefaultEditorTopicView = gdlt + "Default-Editor-Topic-View"; - public final static String gdlSpecialTopicView = gdlt + "Special-Topic-View"; - public final static String gdlSpecialCreatorTopicView = gdlt + "Special-Creator-TopicView"; - public final static String gdlSpecialEditorTopicView = gdlt + "SpecialEditorTopicView"; - public final static String gdlVisibleObject = gdlt + "Visible-Object"; - public final static String gdlStyleClass = gdlt + "Style-Class"; - public final static String gdlDescriptor = gdlt + "Descriptor"; - public final static String gdlSpace = gdlt + "Space"; - public final static String gdlList = gdlt + "List"; - public final static String gdlPosition = gdlt + "Position"; - public final static String gdlNthElement = gdlt + "Nth-Element"; - public final static String gdlValue = gdlt + "Value"; - public final static String gdlDefaultValue = gdlt + "Default-Value"; - public final static String gdlLiteralValue = gdlt + "Literal-Value"; - public final static String gdlDefaultLiteralValue = gdlt + "Default-Literal-Value"; - public final static String gdlTmValue = gdlt + "TM-Value"; - public final static String gdlTmTypeValue = gdlt + "TM-Type-Value"; - public final static String gdlTmSingleTypeValue = gdlt + "TM-Single-Type-Value"; - public final static String gdlTmMultipleTypeValue = gdlt + "TM-Multiple-Type-Value"; - public final static String gdlTmInstanceValue = gdlt + "TM-Instance-Value"; - public final static String gdlDefaultTmValue = gdlt + "Default-TM-Value"; - public final static String gdlDefaultTmTypeValue = gdlt + "Default-TM-Type-Value"; - public final static String gdlDefaultTmSingleTypeValue = gdlt + "Default-TM-Single-Type-Value"; - public final static String gdlDefaultTmMultipleTypeValue = gdlt + "Default-TM-Multiple-Type-Value"; - public final static String gdlDefaultTmInstanceValue = gdlt + "Default-TM-Instance-Value"; - public final static String gdlDatatype = gdlt + "Datatype"; - public final static String gdlType = gdlt + "Type"; - public final static String gdlInfo = gdlt + "Info"; - public final static String gdlVariantNameScope = gdlt + "Variant-Name-Scope"; - public final static String gdlVariantNameReifier = gdlt + "Variant-Name-Reifier"; - public final static String gdlVariantNameIdentifiers = gdlt + "Variant-Name-Identifiers"; - public final static String gdlRolePlayer = gdlt + "Role-Player"; - public final static String gdlAssociationRole = gdlt + "Association-Role"; - public final static String gdlHiddenValue = gdlt + "Hidden-Value"; - public final static String gdlValueGroup = gdlt + "Value-Group"; - public final static String gdlTextObject = gdlt + "Text-Object"; - public final static String gdlTitle = gdlt + "Title"; - public final static String gdlReference = gdlt + "Reference"; - public final static String gdlListBox = gdlt + "List-Box"; - public final static String gdlCompleData = gdlt + "Complex-Data"; - public final static String gdlImage = gdlt + "Image"; - public final static String gdlAudio = gdlt + "Audio"; - public final static String gdlVideo = gdlt + "Video"; - public final static String gdlTimePicker = gdlt + "Time-Picker"; - public final static String gdlDatePicker = gdlt + "Date-Picker"; - public final static String gdlDateTimePicker = gdlt + "Date-Time-Picker"; - public final static String gdlText = gdlt + "Text"; - public final static String gdlUnit = gdlt + "Unit"; - public final static String gdlButton = gdlt + "Button"; - public final static String gdlInputbutton = gdlt + "Input-Button"; - public final static String gdlRadioButton = gdlt + "Radio-Button"; - public final static String gdlCheckBox = gdlt + "Check-Box"; - public final static String gdlActionButton = gdlt + "Action-Button"; - public final static String gdlValidateButton = gdlt + "Validate-Button"; - public final static String gdlCreateButton = gdlt + "Create-Button"; - public final static String gdlDeleteButton = gdlt + "Delete-Button"; - public final static String gdlCommitButton = gdlt + "Commit-Button"; + // all psis of the GDL + public class GDL { + public final static String gdl = "http://psi.isidor.us/gdl/"; + + // topic types + public class TopicType{ + public final static String gdlt = gdl + "types/"; + public final static String gdlSchema = gdlt + "Schema"; + public final static String gdlView = gdlt + "View"; + public final static String gdlAssociationView = gdlt + "Association-View"; + public final static String gdlCreatorAssociationview = gdlt + "Creator-Association-View"; + public final static String gdlEditorAssociationView = gdlt + "Editor-Association-View"; + public final static String gdlTopicView = gdlt + "Topic-View"; + public final static String gdlDefaultTopicView = gdlt + "Default-Topic-View"; + public final static String gdlDefaultCreatorTopicView = gdlt + "Default-Creator-Topic-View"; + public final static String gdlDefaultEditorTopicView = gdlt + "Default-Editor-Topic-View"; + public final static String gdlSpecialTopicView = gdlt + "Special-Topic-View"; + public final static String gdlSpecialCreatorTopicView = gdlt + "Special-Creator-TopicView"; + public final static String gdlSpecialEditorTopicView = gdlt + "SpecialEditorTopicView"; + public final static String gdlVisibleObject = gdlt + "Visible-Object"; + public final static String gdlStyleClass = gdlt + "Style-Class"; + public final static String gdlDescriptor = gdlt + "Descriptor"; + public final static String gdlSpace = gdlt + "Space"; + public final static String gdlList = gdlt + "List"; + public final static String gdlPosition = gdlt + "Position"; + public final static String gdlNthElement = gdlt + "Nth-Element"; + public final static String gdlValue = gdlt + "Value"; + public final static String gdlDefaultValue = gdlt + "Default-Value"; + public final static String gdlLiteralValue = gdlt + "Literal-Value"; + public final static String gdlDefaultLiteralValue = gdlt + "Default-Literal-Value"; + public final static String gdlTmValue = gdlt + "TM-Value"; + public final static String gdlTmTypeValue = gdlt + "TM-Type-Value"; + public final static String gdlTmSingleTypeValue = gdlt + "TM-Single-Type-Value"; + public final static String gdlTmMultipleTypeValue = gdlt + "TM-Multiple-Type-Value"; + public final static String gdlTmInstanceValue = gdlt + "TM-Instance-Value"; + public final static String gdlDefaultTmValue = gdlt + "Default-TM-Value"; + public final static String gdlDefaultTmTypeValue = gdlt + "Default-TM-Type-Value"; + public final static String gdlDefaultTmSingleTypeValue = gdlt + "Default-TM-Single-Type-Value"; + public final static String gdlDefaultTmMultipleTypeValue = gdlt + "Default-TM-Multiple-Type-Value"; + public final static String gdlDefaultTmInstanceValue = gdlt + "Default-TM-Instance-Value"; + public final static String gdlDatatype = gdlt + "Datatype"; + public final static String gdlType = gdlt + "Type"; + public final static String gdlInfo = gdlt + "Info"; + public final static String gdlVariantNameScope = gdlt + "Variant-Name-Scope"; + public final static String gdlVariantNameReifier = gdlt + "Variant-Name-Reifier"; + public final static String gdlVariantNameIdentifiers = gdlt + "Variant-Name-Identifiers"; + public final static String gdlRolePlayer = gdlt + "Role-Player"; + public final static String gdlAssociationRole = gdlt + "Association-Role"; + public final static String gdlHiddenValue = gdlt + "Hidden-Value"; + public final static String gdlValueGroup = gdlt + "Value-Group"; + public final static String gdlTextObject = gdlt + "Text-Object"; + public final static String gdlTitle = gdlt + "Title"; + public final static String gdlReference = gdlt + "Reference"; + public final static String gdlListBox = gdlt + "List-Box"; + public final static String gdlCompleData = gdlt + "Complex-Data"; + public final static String gdlImage = gdlt + "Image"; + public final static String gdlAudio = gdlt + "Audio"; + public final static String gdlVideo = gdlt + "Video"; + public final static String gdlTimePicker = gdlt + "Time-Picker"; + public final static String gdlDatePicker = gdlt + "Date-Picker"; + public final static String gdlDateTimePicker = gdlt + "Date-Time-Picker"; + public final static String gdlText = gdlt + "Text"; + public final static String gdlUnit = gdlt + "Unit"; + public final static String gdlButton = gdlt + "Button"; + public final static String gdlInputbutton = gdlt + "Input-Button"; + public final static String gdlRadioButton = gdlt + "Radio-Button"; + public final static String gdlCheckBox = gdlt + "Check-Box"; + public final static String gdlActionButton = gdlt + "Action-Button"; + public final static String gdlValidateButton = gdlt + "Validate-Button"; + public final static String gdlCreateButton = gdlt + "Create-Button"; + public final static String gdlDeleteButton = gdlt + "Delete-Button"; + public final static String gdlCommitButton = gdlt + "Commit-Button"; + } + + + // name types + public class NameType{ + public final static String gdlViewName = gdl + "view-name"; + public final static String gdlSchemaName = gdl + "schema-name"; + } + + + // occurrence types + public class OccurrenceType { + public final static String gdlVerticalAlign = gdl + "vertical-align"; + public final static String gdlDisplay = gdl + "display"; + public final static String gdlId = gdl + "id"; + public final static String gdlMargin = gdl + "margin"; + public final static String gdlMarginTop = gdl + "margin-top"; + public final static String gdlMarginRight = gdl + "margin-right"; + public final static String gdlMarginBottom = gdl + "margin-bottom"; + public final static String gdlMarginLeft = gdl + "margin-left"; + public final static String gdlBorderColor = gdl + "border-color"; + public final static String gdlBorderTopColor = gdl + "border-top-color"; + public final static String gdlBorderRightColor = gdl + "border-right-color"; + public final static String gdlBorderBottomColor = gdl + "border-bottom-color"; + public final static String gdlBorderLeftColor = gdl + "border-left-color"; + public final static String gdlBorderStyle = gdl + "border-style"; + public final static String gdlBorderTopStyle = gdl + "border-top-style"; + public final static String gdlBorderRightStyle = gdl + "border-right-style"; + public final static String gdlBorderBottomStyle = gdl + "border-bottom-style"; + public final static String gdlBorderLeftStyle = gdl + "border-left-style"; + public final static String gdlBorderWidth = gdl + "border-width"; + public final static String gdlBorderTopWidth = gdl + "border-top-width"; + public final static String gdlBorderRightWidth = gdl + "border-right-width"; + public final static String gdlBorderBottomWidth = gdl + "border-bottom-width"; + public final static String gdlBorderLeftWidth = gdl + "border-left-width"; + public final static String gdlBorderRadius = gdl + "border-radius"; + public final static String gdlBorderTopRightRadius = gdl + "border-top-right-radius"; + public final static String gdlBorderBottomRightRadius = gdl + "border-bottom-right-radius"; + public final static String gdlBorderBottomLeftRadius = gdl + "border-bottom-left-radius"; + public final static String gdlBorderTopLeftRadius = gdl + "border-top-left-radius"; + public final static String gdlCursor = gdl + "cursor"; + public final static String gdlZindex = gdl + "z-index"; + public final static String gdlWidth = gdl + "width"; + public final static String gdlMinWidth = gdl + "min-width"; + public final static String gdlMaxWidth = gdl + "max-width"; + public final static String gdlHeight = gdl + "height"; + public final static String gdlMinHeight = gdl + "min-height"; + public final static String gdlMaxHeight = gdl + "max-height"; + public final static String gdlPadding = gdl + "padding"; + public final static String gdlPaddingTop = gdl + "padding-top"; + public final static String gdlPaddingRight = gdl + "padding-right"; + public final static String gdlPaddingBottom = gdl + "padding-bottom"; + public final static String gdlPaddingLeft = gdl + "padding-left"; + public final static String gdlClear = gdl + "clear"; + public final static String gdlFloat = gdl + "float"; + public final static String gdlBackgroundColor = gdl + "background-color"; + public final static String gdlOrdered = gdl + "ordered"; + public final static String gdlListStyleType = gdl + "list-style-type"; + public final static String gdlListStylePosition = gdl + "list-style-position"; + public final static String gdlPositionStyle = gdl + "position-style"; + public final static String gdlNthValue = gdl + "nth-value"; + public final static String gdlTop = gdl + "top"; + public final static String gdlRight = gdl + "right"; + public final static String gdlBottom = gdl + "bottom"; + public final static String gdlLeft = gdl + "left"; + public final static String gdlFixed = gdl + "fixed"; + public final static String gdlLiteralValue = gdl + "literal-value"; + public final static String gdlDirection = gdl + "direction"; + public final static String gdlTextAlign = gdl + "text-align"; + public final static String gdlLineHeight = gdl + "line-height"; + public final static String gdlTextDecoration = gdl + "text-decoration"; + public final static String gdlColor = gdl + "color"; + public final static String gdlFontfamily = gdl + "font-family"; + public final static String gdlFontStyle = gdl + "font-style"; + public final static String gdlFontSize = gdl + "font-size"; + public final static String gdlFontWeight = gdl + "font-weight"; + public final static String gdlLetterSpacing = gdl + "letter-spacing"; + public final static String gdlWordSpacing = gdl + "word-spacing"; + public final static String gdlMultiple = gdl + "multiple"; + public final static String gdlSize = gdl + "size"; + public final static String gdlOnePerGroup = gdl + "one-per-group"; + public final static String gdlTextType = gdl + "text-type"; + public final static String gdlReadonly = gdl + "readonly"; + public final static String gdlRows = gdl + "rows"; + public final static String gdlCols = gdl + "cols"; + public final static String gdlResize = gdl + "resize"; + public final static String gdlTitleOrder = gdl + "title-order"; + public final static String gdlUnitName = gdl + "unit-name"; + public final static String gdlContentOrientation = gdl + "content-orientation"; + } + + + // association types + public class AssociationType { + public final static String gdlContains = gdl + "contains"; + public final static String gdlPosition = gdl + "position"; + public final static String gdlNthPosition = gdl + "nth-position"; + public final static String gdlButtonPosition = gdl + "button-position"; + public final static String gdlTmBinding = gdl + "tm-binding"; + public final static String gdlViewBinding = gdl + "view-binding"; + public final static String gdlTopicViewBinding = gdl + "topic-view-binding"; + public final static String gdlAssociationViewBinding = gdl + "association-view-binding"; + public final static String gdlValueBinding = gdl + "value-binding"; + public final static String gdlDisplayBy = gdl + "display-by"; + public final static String gdlPrefferedScope = gdl + "preferred-scope"; + } + + + // role types + public class RoleType { + public final static String gdlContainer = gdl + "container"; + public final static String gdlContainee = gdl + "containee"; + public final static String gdlTmConstruct = gdl + "tm-construct"; + public final static String gdlDescriptor = gdl + "descriptor"; + public final static String gdlDescendant = gdl + "descendant"; + public final static String gdlAncestor = gdl + "ancestor"; + public final static String gdlNthElement = gdl + "nth-element"; + public final static String gdlHiddenValue = gdl + "hidden-value"; + public final static String gdlValueGroup = gdl + "value-group"; + public final static String gdlTmValue = gdl + "tm-value"; + public final static String gdlActionButton = gdl + "action-button"; + public final static String gdlValue = gdl + "value"; + } + + + // themes (topic instances) + public class Scope { + public final static String gdlHover = gdl + "hover"; + public final static String gdlFocus = gdl + "focus"; + public final static String gdlActive = gdl + "active"; + } } - - - // name types - public class NameType{ - public final static String gdlViewName = gdl + "view-name"; - public final static String gdlSchemaName = gdl + "schema-name"; - } - - - // occurrence types - public class OccurrenceType { - public final static String gdlVerticalAlign = gdl + "vertical-align"; - public final static String gdlDisplay = gdl + "display"; - public final static String gdlId = gdl + "id"; - public final static String gdlMargin = gdl + "margin"; - public final static String gdlMarginTop = gdl + "margin-top"; - public final static String gdlMarginRight = gdl + "margin-right"; - public final static String gdlMarginBottom = gdl + "margin-bottom"; - public final static String gdlMarginLeft = gdl + "margin-left"; - public final static String gdlBorderColor = gdl + "border-color"; - public final static String gdlBorderTopColor = gdl + "border-top-color"; - public final static String gdlBorderRightColor = gdl + "border-right-color"; - public final static String gdlBorderBottomColor = gdl + "border-bottom-color"; - public final static String gdlBorderLeftColor = gdl + "border-left-color"; - public final static String gdlBorderStyle = gdl + "border-style"; - public final static String gdlBorderTopStyle = gdl + "border-top-style"; - public final static String gdlBorderRightStyle = gdl + "border-right-style"; - public final static String gdlBorderBottomStyle = gdl + "border-bottom-style"; - public final static String gdlBorderLeftStyle = gdl + "border-left-style"; - public final static String gdlBorderWidth = gdl + "border-width"; - public final static String gdlBorderTopWidth = gdl + "border-top-width"; - public final static String gdlBorderRightWidth = gdl + "border-right-width"; - public final static String gdlBorderBottomWidth = gdl + "border-bottom-width"; - public final static String gdlBorderLeftWidth = gdl + "border-left-width"; - public final static String gdlBorderRadius = gdl + "border-radius"; - public final static String gdlBorderTopRightRadius = gdl + "border-top-right-radius"; - public final static String gdlBorderBottomRightRadius = gdl + "border-bottom-right-radius"; - public final static String gdlBorderBottomLeftRadius = gdl + "border-bottom-left-radius"; - public final static String gdlBorderTopLeftRadius = gdl + "border-top-left-radius"; - public final static String gdlCursor = gdl + "cursor"; - public final static String gdlZindex = gdl + "z-index"; - public final static String gdlWidth = gdl + "width"; - public final static String gdlMinWidth = gdl + "min-width"; - public final static String gdlMaxWidth = gdl + "max-width"; - public final static String gdlHeight = gdl + "height"; - public final static String gdlMinHeight = gdl + "min-height"; - public final static String gdlMaxHeight = gdl + "max-height"; - public final static String gdlPadding = gdl + "padding"; - public final static String gdlPaddingTop = gdl + "padding-top"; - public final static String gdlPaddingRight = gdl + "padding-right"; - public final static String gdlPaddingBottom = gdl + "padding-bottom"; - public final static String gdlPaddingLeft = gdl + "padding-left"; - public final static String gdlClear = gdl + "clear"; - public final static String gdlFloat = gdl + "float"; - public final static String gdlBackgroundColor = gdl + "background-color"; - public final static String gdlOrdered = gdl + "ordered"; - public final static String gdlListStyleType = gdl + "list-style-type"; - public final static String gdlListStylePosition = gdl + "list-style-position"; - public final static String gdlPositionStyle = gdl + "position-style"; - public final static String gdlNthValue = gdl + "nth-value"; - public final static String gdlTop = gdl + "top"; - public final static String gdlRight = gdl + "right"; - public final static String gdlBottom = gdl + "bottom"; - public final static String gdlLeft = gdl + "left"; - public final static String gdlFixed = gdl + "fixed"; - public final static String gdlLiteralValue = gdl + "literal-value"; - public final static String gdlDirection = gdl + "direction"; - public final static String gdlTextAlign = gdl + "text-align"; - public final static String gdlLineHeight = gdl + "line-height"; - public final static String gdlTextDecoration = gdl + "text-decoration"; - public final static String gdlColor = gdl + "color"; - public final static String gdlFontfamily = gdl + "font-family"; - public final static String gdlFontStyle = gdl + "font-style"; - public final static String gdlFontSize = gdl + "font-size"; - public final static String gdlFontWeight = gdl + "font-weight"; - public final static String gdlLetterSpacing = gdl + "letter-spacing"; - public final static String gdlWordSpacing = gdl + "word-spacing"; - public final static String gdlMultiple = gdl + "multiple"; - public final static String gdlSize = gdl + "size"; - public final static String gdlOnePerGroup = gdl + "one-per-group"; - public final static String gdlTextType = gdl + "text-type"; - public final static String gdlReadonly = gdl + "readonly"; - public final static String gdlRows = gdl + "rows"; - public final static String gdlCols = gdl + "cols"; - public final static String gdlResize = gdl + "resize"; - public final static String gdlTitleOrder = gdl + "title-order"; - public final static String gdlUnitName = gdl + "unit-name"; - public final static String gdlContentOrientation = gdl + "content-orientation"; - } - - - // association types - public class AssociationType { - public final static String gdlContains = gdl + "contains"; - public final static String gdlPosition = gdl + "position"; - public final static String gdlNthPosition = gdl + "nth-position"; - public final static String gdlButtonPosition = gdl + "button-position"; - public final static String gdlTmBinding = gdl + "tm-binding"; - public final static String gdlViewBinding = gdl + "view-binding"; - public final static String gdlTopicViewBinding = gdl + "topic-view-binding"; - public final static String gdlAssociationViewBinding = gdl + "association-view-binding"; - public final static String gdlValueBinding = gdl + "value-binding"; - public final static String gdlDisplayBy = gdl + "display-by"; - public final static String gdlPrefferedScope = gdl + "preferred-scope"; - } - - - // role types - public class RoleType { - public final static String gdlContainer = gdl + "container"; - public final static String gdlContainee = gdl + "containee"; - public final static String gdlTmConstruct = gdl + "tm-construct"; - public final static String gdlDescriptor = gdl + "descriptor"; - public final static String gdlDescendant = gdl + "descendant"; - public final static String gdlAncestor = gdl + "ancestor"; - public final static String gdlNthElement = gdl + "nth-element"; - public final static String gdlHiddenValue = gdl + "hidden-value"; - public final static String gdlValueGroup = gdl + "value-group"; - public final static String gdlTmValue = gdl + "tm-value"; - public final static String gdlActionButton = gdl + "action-button"; - public final static String gdlValue = gdl + "value"; - } - - - // themes (topic instances) - public class Scope { - public final static String gdlHover = gdl + "hover"; - public final static String gdlFocus = gdl + "focus"; - public final static String gdlActive = gdl + "active"; - } - } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java Wed Aug 24 08:47:02 2011 (r778) @@ -314,10 +314,10 @@ public static ArrayList<Topic> topicContains(Topic container) { if(container == null) return new ArrayList<Topic>(); TopicMap tm = container.getTopicMap(); - Topic containsAssocType = getTopicByPsi(PSIs.AssociationType.gdlContains, tm); - Topic containerRoleType = getTopicByPsi(PSIs.RoleType.gdlContainer, tm); - Topic visibleObject = getTopicByPsi(PSIs.TopicType.gdlVisibleObject, tm); - Topic containeeRoleType = getTopicByPsi(PSIs.RoleType.gdlContainee, tm); + Topic containsAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlContains, tm); + Topic containerRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainer, tm); + Topic visibleObject = getTopicByPsi(PSIs.GDL.TopicType.gdlVisibleObject, tm); + Topic containeeRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainee, tm); return getOtherPlayerOfBinaryAssociation(container, containerRoleType, containsAssocType, null, visibleObject, containeeRoleType); } @@ -327,10 +327,10 @@ public static ArrayList<Topic> topicContainsInfo(Topic container) { if(container == null) return new ArrayList<Topic>(); TopicMap tm = container.getTopicMap(); - Topic containsAssocType = getTopicByPsi(PSIs.AssociationType.gdlContains, tm); - Topic containerRoleType = getTopicByPsi(PSIs.RoleType.gdlContainer, tm); - Topic info = getTopicByPsi(PSIs.TopicType.gdlInfo, tm); - Topic containeeRoleType = getTopicByPsi(PSIs.RoleType.gdlContainee, tm); + Topic containsAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlContains, tm); + Topic containerRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainer, tm); + Topic info = getTopicByPsi(PSIs.GDL.TopicType.gdlInfo, tm); + Topic containeeRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainee, tm); return getOtherPlayerOfBinaryAssociation(container, containerRoleType, containsAssocType, null, info, containeeRoleType); } @@ -347,27 +347,27 @@ if(container == null) return result; TopicMap tm = container.getTopicMap(); - Topic containsAssocType = getTopicByPsi(PSIs.AssociationType.gdlContains, tm); - Topic containerRoleType = getTopicByPsi(PSIs.RoleType.gdlContainer, tm); - Topic actionButtonType = getTopicByPsi(PSIs.TopicType.gdlActionButton, tm); - Topic containeeRoleType = getTopicByPsi(PSIs.RoleType.gdlContainee, tm); + Topic containsAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlContains, tm); + Topic containerRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainer, tm); + Topic actionButtonType = getTopicByPsi(PSIs.GDL.TopicType.gdlActionButton, tm); + Topic containeeRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainee, tm); ArrayList<Topic> actionButtons = getOtherPlayerOfBinaryAssociation(container, containerRoleType, containsAssocType, null, actionButtonType, containeeRoleType); - Topic actionButtonRoleType = getTopicByPsi(PSIs.RoleType.gdlActionButton, tm); - Topic buttonPosition = getTopicByPsi(PSIs.AssociationType.gdlButtonPosition, tm); - Topic nthElementType = getTopicByPsi(PSIs.TopicType.gdlNthElement, tm); - Topic nthElementRoleType = getTopicByPsi(PSIs.RoleType.gdlNthElement, tm); - Topic nthValueOccType = getTopicByPsi(PSIs.OccurrenceType.gdlNthValue, tm); + Topic actionButtonRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlActionButton, tm); + Topic buttonPosition = getTopicByPsi(PSIs.GDL.AssociationType.gdlButtonPosition, tm); + Topic nthElementType = getTopicByPsi(PSIs.GDL.TopicType.gdlNthElement, tm); + Topic nthElementRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlNthElement, tm); + Topic nthValueOccType = getTopicByPsi(PSIs.GDL.OccurrenceType.gdlNthValue, tm); ArrayList<Pair<Topic, Topic>> rolePlayertypesAndTypes = new ArrayList<Pair<Topic,Topic>>(); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(nthElementType, nthElementRoleType)); for (Topic actionButton : actionButtons) { ArrayList<Association> assocs = getAssociationsOfTopic(actionButton, actionButtonRoleType, buttonPosition, null, rolePlayertypesAndTypes); if(assocs.size() == 0) continue; - if(assocs.size() > 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(actionButton) + " must be bound none or once to a " + PSIs.AssociationType.gdlButtonPosition + " association, but is: " + assocs.size()); + if(assocs.size() > 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(actionButton) + " must be bound none or once to a " + PSIs.GDL.AssociationType.gdlButtonPosition + " association, but is: " + assocs.size()); if(assocs.size() == 1) { Topic nthElem = assocs.get(0).getRoles(nthElementRoleType).get(0).getPlayer(); JsArray<Occurrence> occs = nthElem.getOccurrences(nthValueOccType); - if(occs.length() != 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(nthElem) + " must be bound exactly once to a " + PSIs.OccurrenceType.gdlNthValue + " occurrence, but is: " + occs.length()); + if(occs.length() != 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(nthElem) + " must be bound exactly once to a " + PSIs.GDL.OccurrenceType.gdlNthValue + " occurrence, but is: " + occs.length()); int val = 0; try{ if(occs.get(0).getValue().toLowerCase().equals("last")){ @@ -376,7 +376,7 @@ Integer.valueOf(occs.get(0).getValue()); } }catch(NumberFormatException e){ - throw new InvalidGdlSchemaException("The topic " + getAnyIdOfTopic(nthElem) + " must contain a value of the form <positive-integer>|\"last\" in the occurrence " + PSIs.OccurrenceType.gdlNthValue + ", but it contains: " + occs.get(0).getValue()); + throw new InvalidGdlSchemaException("The topic " + getAnyIdOfTopic(nthElem) + " must contain a value of the form <positive-integer>|\"last\" in the occurrence " + PSIs.GDL.OccurrenceType.gdlNthValue + ", but it contains: " + occs.get(0).getValue()); } result.add(new Pair<Topic, Integer>(actionButton, val)); @@ -391,12 +391,12 @@ public static ArrayList<Pair<Topic, Integer>> listContains(Topic list) throws InvalidGdlSchemaException { if(list == null) return new ArrayList<Pair<Topic,Integer>>(); TopicMap tm = list.getTopicMap(); - Topic containsAssocType = getTopicByPsi(PSIs.AssociationType.gdlContains, tm); - Topic containerRoleType = getTopicByPsi(PSIs.RoleType.gdlContainer, tm); - Topic visibleObject = getTopicByPsi(PSIs.TopicType.gdlVisibleObject, tm); - Topic containeeRoleType = getTopicByPsi(PSIs.RoleType.gdlContainee, tm); - Topic nthElement = getTopicByPsi(PSIs.TopicType.gdlNthElement, tm); - Topic nthElementRoleType = getTopicByPsi(PSIs.RoleType.gdlNthElement, tm); + Topic containsAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlContains, tm); + Topic containerRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainer, tm); + Topic visibleObject = getTopicByPsi(PSIs.GDL.TopicType.gdlVisibleObject, tm); + Topic containeeRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlContainee, tm); + Topic nthElement = getTopicByPsi(PSIs.GDL.TopicType.gdlNthElement, tm); + Topic nthElementRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlNthElement, tm); ArrayList<Pair<Topic, Topic>> rolePlayertypesAndTypes = new ArrayList<Pair<Topic,Topic>>(); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(visibleObject, containeeRoleType)); @@ -406,16 +406,16 @@ List<Pair<Topic, Integer>> result = new ArrayList<Pair<Topic,Integer>>(); for (Association validAssoc : validAssociations) { Topic idx = validAssoc.getRoles(nthElementRoleType).get(0).getPlayer(); - JsArray<Occurrence> idxOccs = idx.getOccurrences(tm.getTopicBySubjectIdentifier(tm.createLocator(PSIs.OccurrenceType.gdlNthValue))); + JsArray<Occurrence> idxOccs = idx.getOccurrences(tm.getTopicBySubjectIdentifier(tm.createLocator(PSIs.GDL.OccurrenceType.gdlNthValue))); ArrayList<Occurrence> validIdxOccs = new ArrayList<Occurrence>(); for(int i = 0; i != idxOccs.length(); ++i) if(idxOccs.get(i).getScope().length() == 0) validIdxOccs.add(idxOccs.get(i)); if(validIdxOccs.size() != 1){ - throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(idx) + " must be bound exaclty once to an occurrence of the type " + PSIs.OccurrenceType.gdlNthValue + " but is bound " + validIdxOccs.size() + " times"); + throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(idx) + " must be bound exaclty once to an occurrence of the type " + PSIs.GDL.OccurrenceType.gdlNthValue + " but is bound " + validIdxOccs.size() + " times"); }else{ Occurrence validOcc = validIdxOccs.get(0); if(!validOcc.getValue().toUpperCase().equals("LAST") && !Utils.isDecNumber(validOcc.getValue())){ - throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(idx) + " must be bound exaclty once to an occurrence of the type " + PSIs.OccurrenceType.gdlNthValue + " with a the value \"last\" or <positive integer>, but is " + validOcc.getValue()); + throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(idx) + " must be bound exaclty once to an occurrence of the type " + PSIs.GDL.OccurrenceType.gdlNthValue + " with a the value \"last\" or <positive integer>, but is " + validOcc.getValue()); } int idxValue = -1; // -1 represents last @@ -457,12 +457,12 @@ if(containees == null || containees.size() == 0 || container == null) return null; TopicMap tm = containees.get(0).getTopicMap(); - Topic descendantRoleType = getTopicByPsi(PSIs.RoleType.gdlDescendant, tm); - Topic positionAssocType = getTopicByPsi(PSIs.AssociationType.gdlPosition, tm); - Topic position = getTopicByPsi(PSIs.TopicType.gdlPosition, tm); - Topic visibleObject = getTopicByPsi(PSIs.TopicType.gdlVisibleObject, tm); - Topic ancestorRoleType = getTopicByPsi(PSIs.RoleType.gdlAncestor, tm); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); + Topic descendantRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescendant, tm); + Topic positionAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlPosition, tm); + Topic position = getTopicByPsi(PSIs.GDL.TopicType.gdlPosition, tm); + Topic visibleObject = getTopicByPsi(PSIs.GDL.TopicType.gdlVisibleObject, tm); + Topic ancestorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlAncestor, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); ArrayList<Pair<Topic, Topic>> rolePlayertypesAndTypes = new ArrayList<Pair<Topic,Topic>>(); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(visibleObject, descendantRoleType)); @@ -496,12 +496,12 @@ if (current == null || containees == null || containees.size() == 0) return null; TopicMap tm = current.getTopicMap(); - Topic descendantRoleType = getTopicByPsi(PSIs.RoleType.gdlDescendant, tm); - Topic positionAssocType = getTopicByPsi(PSIs.AssociationType.gdlPosition, tm); - Topic visibleObject = getTopicByPsi(PSIs.TopicType.gdlVisibleObject, tm); - Topic ancestorRoleType = getTopicByPsi(PSIs.RoleType.gdlAncestor, tm); - Topic position = getTopicByPsi(PSIs.TopicType.gdlPosition, tm); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); + Topic descendantRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescendant, tm); + Topic positionAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlPosition, tm); + Topic visibleObject = getTopicByPsi(PSIs.GDL.TopicType.gdlVisibleObject, tm); + Topic ancestorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlAncestor, tm); + Topic position = getTopicByPsi(PSIs.GDL.TopicType.gdlPosition, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); ArrayList<Pair<Topic, Topic>> rolePlayertypesAndTypes = new ArrayList<Pair<Topic,Topic>>(); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(visibleObject, descendantRoleType)); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(position, descriptorRoleType)); @@ -534,13 +534,13 @@ // get all potential valid associations that models a position association TopicMap tm = ancestor.getTopicMap(); - Topic ancestorRoleType = getTopicByPsi(PSIs.RoleType.gdlAncestor, tm); - Topic positionAssocType = getTopicByPsi(PSIs.AssociationType.gdlPosition, tm); + Topic ancestorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlAncestor, tm); + Topic positionAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlPosition, tm); ArrayList<Pair<Topic, Topic>> rolePlayertypesAndTypes = new ArrayList<Pair<Topic,Topic>>(); - Topic descriptor = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic descendantRoleType = getTopicByPsi(PSIs.RoleType.gdlDescendant, tm); - Topic visibleObject = getTopicByPsi(PSIs.TopicType.gdlVisibleObject, tm); - Topic position = getTopicByPsi(PSIs.TopicType.gdlPosition, tm); + Topic descriptor = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic descendantRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescendant, tm); + Topic visibleObject = getTopicByPsi(PSIs.GDL.TopicType.gdlVisibleObject, tm); + Topic position = getTopicByPsi(PSIs.GDL.TopicType.gdlPosition, tm); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(position, descriptor)); rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(visibleObject, descendantRoleType)); ArrayList<Association> possiblePosAssocs = getAssociationsOfTopic(ancestor, ancestorRoleType, positionAssocType, null, rolePlayertypesAndTypes); @@ -599,10 +599,10 @@ if(visibleElement == null) throw null; TopicMap tm = visibleElement.getTopicMap(); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic viewBindingAssocType = getTopicByPsi(PSIs.AssociationType.gdlViewBinding, tm); - Topic valueGroupType = getTopicByPsi(PSIs.TopicType.gdlValueGroup, tm); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic viewBindingAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlViewBinding, tm); + Topic valueGroupType = getTopicByPsi(PSIs.GDL.TopicType.gdlValueGroup, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); ArrayList<Topic> valueGroups = getOtherPlayerOfBinaryAssociation(visibleElement, descriptorRoleType, viewBindingAssocType, null, valueGroupType, valueGroupRoleType); if(valueGroups.size() == 1) return valueGroups.get(0); @@ -616,11 +616,11 @@ if(valueGroup == null) return null; TopicMap tm = valueGroup.getTopicMap(); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); - Topic descriptorType = getTopicByPsi(PSIs.TopicType.gdlDescriptor, tm); - Topic tmBindingAssocType = getTopicByPsi(PSIs.AssociationType.gdlTmBinding, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); + Topic descriptorType = getTopicByPsi(PSIs.GDL.TopicType.gdlDescriptor, tm); + Topic tmBindingAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, tm); Topic tmclConstraintType = getTopicByPsi(PSIs.TMCL.tmclConstraint, tm); - Topic tmConstructRoleType = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic tmConstructRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); ArrayList<Topic> tmclConstraints = getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, tmBindingAssocType, null, tmclConstraintType, tmConstructRoleType); ArrayList<Topic> gdlConstraints = getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, tmBindingAssocType, null, descriptorType, tmConstructRoleType); @@ -736,9 +736,9 @@ if(viewRepresentative == null) new ArrayList<Topic>(); TopicMap tm = viewRepresentative.getTopicMap(); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic associationViewBindingAssocType = getTopicByPsi(PSIs.AssociationType.gdlAssociationViewBinding, tm); - Topic tmConstructRoleType = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic associationViewBindingAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlAssociationViewBinding, tm); + Topic tmConstructRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); Topic associationRoleConstraintType = getTopicByPsi(PSIs.TMCL.tmclAssociationRoleConstraint, tm); ArrayList<Topic> result = getOtherPlayerOfBinaryAssociation(viewRepresentative, descriptorRoleType, associationViewBindingAssocType, null, associationRoleConstraintType, tmConstructRoleType); @@ -753,9 +753,9 @@ if(viewRepresentative == null) new ArrayList<Topic>(); TopicMap tm = viewRepresentative.getTopicMap(); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic associationViewBindingAssocType = getTopicByPsi(PSIs.AssociationType.gdlAssociationViewBinding, tm); - Topic tmConstructRoleType = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic associationViewBindingAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlAssociationViewBinding, tm); + Topic tmConstructRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); Topic topicRoleConstraintType = getTopicByPsi(PSIs.TMCL.tmclTopicRoleConstraint, tm); ArrayList<Topic> result = getOtherPlayerOfBinaryAssociation(viewRepresentative, descriptorRoleType, associationViewBindingAssocType, null, topicRoleConstraintType, tmConstructRoleType); @@ -777,10 +777,10 @@ if(isInstanceOf(localCurrentConstraint, tmclConstraintType)) return localCurrentConstraint; else { // get next constraint and invoke this method recursively - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic tmBindingAssocType = getTopicByPsi(PSIs.AssociationType.gdlTmBinding, tm); - Topic tmConstructRoleType = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); - Topic gdlDescriptor = getTopicByPsi(PSIs.TopicType.gdlDescriptor, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic tmBindingAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, tm); + Topic tmConstructRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); + Topic gdlDescriptor = getTopicByPsi(PSIs.GDL.TopicType.gdlDescriptor, tm); ArrayList<Topic> nextTmclConstraints = getOtherPlayerOfBinaryAssociation(localCurrentConstraint, descriptorRoleType, tmBindingAssocType, null, tmclConstraintType, tmConstructRoleType); ArrayList<Topic> nextGdlConstraints = getOtherPlayerOfBinaryAssociation(localCurrentConstraint, descriptorRoleType, tmBindingAssocType, null, gdlDescriptor, tmConstructRoleType); @@ -800,16 +800,16 @@ if(valueGroup == null) return null; TopicMap tm = valueGroup.getTopicMap(); - Topic valueBindingAssocTopic = getTopicByPsi(PSIs.AssociationType.gdlValueBinding, tm); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); - Topic valueRoleType = getTopicByPsi(PSIs.RoleType.gdlValue, tm); - Topic defaultTmValueType = getTopicByPsi(PSIs.TopicType.gdlDefaultTmValue, tm); + Topic valueBindingAssocTopic = getTopicByPsi(PSIs.GDL.AssociationType.gdlValueBinding, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); + Topic valueRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValue, tm); + Topic defaultTmValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultTmValue, tm); ArrayList<Topic> defaultTmValues = getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, valueBindingAssocTopic, null, defaultTmValueType, valueRoleType); if(defaultTmValues.size() == 1) return defaultTmValues.get(0); else if(defaultTmValues.size() == 0) return null; - else throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(valueGroup) + " must be bound none or once to a " + PSIs.TopicType.gdlDefaultTmValue + ", but is: " + defaultTmValues.size()); + else throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(valueGroup) + " must be bound none or once to a " + PSIs.GDL.TopicType.gdlDefaultTmValue + ", but is: " + defaultTmValues.size()); } @@ -818,16 +818,16 @@ if(valueGroup == null) return null; TopicMap tm = valueGroup.getTopicMap(); - Topic valueBindingAssocTopic = getTopicByPsi(PSIs.AssociationType.gdlValueBinding, tm); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); - Topic valueRoleType = getTopicByPsi(PSIs.RoleType.gdlValue, tm); - Topic defaultLiteralValueType = getTopicByPsi(PSIs.TopicType.gdlDefaultLiteralValue, tm); + Topic valueBindingAssocTopic = getTopicByPsi(PSIs.GDL.AssociationType.gdlValueBinding, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); + Topic valueRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValue, tm); + Topic defaultLiteralValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultLiteralValue, tm); ArrayList<Topic> defaultTmValues = getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, valueBindingAssocTopic, null, defaultLiteralValueType, valueRoleType); if(defaultTmValues.size() == 1) return defaultTmValues.get(0); else if(defaultTmValues.size() == 0) return null; - else throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(valueGroup) + " must be bound none or once to a " + PSIs.TopicType.gdlDefaultLiteralValue + ", but is: " + defaultTmValues.size()); + else throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(valueGroup) + " must be bound none or once to a " + PSIs.GDL.TopicType.gdlDefaultLiteralValue + ", but is: " + defaultTmValues.size()); } @@ -837,10 +837,10 @@ if(valueGroup == null) return result; TopicMap tm = valueGroup.getTopicMap(); - Topic valueBindingAssocTopic = getTopicByPsi(PSIs.AssociationType.gdlValueBinding, tm); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); - Topic valueRoleType = getTopicByPsi(PSIs.RoleType.gdlValue, tm); - Topic tmValueType = getTopicByPsi(PSIs.TopicType.gdlTmValue, tm); + Topic valueBindingAssocTopic = getTopicByPsi(PSIs.GDL.AssociationType.gdlValueBinding, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); + Topic valueRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValue, tm); + Topic tmValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlTmValue, tm); return getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, valueBindingAssocTopic, null, tmValueType, valueRoleType); } @@ -852,10 +852,10 @@ if(valueGroup == null) return result; TopicMap tm = valueGroup.getTopicMap(); - Topic valueBindingAssocTopic = getTopicByPsi(PSIs.AssociationType.gdlValueBinding, tm); - Topic valueGroupRoleType = getTopicByPsi(PSIs.RoleType.gdlValueGroup, tm); - Topic valueRoleType = getTopicByPsi(PSIs.RoleType.gdlValue, tm); - Topic literalValueType = getTopicByPsi(PSIs.TopicType.gdlLiteralValue, tm); + Topic valueBindingAssocTopic = getTopicByPsi(PSIs.GDL.AssociationType.gdlValueBinding, tm); + Topic valueGroupRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValueGroup, tm); + Topic valueRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlValue, tm); + Topic literalValueType = getTopicByPsi(PSIs.GDL.TopicType.gdlLiteralValue, tm); return getOtherPlayerOfBinaryAssociation(valueGroup, valueGroupRoleType, valueBindingAssocTopic, null, literalValueType, valueRoleType); } @@ -866,13 +866,13 @@ ArrayList<Topic> result = new ArrayList<Topic>(); if(constraint == null || valueGroup == null) return result; - if(isInstanceOf(constraint, PSIs.TopicType.gdlType)){ + if(isInstanceOf(constraint, PSIs.GDL.TopicType.gdlType)){ return getTmValuesForTypeConstraint(constraint, valueGroup); - } else if(isInstanceOf(constraint, PSIs.TopicType.gdlVariantNameReifier)){ + } else if(isInstanceOf(constraint, PSIs.GDL.TopicType.gdlVariantNameReifier)){ return getTmValuesForVariantNameReifierConstraint(constraint); - } else if(isInstanceOf(constraint, PSIs.TopicType.gdlVariantNameScope)){ + } else if(isInstanceOf(constraint, PSIs.GDL.TopicType.gdlVariantNameScope)){ return getTmValuesForVariantNameScopeConstraint(constraint); - } else if(isInstanceOf(constraint, PSIs.TopicType.gdlRolePlayer)){ + } else if(isInstanceOf(constraint, PSIs.GDL.TopicType.gdlRolePlayer)){ return getTmValuesForRolePlayerConstraint(constraint); } else if(isInstanceOf(constraint, PSIs.TMCL.tmclReifierConstraint)){ return getTmValuesForReifierConstraint(constraint); @@ -1068,9 +1068,9 @@ if(tmValueOrValueGroup == null) return new ArrayList<Topic>(); TopicMap tm = tmValueOrValueGroup.getTopicMap(); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic preferredScopeAssocType = getTopicByPsi(PSIs.AssociationType.gdlPrefferedScope, tm); - Topic tmConstructRoleType = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic preferredScopeAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlPrefferedScope, tm); + Topic tmConstructRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); return getOtherPlayerOfBinaryAssociation(tmValueOrValueGroup, descriptorRoleType, preferredScopeAssocType, null, tmConstructRoleType); } @@ -1081,9 +1081,9 @@ if(tmValueOrvalueGroup == null) return null; TopicMap tm = tmValueOrvalueGroup.getTopicMap(); - Topic displayByAssocType = getTopicByPsi(PSIs.AssociationType.gdlDisplayBy, tm); - Topic descriptorRoleType = getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic tmConstruct = getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic displayByAssocType = getTopicByPsi(PSIs.GDL.AssociationType.gdlDisplayBy, tm); + Topic descriptorRoleType = getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic tmConstruct = getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); Topic subjectIdentifierConstraintType = getTopicByPsi(PSIs.TMCL.tmclSubjectIdentifierConstraint, tm); Topic subjectLocatorConstraintType = getTopicByPsi(PSIs.TMCL.tmclSubjectLocatorConstraint, tm); Topic itemIdentifierConstraintType = getTopicByPsi(PSIs.TMCL.tmclItemIdentifierConstraint, tm); @@ -1095,7 +1095,7 @@ ArrayList<Topic> result = Utils.union(Utils.union(Utils.union(resultPsi, resultSl), resultIi), resultName); - if(result.size() > 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(tmValueOrvalueGroup) + " must be bound none or once to a tmcl:constraint via a " + PSIs.AssociationType.gdlDisplayBy + " assciation, but is: " + result.size()); + if(result.size() > 1) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(tmValueOrvalueGroup) + " must be bound none or once to a tmcl:constraint via a " + PSIs.GDL.AssociationType.gdlDisplayBy + " assciation, but is: " + result.size()); else if(result.size() == 1) return result.get(0); else return null; } @@ -1107,7 +1107,7 @@ if(topicToRepresent == null) return null; if(displayBy == null){ - if(topicToRepresent.getSubjectIdentifiers().length() == 0) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(topicToRepresent) + " is not bound to a " + PSIs.AssociationType.gdlDisplayBy + " association and is not bound to a Subject-Identifier - but one of them must be set"); + if(topicToRepresent.getSubjectIdentifiers().length() == 0) throw new InvalidGdlSchemaException("the topic " + getAnyIdOfTopic(topicToRepresent) + " is not bound to a " + PSIs.GDL.AssociationType.gdlDisplayBy + " association and is not bound to a Subject-Identifier - but one of them must be set"); else return topicToRepresent.getSubjectIdentifiers().get(0).getReference(); } else { TopicMap tm = topicToRepresent.getTopicMap(); Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/button/GdlActionButton.java Wed Aug 24 08:47:02 2011 (r778) @@ -79,9 +79,9 @@ public TextAlignValue getTextAlign(String styleClass) throws InvalidGdlSchemaException { Occurrence textAlignOcc = null; if(styleClass != null){ - textAlignOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlTextAlign, styleClass); + textAlignOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextAlign, styleClass); } else { - textAlignOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTextAlign); + textAlignOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextAlign); } if(textAlignOcc == null && styleClass != null){ @@ -92,7 +92,7 @@ try{ return TextAlignValue.valueOf(textAlignOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTextAlign + " must be set to one of \"left\", \"right\", \"center\" or \"justify\", but is \"" + textAlignOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTextAlign + " must be set to one of \"left\", \"right\", \"center\" or \"justify\", but is \"" + textAlignOcc.getValue() + "\""); } } } @@ -105,9 +105,9 @@ public AbsoluteNumValue getBorderWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth); } if(widthOcc == null && styleClass != null){ @@ -128,9 +128,9 @@ public NumUnitValue getPadding(String styleClass) throws InvalidGdlSchemaException { Occurrence paddingOcc = null; if(styleClass != null){ - paddingOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlPadding, styleClass); + paddingOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlPadding, styleClass); } else { - paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlPadding); + paddingOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlPadding); } if(paddingOcc == null && styleClass != null){ @@ -151,9 +151,9 @@ public ColorValue getBorderColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor); } if(colorOcc == null && styleClass != null){ @@ -174,9 +174,9 @@ public BorderStyleValue getBorderStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle); } if(styleOcc == null && styleClass != null){ @@ -201,9 +201,9 @@ public CursorValue getCursor(String styleClass) throws InvalidGdlSchemaException { Occurrence cursorOcc = null; if(styleClass != null){ - cursorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlCursor, styleClass); + cursorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor, styleClass); } else { - cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlCursor); + cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor); } if(cursorOcc == null && styleClass != null){ @@ -231,9 +231,9 @@ public NumUnitValue getBorderRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius); } if(radiusOcc == null && styleClass != null){ Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlAudio.java Wed Aug 24 08:47:02 2011 (r778) @@ -9,7 +9,7 @@ public class GdlAudio extends GdlComplexData { // some constructors protected GdlAudio() throws ExecutionException { - throw new ExecutionException(PSIs.TopicType.gdlAudio + " is not implemented by anaToMia yet"); + throw new ExecutionException(PSIs.GDL.TopicType.gdlAudio + " is not implemented by anaToMia yet"); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlImage.java Wed Aug 24 08:47:02 2011 (r778) @@ -9,7 +9,7 @@ public class GdlImage extends GdlComplexData { // some constructors protected GdlImage() throws ExecutionException { - throw new ExecutionException(PSIs.TopicType.gdlImage + " is not implemented by anaToMia yet"); + throw new ExecutionException(PSIs.GDL.TopicType.gdlImage + " is not implemented by anaToMia yet"); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/complexData/GdlVideo.java Wed Aug 24 08:47:02 2011 (r778) @@ -9,7 +9,7 @@ public class GdlVideo extends GdlComplexData { // some constructors protected GdlVideo() throws ExecutionException { - throw new ExecutionException(PSIs.TopicType.gdlVideo + " is not implemented by anaToMia yet"); + throw new ExecutionException(PSIs.GDL.TopicType.gdlVideo + " is not implemented by anaToMia yet"); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlList.java Wed Aug 24 08:47:02 2011 (r778) @@ -100,7 +100,7 @@ // returns the property of a gdl:ordered occurrence, otherwise the default value if no occurrence is set public boolean getOrdered() throws InvalidGdlSchemaException{ - Occurrence orderedOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlOrdered); + Occurrence orderedOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlOrdered); if(orderedOcc != null){ String boolStr = orderedOcc.getValue().toUpperCase(); @@ -109,7 +109,7 @@ } else if(boolStr.equals("FALSE")) { return false; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlOrdered + " must be set to one of \"true\" or \"false\", but is \"" + orderedOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlOrdered + " must be set to one of \"true\" or \"false\", but is \"" + orderedOcc.getValue() + "\""); } } else { return false; @@ -119,7 +119,7 @@ // returns a ListStyleTypeValeu instance that describes this instance's list style type property public ListStyleTypeValue getListStyleType() throws InvalidGdlSchemaException { - Occurrence typeOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlListStyleType); + Occurrence typeOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlListStyleType); if(typeOcc != null){ try{ @@ -127,7 +127,7 @@ }catch(IllegalArgumentException e){ String values = "deciaml, decimal-leading-zero, lower-greek, lower-roman, armenian, georgian, upper-roman, " + "lower-alpha, upper-alpha, lower-latin, upper-latin, disc, circle, square or none"; - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlListStyleType + " must be set to one of " + values + " , but is \"" + typeOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlListStyleType + " must be set to one of " + values + " , but is \"" + typeOcc.getValue() + "\""); } } else if(this.getOrdered()){ return ListStyleTypeValue.DECIMAL; @@ -139,13 +139,13 @@ // returns a ListStylePositionValue instance that describes this instance's list style position property public ListStylePositionValue getListStylePosition() throws InvalidGdlSchemaException { - Occurrence positionOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlListStylePosition); + Occurrence positionOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlListStylePosition); if(positionOcc != null){ try{ return ListStylePositionValue.valueOf(positionOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlListStylePosition + " must be set to one of inside or outside, but is \"" + positionOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlListStylePosition + " must be set to one of inside or outside, but is \"" + positionOcc.getValue() + "\""); } } else{ return ListStylePositionValue.OUTSIDE; Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/container/GdlUnit.java Wed Aug 24 08:47:02 2011 (r778) @@ -107,7 +107,7 @@ // returns a String instance that represents the literal value of this elements name. public String getUnitName() throws InvalidGdlSchemaException { - Occurrence nameOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlUnitName); + Occurrence nameOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlUnitName); if(nameOcc == null){ return ""; @@ -131,9 +131,9 @@ public BorderStyleValue getBorderStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle); } if(styleOcc == null && styleClass != null){ @@ -205,9 +205,9 @@ } else { this.constraintTopicSet = true; TopicMap tm = this.tmRepresentative.getTopicMap(); - Topic descriptorRoleType = TmHelper.getTopicByPsi(PSIs.RoleType.gdlDescriptor, tm); - Topic tmBindingAssocType = TmHelper.getTopicByPsi(PSIs.AssociationType.gdlTmBinding, tm); - Topic tmConstructRoleType = TmHelper.getTopicByPsi(PSIs.RoleType.gdlTmConstruct, tm); + Topic descriptorRoleType = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, tm); + Topic tmBindingAssocType = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, tm); + Topic tmConstructRoleType = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, tm); Topic tmclTopicNameConstraintType = TmHelper.getTopicByPsi(PSIs.TMCL.tmclTopicNameConstraint, tm); Topic tmclVariantNameConstraintType = TmHelper.getTopicByPsi(PSIs.TMCL.tmclVariantNameConstraint, tm); Topic tmclTopicOccurrenceConstraintType = TmHelper.getTopicByPsi(PSIs.TMCL.tmclTopicOccurrenceConstraint, tm); @@ -343,7 +343,7 @@ public void onAttach(){ super.onAttach(); try{ - String[] styleClasses = new String[]{null, PSIs.Scope.gdlActive, PSIs.Scope.gdlFocus, PSIs.Scope.gdlHover}; + String[] styleClasses = new String[]{null, PSIs.GDL.Scope.gdlActive, PSIs.GDL.Scope.gdlFocus, PSIs.GDL.Scope.gdlHover}; for (String styleClass : styleClasses) { GdlUnit.this.setTextDecoration(this, GdlUnit.this.getTextDecoration(styleClass), styleClass); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/environment/GdlInstantiator.java Wed Aug 24 08:47:02 2011 (r778) @@ -49,59 +49,59 @@ public static GdlVisibleObject instantiate(Topic tmRepresentative, Construct receivedData) throws InvalidGdlSchemaException, ExecutionException{ if(!(receivedData instanceof Topic) && !(receivedData instanceof Association) && !(receivedData instanceof Name) && !(receivedData instanceof Variant) && !(receivedData instanceof Occurrence) && !(receivedData instanceof Role) && receivedData != null) throw new ExecutionException("receivedData must be either a Topic, Association, Topic-Name, Name-Variant, Topic-Occurrence or Association-Role, but is: " + receivedData.getClass()); - if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlSpace)){ + if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpace)){ return new GdlSpace(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlTitle)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlTitle)){ return new GdlTitle(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlInfo)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlInfo)){ return new GdlInfo(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlReference)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlReference)){ return new GdlReference(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlRadioButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlRadioButton)){ return new GdlRadioButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlCheckBox)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCheckBox)){ return new GdlCheckBox(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlValidateButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlValidateButton)){ return new GdlValidateButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlCreateButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCreateButton)){ return new GdlCreateButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlDeleteButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDeleteButton)){ return new GdlDeleteButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlCommitButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCommitButton)){ return new GdlCommitButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlActionButton)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlActionButton)){ return new GdlActionButton(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlImage)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlImage)){ return new GdlImage(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlVideo)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlVideo)){ return new GdlVideo(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlAudio)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlAudio)){ return new GdlAudio(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlDatePicker)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDatePicker)){ return new GdlDatePicker(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlTimePicker)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlTimePicker)){ return new GdlTimePicker(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlDateTimePicker)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDateTimePicker)){ return new GdlDateTimePicker(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlUnit)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlUnit)){ return new GdlUnit(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlText)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlText)){ return new GdlText(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlList)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlList)){ return new GdlList(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlListBox)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlListBox)){ return new GdlListBox(tmRepresentative, receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlDefaultCreatorTopicView)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDefaultCreatorTopicView)){ return new GdlDefaultCreatorTopicView(tmRepresentative); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlDefaultEditorTopicView)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlDefaultEditorTopicView)){ return new GdlDefaultEditorTopicView(tmRepresentative, (Topic)receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlSpecialCreatorTopicView)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpecialCreatorTopicView)){ return new GdlSpecialCreatorTopicView(tmRepresentative); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlSpecialEditorTopicView)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlSpecialEditorTopicView)){ return new GdlSpecialEditorTopicView(tmRepresentative, (Topic)receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlCreatorAssociationview)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlCreatorAssociationview)){ return new GdlCreatorAssociationView(tmRepresentative, (Association)receivedData); - }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.TopicType.gdlEditorAssociationView)){ + }else if(TmHelper.isInstanceOf(tmRepresentative, PSIs.GDL.TopicType.gdlEditorAssociationView)){ return new GdlEditorAssociationView(tmRepresentative, (Association)receivedData); }else{ String values = ""; @@ -119,7 +119,7 @@ // returns a GdlDefaultCreatorTopicView that corresponds to the passed arguments public static GdlDefaultCreatorTopicView instantiateDefaultCreatorTopicView(ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopics, TopicMap schemaTm) throws InvalidGdlSchemaException, ExecutionException{ - ArrayList<Topic> views = getViewTopics(requestedTopics, TmHelper.getTopicByPsi(PSIs.TopicType.gdlDefaultCreatorTopicView, schemaTm), schemaTm); + ArrayList<Topic> views = getViewTopics(requestedTopics, TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultCreatorTopicView, schemaTm), schemaTm); if(views.size() != 1){ String values = ""; @@ -131,7 +131,7 @@ bindings += ", " + TmHelper.getAnyIdOfTopic(top); if(bindings.length() >= 2)bindings = bindings.substring(2); else bindings = "[]"; - throw new InvalidGdlSchemaException("the combination of topics requested (" + values + ") must be bound exactly once to a " + PSIs.TopicType.gdlDefaultCreatorTopicView + " but is bound to " + bindings); + throw new InvalidGdlSchemaException("the combination of topics requested (" + values + ") must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultCreatorTopicView + " but is bound to " + bindings); } return new GdlDefaultCreatorTopicView(views.get(0)); @@ -154,11 +154,11 @@ // get all TM-Values, i.e. TM-Multiple-Type-Value and TM-Single-Type-Value (only if requstedTops.sie() == 1) ArrayList<Topic> tmValues = new ArrayList<Topic>(); - Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.RoleType.gdlTmConstruct, schemaTm); - Topic tmBinding = TmHelper.getTopicByPsi(PSIs.AssociationType.gdlTmBinding, schemaTm); - Topic descriptor = TmHelper.getTopicByPsi(PSIs.RoleType.gdlDescriptor, schemaTm); - Topic tmMultipleTypeValue = TmHelper.getTopicByPsi(PSIs.TopicType.gdlTmMultipleTypeValue, schemaTm); - Topic tmSingleTypeValue = TmHelper.getTopicByPsi(PSIs.TopicType.gdlTmSingleTypeValue, schemaTm); + Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, schemaTm); + Topic tmBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, schemaTm); + Topic descriptor = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, schemaTm); + Topic tmMultipleTypeValue = TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlTmMultipleTypeValue, schemaTm); + Topic tmSingleTypeValue = TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlTmSingleTypeValue, schemaTm); for (Topic requestedTopic : requestedTops) { ArrayList<Topic> allTmValues = TmHelper.getOtherPlayerOfBinaryAssociation(requestedTopic, tmConstruct, tmBinding, null, descriptor); // filter only the valid tm-values for this scenario @@ -175,8 +175,8 @@ // get all views that are bound to the found tm-values ArrayList<Topic> views = new ArrayList<Topic>(); - Topic tmValueRoleType = TmHelper.getTopicByPsi(PSIs.RoleType.gdlTmValue, schemaTm); - Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.AssociationType.gdlTopicViewBinding, schemaTm); + Topic tmValueRoleType = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmValue, schemaTm); + Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTopicViewBinding, schemaTm); for (Topic tmValue : tmValues) { ArrayList<Topic> allViews = TmHelper.getOtherPlayerOfBinaryAssociation(tmValue, tmValueRoleType, topicViewBinding, null, viewSupertype, descriptor); for (Topic view : allViews) @@ -197,15 +197,15 @@ if(requestedTop == null) throw new InvalidGdlSchemaException("the topic " + requestedTopic.getFirst() + " was not found!"); // get all tm-instance-value topics bound to the requested topic - Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.RoleType.gdlTmConstruct, schemaTm); - Topic tmBinding = TmHelper.getTopicByPsi(PSIs.AssociationType.gdlTmBinding, schemaTm); - Topic descriptor = TmHelper.getTopicByPsi(PSIs.RoleType.gdlDescriptor, schemaTm); + Topic tmConstruct = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmConstruct, schemaTm); + Topic tmBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTmBinding, schemaTm); + Topic descriptor = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlDescriptor, schemaTm); ArrayList<Topic> tmInstanceValues = TmHelper.getOtherPlayerOfBinaryAssociation(requestedTop, tmConstruct, tmBinding, null, descriptor); // get all views bound to the found tm-instance-values - Topic defaultEditorTopicView = TmHelper.getTopicByPsi(PSIs.TopicType.gdlDefaultEditorTopicView, schemaTm); - Topic tmValue = TmHelper.getTopicByPsi(PSIs.RoleType.gdlTmValue, schemaTm); - Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.AssociationType.gdlTopicViewBinding, schemaTm); + Topic defaultEditorTopicView = TmHelper.getTopicByPsi(PSIs.GDL.TopicType.gdlDefaultEditorTopicView, schemaTm); + Topic tmValue = TmHelper.getTopicByPsi(PSIs.GDL.RoleType.gdlTmValue, schemaTm); + Topic topicViewBinding = TmHelper.getTopicByPsi(PSIs.GDL.AssociationType.gdlTopicViewBinding, schemaTm); ArrayList<Topic> views = new ArrayList<Topic>(); for (Topic tmInstanceValue : tmInstanceValues) { ArrayList<Topic> tmpViews = TmHelper.getOtherPlayerOfBinaryAssociation(tmInstanceValue, tmValue, topicViewBinding, null, defaultEditorTopicView, descriptor); @@ -219,7 +219,7 @@ for (Topic top : views) bindings += ", " + TmHelper.getAnyIdOfTopic(top); if(bindings.length() >= 2)bindings = bindings.substring(2); - throw new InvalidGdlSchemaException("the topic " + requestedTopic.getFirst() + " requested for editing must be bound to exaclty one " + PSIs.TopicType.gdlDefaultEditorTopicView + ", but is bound to " + bindings); + throw new InvalidGdlSchemaException("the topic " + requestedTopic.getFirst() + " requested for editing must be bound to exaclty one " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + ", but is bound to " + bindings); }else { ArrayList<Pair<String, TopicIdentifierTypes>> typesOfRequestedTopic = new ArrayList<Pair<String,TopicIdentifierTypes>>(); for(int i = 0; i != requestedTop.getTypes().length(); ++i) @@ -237,7 +237,7 @@ bindings += ", " + TmHelper.getAnyIdOfTopic(top); if(bindings.length() >= 2)bindings = bindings.substring(2) + "]"; else bindings = "[ ]"; - throw new InvalidGdlSchemaException("the combination of topic types (" + values + ") for the requested topic " + requestedTopic.getFirst() + " must be bound exactly once to a " + PSIs.TopicType.gdlDefaultEditorTopicView + " but is bound to " + bindings); + throw new InvalidGdlSchemaException("the combination of topic types (" + values + ") for the requested topic " + requestedTopic.getFirst() + " must be bound exactly once to a " + PSIs.GDL.TopicType.gdlDefaultEditorTopicView + " but is bound to " + bindings); } return new GdlDefaultEditorTopicView(views.get(0), requestedTop); Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlListBox.java Wed Aug 24 08:47:02 2011 (r778) @@ -68,7 +68,7 @@ // returns the gdl:multiple property - if no value is set the default value is returned public boolean getMultiple() throws InvalidGdlSchemaException { - Occurrence multipleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlMultiple); + Occurrence multipleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlMultiple); if(multipleOcc != null){ String boolStr = multipleOcc.getValue().toUpperCase(); @@ -77,7 +77,7 @@ } else if(boolStr.equals("FALSE")) { return false; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlMargin + " must be set to one of \"true\" or \"false\", but is \"" + multipleOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlMargin + " must be set to one of \"true\" or \"false\", but is \"" + multipleOcc.getValue() + "\""); } } else { return false; @@ -87,7 +87,7 @@ // returns the gdl:one-per-group property - if no value is set the default value is returned public boolean getOnePerGroup() throws InvalidGdlSchemaException { - Occurrence onePerGroupOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlOnePerGroup); + Occurrence onePerGroupOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlOnePerGroup); if(onePerGroupOcc != null){ String boolStr = onePerGroupOcc.getValue().toUpperCase(); @@ -96,7 +96,7 @@ } else if(boolStr.equals("FALSE")) { return false; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlOnePerGroup + " must be set to one of \"true\" or \"false\", but is \"" + onePerGroupOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlOnePerGroup + " must be set to one of \"true\" or \"false\", but is \"" + onePerGroupOcc.getValue() + "\""); } } else { return false; @@ -107,15 +107,15 @@ // returns an int instance of a gdl:size occurrence. // If no gdl:size occurrence is set, the default value is returned public int getSize() throws InvalidGdlSchemaException { - Occurrence rowsOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlSize); + Occurrence rowsOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlSize); if(rowsOcc != null){ try{ int value = Integer.valueOf(rowsOcc.getValue()); - if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlSize + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); + if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlSize + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); else return value; }catch(NumberFormatException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlSize + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlSize + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); } } else { return 1; Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlReference.java Wed Aug 24 08:47:02 2011 (r778) @@ -74,14 +74,14 @@ public ColorValue getColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlColor, styleClass); + colorOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlColor, styleClass); } else { - colorOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlColor); + colorOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlColor); } - if(colorOcc == null && (styleClass == null || styleClass.equals(PSIs.Scope.gdlFocus) || styleClass.equals(PSIs.Scope.gdlHover))){ + if(colorOcc == null && (styleClass == null || styleClass.equals(PSIs.GDL.Scope.gdlFocus) || styleClass.equals(PSIs.GDL.Scope.gdlHover))){ return new ColorValue("#0000FF"); - }else if(colorOcc == null && styleClass.equals(PSIs.Scope.gdlActive)){ + }else if(colorOcc == null && styleClass.equals(PSIs.GDL.Scope.gdlActive)){ return null; }else { return new ColorValue(colorOcc.getValue()); @@ -97,9 +97,9 @@ public CursorValue getCursor(String styleClass) throws InvalidGdlSchemaException { Occurrence cursorOcc = null; if(styleClass != null){ - cursorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlCursor, styleClass); + cursorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor, styleClass); } else { - cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlCursor); + cursorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlCursor); } if(cursorOcc == null && styleClass != null){ @@ -126,9 +126,9 @@ public TextDecorationValue getTextDecoration(String styleClass) throws InvalidGdlSchemaException { Occurrence decorationOcc = null; if(styleClass != null){ - decorationOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlTextDecoration, styleClass); + decorationOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextDecoration, styleClass); } else { - decorationOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTextDecoration); + decorationOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextDecoration); } if(decorationOcc == null && styleClass != null){ @@ -139,7 +139,7 @@ try{ return TextDecorationValue.valueOf(decorationOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTextDecoration + " must be set to one of \"underline\", \"overline\", \"line-through\", \"blink\" or \"none\", but is \"" + decorationOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTextDecoration + " must be set to one of \"underline\", \"overline\", \"line-through\", \"blink\" or \"none\", but is \"" + decorationOcc.getValue() + "\""); } } } 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 Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlText.java Wed Aug 24 08:47:02 2011 (r778) @@ -129,7 +129,7 @@ Topic occurrenceType = TmHelper.getConstrainedStatement(this.getConstraint()); for(int i = 0; i != ((Topic)this.receivedData).getOccurrences(occurrenceType).length(); ++i) this.createNewTextArea().setText(((Topic)this.receivedData).getOccurrences(occurrenceType).get(i).getValue()); - } else if(TmHelper.isInstanceOf(this.getConstraint(), PSIs.TopicType.gdlRolePlayer)){ + } else if(TmHelper.isInstanceOf(this.getConstraint(), PSIs.GDL.TopicType.gdlRolePlayer)){ this.createNewTextArea().setText("gdl:Role-Player instance"); // TODO: search role => role-type + role-player // TODO: display the correponding value @@ -140,13 +140,13 @@ // sets the field for the set default value or sets at least one empty field protected void setDefaultValue() throws InvalidGdlSchemaException, ExecutionException { - if(this.getDefaultLiteralValue() != null && this.getDefaultTmValue() != null) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getValueGroup()) + " must be bound to maximal one " + PSIs.TopicType.gdlDefaultValue + ", but is: 2"); + if(this.getDefaultLiteralValue() != null && this.getDefaultTmValue() != null) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getValueGroup()) + " must be bound to maximal one " + PSIs.GDL.TopicType.gdlDefaultValue + ", but is: 2"); if(this.getDefaultLiteralValue() != null){ TopicMap tm = this.getDefaultLiteralValue().getTopicMap(); - Topic occType = TmHelper.getTopicByPsi(PSIs.OccurrenceType.gdlLiteralValue, tm); + Topic occType = TmHelper.getTopicByPsi(PSIs.GDL.OccurrenceType.gdlLiteralValue, tm); JsArray<Occurrence> vals = this.getDefaultLiteralValue().getOccurrences(occType); - if(vals.length() != 1) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getDefaultLiteralValue()) + " must be bound exactly once to a " + PSIs.OccurrenceType.gdlLiteralValue + " occurrence, but is: " + vals.length()); + if(vals.length() != 1) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getDefaultLiteralValue()) + " must be bound exactly once to a " + PSIs.GDL.OccurrenceType.gdlLiteralValue + " occurrence, but is: " + vals.length()); this.createNewTextArea().setText(vals.get(0).getValue()); } else if(this.getDefaultTmValue() != null){ @@ -195,9 +195,9 @@ public AbsoluteNumValue getBorderWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderWidth); } if(widthOcc == null) return null; @@ -210,9 +210,9 @@ public AbsoluteNumValue getBorderTopWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopWidth); } if(widthOcc == null) return null; @@ -225,9 +225,9 @@ public AbsoluteNumValue getBorderRightWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightWidth); } if(widthOcc == null) return null; @@ -240,9 +240,9 @@ public AbsoluteNumValue getBorderBottomWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomWidth); } if(widthOcc == null) return null; @@ -255,9 +255,9 @@ public AbsoluteNumValue getBorderLeftWidth(String styleClass) throws InvalidGdlSchemaException { Occurrence widthOcc = null; if(styleClass != null){ - widthOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftWidth, styleClass); + widthOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftWidth, styleClass); } else { - widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftWidth); + widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftWidth); } if(widthOcc == null) return null; @@ -269,9 +269,9 @@ public NumUnitValue getBorderRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRadius); } if(radiusOcc == null) return null; @@ -283,9 +283,9 @@ public NumUnitValue getBorderTopLeftRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopLeftRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopLeftRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopLeftRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopLeftRadius); } if(radiusOcc == null) return null; @@ -297,9 +297,9 @@ public NumUnitValue getBorderTopRightRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopRightRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopRightRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopRightRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopRightRadius); } if(radiusOcc == null) return null; @@ -311,9 +311,9 @@ public NumUnitValue getBorderBottomLeftRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomLeftRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomLeftRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomLeftRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomLeftRadius); } if(radiusOcc == null) return null; @@ -325,9 +325,9 @@ public NumUnitValue getBorderBottomRightRadius(String styleClass) throws InvalidGdlSchemaException { Occurrence radiusOcc = null; if(styleClass != null){ - radiusOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomRightRadius, styleClass); + radiusOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomRightRadius, styleClass); } else { - radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomRightRadius); + radiusOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomRightRadius); } if(radiusOcc == null) return null; @@ -339,9 +339,9 @@ public ColorValue getBorderColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderColor); } if(colorOcc == null ) return null; @@ -353,9 +353,9 @@ public ColorValue getBorderTopColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopColor); } if(colorOcc == null ) return null; @@ -367,9 +367,9 @@ public ColorValue getBorderRightColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightColor); } if(colorOcc == null ) return null; @@ -381,9 +381,9 @@ public ColorValue getBorderBottomColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomColor); } if(colorOcc == null ) return null; @@ -395,9 +395,9 @@ public ColorValue getBorderLeftColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftColor, styleClass); + colorOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftColor, styleClass); } else { - colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftColor); + colorOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftColor); } if(colorOcc == null ) return null; @@ -409,9 +409,9 @@ public BorderStyleValue getBorderStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderStyle); } if(styleOcc == null) { @@ -431,9 +431,9 @@ public BorderStyleValue getBorderTopStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderTopStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderTopStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderTopStyle); } if(styleOcc == null) { @@ -453,9 +453,9 @@ public BorderStyleValue getBorderRightStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderRightStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderRightStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderRightStyle); } if(styleOcc == null) { @@ -475,9 +475,9 @@ public BorderStyleValue getBorderBottomStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderBottomStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderBottomStyle); } if(styleOcc == null) { @@ -497,9 +497,9 @@ public BorderStyleValue getBorderLeftStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftStyle, styleClass); + styleOcc = getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftStyle, styleClass); } else { - styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlBorderLeftStyle); + styleOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlBorderLeftStyle); } if(styleOcc == null) { @@ -518,13 +518,13 @@ // returns a TextType instance of a gdl:text-type occurrence. // If no gdl:text-type occurrence is set, the default value is returned public TextTypeValue getTextType() throws InvalidGdlSchemaException { - Occurrence typeOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTextType); + Occurrence typeOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextType); if(typeOcc != null){ try{ return TextTypeValue.valueOf(typeOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTextType + " must be set to one of \"text\" or \"password\", but is \"" + typeOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTextType + " must be set to one of \"text\" or \"password\", but is \"" + typeOcc.getValue() + "\""); } } else { return TextTypeValue.Text; @@ -535,7 +535,7 @@ // returns a boolean instance of a gdl:readonly occurrence. // If no gdl:readonly occurrence is set, the default value is returned public boolean getReadonly() throws InvalidGdlSchemaException { - Occurrence readOnlyOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlReadonly); + Occurrence readOnlyOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlReadonly); if(readOnlyOcc != null){ String boolStr = readOnlyOcc.getValue().toUpperCase(); @@ -544,7 +544,7 @@ } else if(boolStr.equals("FALSE")) { return false; } else { - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlReadonly + " must be set to one of \"true\" or \"false\", but is \"" + readOnlyOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlReadonly + " must be set to one of \"true\" or \"false\", but is \"" + readOnlyOcc.getValue() + "\""); } } else { return true; @@ -555,15 +555,15 @@ // returns an int instance of a gdl:rows occurrence. // If no gdl:rows occurrence is set, the default value is returned public int getRows() throws InvalidGdlSchemaException { - Occurrence rowsOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlRows); + Occurrence rowsOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlRows); if(rowsOcc != null){ try{ int value = Integer.valueOf(rowsOcc.getValue()); - if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); + if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); else return value; }catch(NumberFormatException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + rowsOcc.getValue() + "\""); } } else { return 1; @@ -574,15 +574,15 @@ // returns a boolean instance of a gdl:cols occurrence. // If no gdl:cols occurrence is set, the default value is returned public int getCols() throws InvalidGdlSchemaException { - Occurrence colsOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlCols); + Occurrence colsOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlCols); if(colsOcc != null){ try{ int value = Integer.valueOf(colsOcc.getValue()); - if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlCols + " must be set to a positive integer, but is \"" + colsOcc.getValue() + "\""); + if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlCols + " must be set to a positive integer, but is \"" + colsOcc.getValue() + "\""); else return value; }catch(NumberFormatException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlCols + " must be set to a positive integer, but is \"" + colsOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlCols + " must be set to a positive integer, but is \"" + colsOcc.getValue() + "\""); } } else { return 5; @@ -593,13 +593,13 @@ // returns a boolean instance of a gdl:resize occurrence. // If no gdl:resize occurrence is set, the default value is returned public ResizeValue getResize() throws InvalidGdlSchemaException { - Occurrence resizeOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlResize); + Occurrence resizeOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlResize); if(resizeOcc != null){ try{ return ResizeValue.valueOf(resizeOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlResize + " must be set to one of \"both\", \"vertical\", \"horizontal\" or \"none\", but is \"" + resizeOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlResize + " must be set to one of \"both\", \"vertical\", \"horizontal\" or \"none\", but is \"" + resizeOcc.getValue() + "\""); } } else { return ResizeValue.NONE; @@ -655,8 +655,8 @@ // sets the rows property if gdl:width is not set public void setRows(Widget widget, int value) throws InvalidGdlSchemaException, ExecutionException { - if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + value + "\""); - Occurrence heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlHeight); + if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + value + "\""); + Occurrence heightOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlHeight); // rows is only treated if height is not set if(heightOcc == null) ((TextArea)widget).setVisibleLines(value); @@ -665,8 +665,8 @@ // sets the cols property if gdl:height is not set public void setCols(Widget widget, int value) throws InvalidGdlSchemaException, ExecutionException { - if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + value + "\""); - Occurrence widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlWidth); + if(value < 0) throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlRows + " must be set to a positive integer, but is \"" + value + "\""); + Occurrence widthOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlWidth); // cols is only treated if width is not set if(widthOcc == null) DOM.setElementAttribute(widget.getElement(), "cols", String.valueOf(value)); @@ -975,7 +975,7 @@ @Override public Topic getDefaultValue() throws InvalidGdlSchemaException { - if(this.getDefaultLiteralValue() != null && this.getDefaultTmValue() != null) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getValueGroup()) + " must be bound to maximal one " + PSIs.TopicType.gdlDefaultValue + ", but is: 2"); + if(this.getDefaultLiteralValue() != null && this.getDefaultTmValue() != null) throw new InvalidGdlSchemaException("the topic " + TmHelper.getAnyIdOfTopic(this.getValueGroup()) + " must be bound to maximal one " + PSIs.GDL.TopicType.gdlDefaultValue + ", but is: 2"); else if(this.getDefaultLiteralValue() != null) return this.getDefaultLiteralValue(); else return this.getDefaultTmValue(); } @@ -987,13 +987,13 @@ if(defVal == null) return false; TopicMap tm = defVal.getTopicMap(); - Occurrence fixedOcc = TmHelper.getSingleOccurrence(defVal, TmHelper.getTopicByPsi(PSIs.OccurrenceType.gdlFixed, tm)); + Occurrence fixedOcc = TmHelper.getSingleOccurrence(defVal, TmHelper.getTopicByPsi(PSIs.GDL.OccurrenceType.gdlFixed, tm)); if(fixedOcc != null){ try{ return Boolean.valueOf(fixedOcc.getValue().toLowerCase()); }catch(Exception e){ - throw new InvalidGdlSchemaException("the occurrence of type " + PSIs.OccurrenceType.gdlFixed + " bound to the topic " + TmHelper.getAnyIdOfTopic(defVal) + " must be set to either true or false, but is: " + fixedOcc.getValue()); + throw new InvalidGdlSchemaException("the occurrence of type " + PSIs.GDL.OccurrenceType.gdlFixed + " bound to the topic " + TmHelper.getAnyIdOfTopic(defVal) + " must be set to either true or false, but is: " + fixedOcc.getValue()); } } else { return false; Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTextObject.java Wed Aug 24 08:47:02 2011 (r778) @@ -39,9 +39,9 @@ public DirectionValue getDirection(String styleClass) throws InvalidGdlSchemaException { Occurrence directionOcc = null; if(styleClass != null){ - directionOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlDirection, styleClass); + directionOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlDirection, styleClass); } else { - directionOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlDirection); + directionOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlDirection); } if(directionOcc == null && styleClass != null){ @@ -52,7 +52,7 @@ try{ return DirectionValue.valueOf(directionOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlDirection + " must be set to one of \"ltr\" or \"rtl\", but is \"" + directionOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlDirection + " must be set to one of \"ltr\" or \"rtl\", but is \"" + directionOcc.getValue() + "\""); } } } @@ -64,9 +64,9 @@ public TextAlignValue getTextAlign(String styleClass) throws InvalidGdlSchemaException { Occurrence textAlignOcc = null; if(styleClass != null){ - textAlignOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlTextAlign, styleClass); + textAlignOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextAlign, styleClass); } else { - textAlignOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTextAlign); + textAlignOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextAlign); } if(textAlignOcc == null && styleClass != null){ @@ -77,7 +77,7 @@ try{ return TextAlignValue.valueOf(textAlignOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTextAlign + " must be set to one of \"left\", \"right\", \"center\" or \"justify\", but is \"" + textAlignOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTextAlign + " must be set to one of \"left\", \"right\", \"center\" or \"justify\", but is \"" + textAlignOcc.getValue() + "\""); } } } @@ -89,9 +89,9 @@ public NormalNumUnitValue getLineHeight(String styleClass) throws InvalidGdlSchemaException { Occurrence lineHeightOcc = null; if(styleClass != null){ - lineHeightOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlLineHeight, styleClass); + lineHeightOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlLineHeight, styleClass); } else { - lineHeightOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlLineHeight); + lineHeightOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlLineHeight); } if(lineHeightOcc == null && styleClass != null){ @@ -110,9 +110,9 @@ public TextDecorationValue getTextDecoration(String styleClass) throws InvalidGdlSchemaException { Occurrence decorationOcc = null; if(styleClass != null){ - decorationOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlTextDecoration, styleClass); + decorationOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextDecoration, styleClass); } else { - decorationOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTextDecoration); + decorationOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTextDecoration); } if(decorationOcc == null && styleClass != null){ @@ -123,7 +123,7 @@ try{ return TextDecorationValue.valueOf(decorationOcc.getValue().toUpperCase().replace("-", "_")); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTextDecoration + " must be set to one of \"underline\", \"overline\", \"line-through\", \"blink\" or \"none\", but is \"" + decorationOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTextDecoration + " must be set to one of \"underline\", \"overline\", \"line-through\", \"blink\" or \"none\", but is \"" + decorationOcc.getValue() + "\""); } } } @@ -135,9 +135,9 @@ public ColorValue getColor(String styleClass) throws InvalidGdlSchemaException { Occurrence colorOcc = null; if(styleClass != null){ - colorOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlColor, styleClass); + colorOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlColor, styleClass); } else { - colorOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlColor); + colorOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlColor); } if(colorOcc == null && styleClass != null){ @@ -154,9 +154,9 @@ public String getFontFamily(String styleClass) throws InvalidGdlSchemaException { Occurrence fontOcc = null; if(styleClass != null){ - fontOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlFontfamily, styleClass); + fontOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontfamily, styleClass); } else { - fontOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFontfamily); + fontOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontfamily); } if(fontOcc == null){ @@ -173,9 +173,9 @@ public FontStyle getFontStyle(String styleClass) throws InvalidGdlSchemaException { Occurrence styleOcc = null; if(styleClass != null){ - styleOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlFontStyle, styleClass); + styleOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontStyle, styleClass); } else { - styleOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFontStyle); + styleOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontStyle); } if(styleOcc == null && styleClass != null){ @@ -186,7 +186,7 @@ try{ return FontStyle.valueOf(styleOcc.getValue().toUpperCase()); }catch(IllegalArgumentException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlFontStyle + " must be set to one of \"normal\", \"italic\" or \"oblique\", but is \"" + styleOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlFontStyle + " must be set to one of \"normal\", \"italic\" or \"oblique\", but is \"" + styleOcc.getValue() + "\""); } } } @@ -198,9 +198,9 @@ public PositiveNumUnitValue getFontSize(String styleClass) throws InvalidGdlSchemaException { Occurrence sizeOcc = null; if(styleClass != null){ - sizeOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlFontSize, styleClass); + sizeOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontSize, styleClass); } else { - sizeOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFontSize); + sizeOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontSize); } if(sizeOcc == null && styleClass != null){ @@ -219,9 +219,9 @@ public FontWeightValue getFontWeight(String styleClass) throws InvalidGdlSchemaException { Occurrence weightOcc = null; if(styleClass != null){ - weightOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlFontWeight, styleClass); + weightOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontWeight, styleClass); } else { - weightOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFontWeight); + weightOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontWeight); } if(weightOcc == null && styleClass != null){ @@ -233,7 +233,7 @@ return FontWeightValue.fromString(weightOcc.getValue()); }catch(IllegalArgumentException e){ String values = "normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800 or 900"; - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlFontWeight + " must be set to one of " + values + ", but found " + weightOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlFontWeight + " must be set to one of " + values + ", but found " + weightOcc.getValue() + "\""); } } } @@ -245,9 +245,9 @@ public NormalNumUnitValue getLetterSpacing(String styleClass) throws InvalidGdlSchemaException { Occurrence spacingOcc = null; if(styleClass != null){ - spacingOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlLetterSpacing, styleClass); + spacingOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlLetterSpacing, styleClass); } else { - spacingOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlLetterSpacing); + spacingOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlLetterSpacing); } if(spacingOcc == null && styleClass != null){ @@ -266,9 +266,9 @@ public NormalNumUnitValue getWordSpacing(String styleClass) throws InvalidGdlSchemaException { Occurrence spacingOcc = null; if(styleClass != null){ - spacingOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlWordSpacing, styleClass); + spacingOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlWordSpacing, styleClass); } else { - spacingOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlWordSpacing); + spacingOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlWordSpacing); } if(spacingOcc == null && styleClass != null){ @@ -349,7 +349,7 @@ public void setGdlStyle(Widget widget) throws InvalidGdlSchemaException, ExecutionException { super.setGdlStyle(widget); - String[] styleClasses = new String[]{null, PSIs.Scope.gdlActive, PSIs.Scope.gdlFocus, PSIs.Scope.gdlHover}; + String[] styleClasses = new String[]{null, PSIs.GDL.Scope.gdlActive, PSIs.GDL.Scope.gdlFocus, PSIs.GDL.Scope.gdlHover}; for (String styleClass : styleClasses) { this.setColor(widget, this.getColor(styleClass), styleClass); Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/text/GdlTitle.java Wed Aug 24 08:47:02 2011 (r778) @@ -100,9 +100,9 @@ public PositiveNumUnitValue getFontSize(String styleClass) throws InvalidGdlSchemaException { Occurrence sizeOcc = null; if(styleClass != null){ - sizeOcc = super.getNoneOrOneScopedOccurrence(PSIs.OccurrenceType.gdlFontSize, styleClass); + sizeOcc = super.getNoneOrOneScopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontSize, styleClass); } else { - sizeOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlFontSize); + sizeOcc = super.getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlFontSize); } if(sizeOcc == null && styleClass != null){ @@ -122,14 +122,14 @@ // returns the property of a gdl:title-order occurrence, otherwise the default value if no occurrence is set public int getTitleOrder() throws InvalidGdlSchemaException{ - Occurrence orderOcc = getNoneOrOneUnscopedOccurrence(PSIs.OccurrenceType.gdlTitleOrder); + Occurrence orderOcc = getNoneOrOneUnscopedOccurrence(PSIs.GDL.OccurrenceType.gdlTitleOrder); if(orderOcc != null){ try{ int titleOrder = Integer.valueOf(orderOcc.getValue()); return titleOrder; }catch(NumberFormatException e){ - throw new InvalidGdlSchemaException("The occurrence " + PSIs.OccurrenceType.gdlTitleOrder + " must be set to one of \"1\", \"2\", \"3\" or \"4\", but is \"" + orderOcc.getValue() + "\""); + throw new InvalidGdlSchemaException("The occurrence " + PSIs.GDL.OccurrenceType.gdlTitleOrder + " must be set to one of \"1\", \"2\", \"3\" or \"4\", but is \"" + orderOcc.getValue() + "\""); } } else { return 1; @@ -147,9 +147,9 @@ // adds a stly property and value as a pair to the corresponding array list private void addStyleToStore(String styleClass, String property, String value){ if(styleClass == null) return; - else if(styleClass.equals(PSIs.Scope.gdlActive)) this.titleActiveCssNamesAndStyles.add(new Pair<String, String>(property, value)); - else if(styleClass.equals(PSIs.Scope.gdlFocus)) this.titleFocusCssNamesAndStyles.add(new Pair<String, String>(property, value)); - else if(styleClass.equals(PSIs.Scope.gdlHover)) this.titleHoverCssNamesAndStyles.add(new Pair<String, String>(property, value)); + else if(styleClass.equals(PSIs.GDL.Scope.gdlActive)) this.titleActiveCssNamesAndStyles.add(new Pair<String, String>(property, value)); + else if(styleClass.equals(PSIs.GDL.Scope.gdlFocus)) this.titleFocusCssNamesAndStyles.add(new Pair<String, String>(property, value)); + else if(styleClass.equals(PSIs.GDL.Scope.gdlHover)) this.titleHoverCssNamesAndStyles.add(new Pair<String, String>(property, value)); } Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlAssociationView.java Wed Aug 24 08:47:02 2011 (r778) @@ -224,9 +224,9 @@ // returns the string value of a gdl:id occurrence public String getId() throws InvalidGdlSchemaException { - JsArray<Occurrence> idOccs = getOccurrences(PSIs.OccurrenceType.gdlId); + JsArray<Occurrence> idOccs = getOccurrences(PSIs.GDL.OccurrenceType.gdlId); if(idOccs.length() != 1){ - throw new InvalidGdlSchemaException("The topic " + TmHelper.getAnyIdOfTopic(this.tmRepresentative) + " must be bound to exactly one occurrence of the type " + PSIs.OccurrenceType.gdlId + ", but is bound " + idOccs.length() + " times to it"); + throw new InvalidGdlSchemaException("The topic " + TmHelper.getAnyIdOfTopic(this.tmRepresentative) + " must be bound to exactly one occurrence of the type " + PSIs.GDL.OccurrenceType.gdlId + ", but is bound " + idOccs.length() + " times to it"); } else { return idOccs.get(0).getValue() + "__GDL_" + this.indexInParent; } @@ -244,7 +244,7 @@ // sets all GDL styles that are defined by the topic map representative to tha passed widget @Override public void setGdlStyle(Widget widget) throws InvalidGdlSchemaException, ExecutionException { - String[] styleClasses = new String[]{null, PSIs.Scope.gdlActive, PSIs.Scope.gdlFocus, PSIs.Scope.gdlHover}; + String[] styleClasses = new String[]{null, PSIs.GDL.Scope.gdlActive, PSIs.GDL.Scope.gdlFocus, PSIs.GDL.Scope.gdlHover}; for (String styleClass : styleClasses) { this.setVerticalAlign(widget, this.getVerticalAlign(styleClass), styleClass); Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java Wed Aug 24 08:24:57 2011 (r777) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/view/GdlView.java Wed Aug 24 08:47:02 2011 (r778) @@ -33,9 +33,9 @@ public String getViewName()throws InvalidGdlSchemaException { - JsArray<Name> viewNames = super.tmRepresentative.getNames(tm.getTopicBySubjectIdentifier(tm.createLocator(PSIs.NameType.gdlViewName))); + JsArray<Name> viewNames = super.tmRepresentative.getNames(tm.getTopicBySubjectIdentifier(tm.createLocator(PSIs.GDL.NameType.gdlViewName))); if(viewNames.length() != 1){ - throw new InvalidGdlSchemaException("A view must be bound to a " + PSIs.NameType.gdlViewName + " instance"); + throw new InvalidGdlSchemaException("A view must be bound to a " + PSIs.GDL.NameType.gdlViewName + " instance"); } return viewNames.get(0).getValue(); }