Author: lgiessmann Date: Thu Jul 21 02:55:39 2011 New Revision: 656
Log:
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt Thu Jul 21 01:31:07 2011 (r655) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/TODO.txt Thu Jul 21 02:55:39 2011 (r656) @@ -1,5 +1,5 @@ 1. Use a Hyperlink element in GdlReference instead of the inner class Reference -2. Implement GdlLineBreak +2. Implement GdlLineBreak => placeholder 3. Implement TopicMaps data consumption 4. Implement TopicMaps data generation 3. Implement GdlButton(s)
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 Thu Jul 21 01:31:07 2011 (r655) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/base/TmHelper.java Thu Jul 21 02:55:39 2011 (r656) @@ -15,6 +15,7 @@ import us.isidor.gdl.anaToMia.Widgets.base.GdlPsis.RoleType; import us.isidor.gdl.anaToMia.Widgets.base.GdlPsis.TMDM; import us.isidor.gdl.anaToMia.Widgets.base.GdlPsis.TopicType; +import us.isidor.gdl.anaToMia.Widgets.container.GdlUnit; import us.isidor.gdl.anaToMia.Widgets.environment.InvalidGdlSchemaException; import us.isidor.gdl.anaToMia.Widgets.environment.Pair; import us.isidor.gdl.anaToMia.Widgets.environment.TopicIdentifierTypes; @@ -308,10 +309,23 @@ Topic typeOfTopic = topic.getTypes().length() != 0 ? topic.getTypes().get(0) : null; localRolePlayertypesAndTypes.add(new Pair<Topic, Topic>(typeOfTopic, roleType)); - for (Association assoc : allPotentialAssocs) if(hasRoles(assoc, localRolePlayertypesAndTypes)) assocsWoScope.add(assoc); + for (Association assoc : allPotentialAssocs){ + if(getAnyIdOfTopic(topic).equals("http://psi.test.org/gdl-test/unit-1%22))%7B // TODO: remove + String str = ""; + for (Pair<Topic, Topic> pair : localRolePlayertypesAndTypes) + str += ", [" + getAnyIdOfTopic(pair.getFirst()) + ", " + getAnyIdOfTopic(pair.getSecond()) + "]"; + + Window.alert(str); + } + + if(hasRoles(assoc, localRolePlayertypesAndTypes)) assocsWoScope.add(assoc); + } for (Association assoc : assocsWoScope) if(hasThemes(assoc, scope)) result.add(assoc); + + + return result; }
@@ -411,6 +425,14 @@ rolePlayertypesAndTypes.add(new Pair<Topic, Topic>(position, descriptorRoleType)); ArrayList<Association> descendantAssocsOfContainer = TmHelper.getAssociationsOfTopic(container, ancestorRoleType, positionAssocType, null, rolePlayertypesAndTypes); + if(getAnyIdOfTopic(container).equals("http://psi.test.org/gdl-test/unit-1%22))%7B // TODO: remove + Association assoc = container.getRolesPlayed(ancestorRoleType, positionAssocType).get(0).getParent(); + String str = ""; + for(int i = 0; i != assoc.getRoles().length(); ++i) + str += ", [" + getAnyIdOfTopic(assoc.getRoles().get(i).getType()) + ", " + getAnyIdOfTopic(assoc.getRoles().get(i).getPlayer()) + "]"; + Window.alert(getAnyIdOfTopic(container) + " >> " + descendantAssocsOfContainer.size() + " >> " + str); + } + ArrayList<Topic> validDescendants = new ArrayList<Topic>(); for (Association descendantAssociation : descendantAssocsOfContainer) { JsArray<Role> descendantRoles = descendantAssociation.getRoles(descendantRoleType);
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm ============================================================================== --- branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Thu Jul 21 01:31:07 2011 (r655) +++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Thu Jul 21 02:55:39 2011 (r656) @@ -54,8 +54,10 @@ {"subject_identifiers":["[doc:list-item-2]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_2_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding]", "value":"5px"}, {"type":"si:[gdl:margin-top]", "value":"5px"}]}, {"subject_identifiers":["[gdl:List-Box]"]}, {"subject_identifiers":["[doc:text-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"text_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:readonly]", "value":"false", "datatype":"[xsd:boolean]"}]}, - {"subject_identifiers":["[doc:unit-1]"], "instance_of":["si:[gdl:Unit]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:unit-name]", "value":"unit 1"}, {"type":"si:[gdl:width]", "value":"100px"}, {"type":"si:[gdl:height]", "value":"100px"}, {"type":"si:[gdl:border-style]", "value":"dashed"}, {"type":"si:[gdl:border-width]", "value":"1px"}, {"type":"si:[gdl:text-decoration]", "value":"line-through"},{"type":"si:[gdl:background-color]", "value":"yellow"}]}, + {"subject_identifiers":["[doc:unit-1]"], "instance_of":["si:[gdl:Unit]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:unit-name]", "value":"unit 1"}, {"type":"si:[gdl:width]", "value":"400px"}, {"type":"si:[gdl:height]", "value":"200px"}, {"type":"si:[gdl:border-style]", "value":"dashed"}, {"type":"si:[gdl:border-width]", "value":"1px"}, {"type":"si:[gdl:text-decoration]", "value":"line-through"},{"type":"si:[gdl:background-color]", "value":"lime"}]}, {"subject_identifiers":["[doc:title-1]"], "instance_of":["si:[gdl:Title]"], "occurrences":[{"type":"si:[gdl:id]", "value":"title_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:text-decoration]", "value":"underline"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}, {"type":"si:[gdl:font-weight]", "value":"bold"}]}, + {"subject_identifiers":["[doc:unit-1-reference]"], "instance_of":["si:[gdl:Reference]"]}, + {"subject_identifiers":["[doc:pos-of-unit-1-reference]"], "instance_of":["si:[gdl:Reference]"]}, {"subject_identifiers":["[doc:reference-1]"], "instance_of":["si:[gdl:Reference]"], "occurrences":[{"type":"si:[gdl:id]", "value":"reference_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:margin-left]", "value":"200px"}, {"type":"si:[gdl:background-color]", "value":"yellow"}]}, {"subject_identifiers":["[doc:list-box-1]"], "instance_of":["si:[gdl:List-Box]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_box_1_id", "datatype":"[xsd:ID]"}]}, {"subject_identifiers":["[gdl:Value]"], "instance_of":["si:[tmcl:topic-type]"]}, @@ -155,5 +157,7 @@ {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:person-list]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1]"}]}, {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:person-list]"},{"type":"si:[gdl:containee]", "player":"si:[doc:list-item-1]"}, {"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-1]"}]}, {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:person-list]"},{"type":"si:[gdl:containee]", "player":"si:[doc:list-item-2]"}, {"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-2]"}]}, - {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:person-list]"},{"type":"si:[gdl:containee]", "player":"si:[doc:list-item-3]"}, {"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-3]"}]} + {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:person-list]"},{"type":"si:[gdl:containee]", "player":"si:[doc:list-item-3]"}, {"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-3]"}]}, + {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-reference]"}]}, + {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit-1-reference]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:unit-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-reference]"}]} ]} \ No newline at end of file