isidorus-cvs
Threads by month
- ----- 2025 -----
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
August 2011
- 1 participants
- 117 discussions

[isidorus-cvs] r723 - in branches/gdl-frontend/src/anaToMia/GDL_Widgets: src/us/isidor/gdl/anaToMia/Widgets/isidorus war/gdl_widgets
by lgiessmann@common-lisp.net 12 Aug '11
by lgiessmann@common-lisp.net 12 Aug '11
12 Aug '11
Author: lgiessmann
Date: Fri Aug 12 04:48:04 2011
New Revision: 723
Log:
gdl-frontend: Widgets: started to define a new gdl-schema for consuming topic maps data
Added:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/TextGrid.jtm
- copied, changed from r722, 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.2.jtm
Replaced:
branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm
- copied, changed from r722, 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/isidorus/LoadSchemaCallback.java
Modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java
==============================================================================
--- branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java Fri Aug 12 02:10:00 2011 (r722)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/src/us/isidor/gdl/anaToMia/Widgets/isidorus/LoadSchemaCallback.java Fri Aug 12 04:48:04 2011 (r723)
@@ -23,7 +23,7 @@
// this class can be used as a callback that requests the Topic Map data
// addressable by the URI isidorusUrl
public class LoadSchemaCallback implements ILoadSchemaCallback{
- private final String isidorusUrl = URL.encode(GWT.getModuleBaseURL() + "test.gdl.jtm"); // TODO: replace with the correct URL
+ private final String isidorusUrl = URL.encode(GWT.getModuleBaseURL() + "test.gdl.2.jtm"); // TODO: replace with the correct URL
private ArrayList<Pair<String, TopicIdentifierTypes>> requestedTopicsToCreate = new ArrayList<Pair<String,TopicIdentifierTypes>>();
private Pair<String, TopicIdentifierTypes> requestedTopicToEdit = null;
private RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, isidorusUrl);
Copied and modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/TextGrid.jtm (from r722, 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 Fri Aug 12 02:10:00 2011 (r722, copy source)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/TextGrid.jtm Fri Aug 12 04:48:04 2011 (r723)
@@ -1,305 +0,0 @@
-{"version":"1.1",
- "prefixes":{"tmcl":"http://psi.topicmaps.org/tmcl/",
- "tmdm":"http://psi.topicmaps.org/iso13250/model/",
- "doc":"http://psi.test.org/gdl-test/",
- "gdl":"http://psi.isidor.us/gdl/"},
- "item_type":"topicmap",
- "item_identifiers":["[doc:gdl-test-tm]"],
- "topics":[{"subject_identifiers":["[tmcl:topic-type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:role-type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:association-type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:name-type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:occurrence-type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmdm:supertype]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmdm:subtype]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmdm:supertype-subtype]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:button-position]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:contains]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:container]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:containee]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:ancestor]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:descendant]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:view-binding]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:value-group]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:Schema]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[gdl:schema-name]"], "instance_of":["si:[tmcl:name-type]"]},
- {"subject_identifiers":["[gdl:view-name]"], "instance_of":["si:[tmcl:name-type]"]},
- {"subject_identifiers":["[gdl:Descriptor]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[gdl:border-width]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[tmcl:card-max]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[tmcl:card-min]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[tmcl:regexp]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[doc:test-schema]"], "instance_of":["si:[gdl:Schema]"], "names":[{"value": "Test GDL Schema", "type":"si:[gdl:schema-name]"}]},
- {"subject_identifiers":["[gdl:Visible-Object]"]},
- {"subject_identifiers":["[doc:person-name]"], "instance_of":["si:[tmcl:name-type]"]},
- {"subject_identifiers":["[tmcl:allowed]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmcl:allowed-reifier]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[tmcl:allows]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[doc:poet-name]"]},
- {"subject_identifiers":["[doc:unused-person-name-reifier]"], "instance_of":["si:[doc:Reifier-Type]"]},
- {"subject_identifiers":["[doc:unused-person-name-scope]"], "instance_of":["si:[doc:Scope-Type]"]},
- {"subject_identifiers":["[doc:Reifier-Type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[doc:Scope-Type]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[doc:musician-name]"]},
- {"subject_identifiers":["[doc:director-name]"]},
- {"subject_identifiers":["[gdl:Visible-Object]"]},
- {"subject_identifiers":["[tmcl:constraint]"], "instance_of":["si:[tmcl:topic-type]","si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmcl:reifier-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:scope-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:constrained]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmcl:constrained-scope]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[tmcl:constrained-statement]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmcl:constrained-topic-type]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:value]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[tmcl:topic-name-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:regular-expression-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[gdl:Value-Group]"]},
- {"subject_identifiers":["[gdl:Text-Object]"]},
- {"subject_identifiers":["[gdl:Type]"]},
- {"subject_identifiers":["[gdl:Position]"]},
- {"subject_identifiers":["[gdl:position]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:value-binding]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[doc:value-group-person-name]"], "instance_of":["si:[gdl:Value-Group]"]},
- {"subject_identifiers":["[gdl:margin-left]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:border-style]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:margin-top]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:margin-bottom]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:padding]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:padding-bottom]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:readonly]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:margin]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:text-decoration]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:nth-element]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:background-color]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:width]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:unit-name]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:height]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:font-weight]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:float]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:clear]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:resize]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:action-button]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:font-size]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[doc:default-creator-topic-view-1]"], "instance_of":["si:[gdl:Default-Creator-Topic-View]"], "names":[{"value": "Def. Creator View 1", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"default_creator_topic_view_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}, {"type":"si:[gdl:width]", "value":"500px"}, {"type":"si:[gdl:height]", "value":"600px"}]},
- {"subject_identifiers":["[gdl:View]"]},
- {"subject_identifiers":["[gdl:Button]"]},
- {"subject_identifiers":["[gdl:Action-Button]"]},
- {"subject_identifiers":["[gdl:Input-Button]"]},
- {"subject_identifiers":["[gdl:Value]"]},
- {"subject_identifiers":["[gdl:Default-Value]"]},
- {"subject_identifiers":["[gdl:Input-Button]"]},
- {"subject_identifiers":["[gdl:Literal-Value]"]},
- {"subject_identifiers":["[gdl:TM-Value]"]},
- {"subject_identifiers":["[gdl:TM-Type-Value]"]},
- {"subject_identifiers":["[gdl:TM-Single-Type-Value]"]},
- {"subject_identifiers":["[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[gdl:TM-Instance-Value"]},
- {"subject_identifiers":["[gdl:Default-Literal-Value]"]},
- {"subject_identifiers":["[gdl:Default-TM-Value]"]},
- {"subject_identifiers":["[gdl:Default-TM-Type-Value]"]},
- {"subject_identifiers":["[gdl:Default-TM-Single-Type-Value]"]},
- {"subject_identifiers":["[gdl:Default-TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[gdl:Default-TM-Instance-Value]"]},
- {"subject_identifiers":["[gdl:Delete-Button]"]},
- {"subject_identifiers":["[gdl:Create-Button]"]},
- {"subject_identifiers":["[gdl:Radio-Button]"]},
- {"subject_identifiers":["[gdl:Check-Box]"]},
- {"subject_identifiers":["[gdl:Space]"]},
- {"subject_identifiers":["[gdl:Text]"]},
- {"subject_identifiers":["[gdl:Title]"]},
- {"subject_identifiers":["[gdl:Reference]"]},
- {"subject_identifiers":["[gdl:List]"]},
- {"subject_identifiers":["[doc:default-tm-value-person-name-type-constraint]"], "instance_of":["si:[gdl:Default-TM-Instance-Value]"]},
- {"subject_identifiers":["[doc:person-name-type-constraint]"], "instance_of":["si:[gdl:Type]"]},
- {"subject_identifiers":["[doc:person-name-constraint]"], "instance_of":["si:[tmcl:topic-name-constraint]"], "occurrences":[{"type":"si:[tmcl:card-min]", "value":"1"}, {"type":"si:[tmcl:card-max]", "value":"1"}]},
- {"subject_identifiers":["[doc:person-name-reifier-constraint]"], "instance_of":["si:[tmcl:reifier-constraint]"], "occurrences":[{"type":"si:[tmcl:card-min]", "value":"1"}, {"type":"si:[tmcl:card-max]", "value":"1"}]},
- {"subject_identifiers":["[doc:person-name-scope-constraint]"], "instance_of":["si:[tmcl:scope-constraint]"], "occurrences":[{"type":"si:[tmcl:card-min]", "value":"0"}, {"type":"si:[tmcl:card-max]", "value":"2"}]},
- {"subject_identifiers":["[doc:person-name-regexp-constraint]"], "instance_of":["si:[tmcl:regular-expression-constraint]"], "occurrences":[{"type":"si:[tmcl:regexp]", "value":"^[A-Z][a-z]+ [A-Z][a-z]+$"}]},
- {"subject_identifiers":["[doc:unit-1-radio-button]"], "instance_of":["si:[gdl:Radio-Button]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_radio_button_id"},{"type":"si:[gdl:content-orientation]", "value":"horizontal"}, {"type":"si:[gdl:background-color]", "value": "lime"}, {"type":"si:[gdl:margin-left]", "value":"15pt"}, {"type":"si:[gdl:font-size]", "value":"8pt"}]},
- {"subject_identifiers":["[doc:unit-1-check-box]"], "instance_of":["si:[gdl:Check-Box]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_check_box_id"},{"type":"si:[gdl:content-orientation]", "value":"vertical"}, {"type":"si:[gdl:background-color]", "value": "lime"}, {"type":"si:[gdl:margin]", "value":"30pt"}, {"type":"si:[gdl:font-size]", "value":"8pt"}]},
- {"subject_identifiers":["[doc:unit-1-action-button]"], "instance_of":["si:[gdl:Action-Button]"], "occurrences":[{"type":"si:[gdl:id]","value":"unit_1_action_button"}]},
- {"subject_identifiers":["[doc:list-item-1]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding-bottom]", "value":"5px"}, {"type":"si:[gdl:margin-bottom]", "value":"5px"}]},
- {"subject_identifiers":["[doc:list-item-3]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"list_item_3_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:padding-bottom]", "value":"5px"}]},
- {"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]"}, {"type":"si:[gdl:resize]", "value":"both"}, {"type":"si:[gdl:border-style]", "value":"none"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}]},
- {"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]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_reference_id"},{"type":"si:[gdl:float]", "value":"left"}]},
- {"subject_identifiers":["[gdl:Info]"]},
- {"subject_identifiers":["[doc:info-1]"], "instance_of":["si:[gdl:Info]"], "occurrences":[{"type":"si:[gdl:id]", "value":"info_1_id"}]},
- {"subject_identifiers":["[doc:unit-1-text]"], "instance_of":["si:[gdl:Text]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_text_id"}, {"type":"si:[gdl:clear]","value":"right"}]},
- {"subject_identifiers":["[doc:unit-1-text-delete-button]"], "instance_of":["si:[gdl:Delete-Button]"], "occurrences":[{"type":"si:[gdl:id]","value":"unit_1_text_delete_button_id"}, {"type":"si:[gdl:font-size]", "value":"8px"}]},
- {"subject_identifiers":["[doc:unit-1-text-create-button]"], "instance_of":["si:[gdl:Create-Button]"], "occurrences":[{"type":"si:[gdl:id]","value":"unit_1_text_create_button_id"}, {"type":"si:[gdl:font-size]", "value":"8px"}]},
- {"subject_identifiers":["[doc:pos-of-unit-1-reference]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit-1-radio-button]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit-1-check-box]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit-1-action-button]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit-1-space]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit-1-text]"], "instance_of":["si:[gdl:Position]"]},
- {"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":["[doc:pos-of-title-1]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-text-1]"], "instance_of":["si:[gdl:Position]"], "occurrences":[{"type":"si:[gdl:position-style]", "value":"relative"}, {"type":"si:[gdl:top]", "value":"40px"}, {"type":"si:[gdl:left]", "value": "5%"}]},
- {"subject_identifiers":["[doc:pos-of-reference-1]"], "instance_of":["si:[gdl:Position]"], "occurrences":[{"type":"si:[gdl:position-style]", "value":"static"}]},
- {"subject_identifiers":["[doc:pos-of-list-box-1]"], "instance_of":["si:[gdl:Position]"], "occurrences":[{"type":"si:[gdl:position-style]", "value":"absolute"}, {"type":"si:[gdl:bottom]", "value":"5px"}, {"type":"si:[gdl:right]", "value":"5px"}]},
- {"subject_identifiers":["[doc:pos-of-person-list]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[doc:pos-of-unit]"], "instance_of":["si:[gdl:Position]"]},
- {"subject_identifiers":["[gdl:position-style]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:top]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:right]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:bottom]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:left]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:content-orientation]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:Unit]"]},
- {"subject_identifiers":["[gdl:Nth-Element]"]},
- {"subject_identifiers":["[gdl:nth-value]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[doc:nth-elem-1]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"0"}]},
- {"subject_identifiers":["[doc:nth-elem-2]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"7"}]},
- {"subject_identifiers":["[doc:nth-elem-3]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"8"}]},
- {"subject_identifiers":["[gdl:TM-Instance-Value]"]},
- {"subject_identifiers":["[doc:unit-1-space]"], "instance_of":["si:[gdl:Space]"], "occurrences":[{"type":"si:[gdl:id]", "value":"unit_1_space_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:width]", "value":"15px"}, {"type":"si:[gdl:height]", "value":"15px"}, {"type":"si:[gdl:background-color]", "value":"red"}]},
- {"subject_identifiers":["[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[doc:person-list]"], "instance_of":["si:[gdl:List]"], "occurrences":[{"type":"si:[gdl:id]", "value":"person_list_1_id", "datatype":"[xsd:ID]"}, {"type":"si:[gdl:margin]", "value":"50px"}, {"type":"si:[gdl:background-color]", "value":"#ccc"}]},
- {"subject_identifiers":["[gdl:tm-binding]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:id]"], "instance_of":["si:[tmcl:occurrence-type]"]},
- {"subject_identifiers":["[gdl:topic-view-binding]"], "instance_of":["si:[tmcl:association-type]"]},
- {"subject_identifiers":["[gdl:tm-construct]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:descriptor]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[gdl:tm-value]"], "instance_of":["si:[tmcl:role-type]"]},
- {"subject_identifiers":["[doc:musician/John_Lennon]"], "instance_of":["si:[doc:Musician]"]},
- {"subject_identifiers":["[doc:instance-value]"], "instance_of":["si:[gdl:TM-Instance-Value]"]},
- {"subject_identifiers":["[doc:multi-type-value-1]"], "instance_of":["si:[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[doc:multi-type-value-2]"], "instance_of":["si:[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[doc:multi-type-value-3]"], "instance_of":["si:[gdl:TM-Multiple-Type-Value]"]},
- {"subject_identifiers":["[gdl:Topic-View]"]},
- {"subject_identifiers":["[doc:nth-elem-del-btn]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"0"}]},
- {"subject_identifiers":["[doc:nth-elem-crt-btn]"], "instance_of":["si:[gdl:Nth-Element]"], "occurrences":[{"type":"si:[gdl:nth-value]", "value":"last"}]},
- {"subject_identifiers":["[gdl:Default-Topic-View]"]},
- {"subject_identifiers":["[gdl:Special-Topic-View]"]},
- {"subject_identifiers":["[gdl:Default-Creator-Topic-View]"]},
- {"subject_identifiers":["[gdl:Default-Editor-Topic-View]"]},
- {"subject_identifiers":["[gdl:Special-Creator-Topic-View]"]},
- {"subject_identifiers":["[doc:default-creator-topic-view-2]"], "instance_of":["si:[gdl:Default-Creator-Topic-View]"], "names":[{"value": "Def. Creator View 2", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"default_creator_topic_view_2_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:default-editor-topic-view]"], "instance_of":["si:[gdl:Default-Editor-Topic-View]"], "names":[{"value": "Def. Editor View", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"default_editor_topic_view_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:special-creator-topic-view]"], "instance_of":["si:[gdl:Special-Creator-Topic-View]"], "names":[{"value": "Spec. Creator View", "type":"si:[gdl:view-name]"}], "occurrences":[{"type":"si:[gdl:id]", "value":"special_creator_topic_view_id", "datatype":"[xsd:ID]"}]},
- {"subject_identifiers":["[doc:Person]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[doc:Poet]"]},
- {"subject_identifiers":["[doc:Musician]"]},
- {"subject_identifiers":["[doc:Director]"]}
- ],
- "associations":[{"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Descriptor]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Visible-Object]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Visible-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Topic-View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Topic-View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Special-Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-Topic-View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Creator-Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-Topic-View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Editor-Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Special-Topic-View]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Special-Creator-Topic-View]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Literal-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Single-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Multiple-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Instance-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-Literal-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-TM-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-TM-Single-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-TM-Multiple-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Default-TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Default-TM-Instance-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Instance-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:TM-Value]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:TM-Multiple-Type-Value]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Visible-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Text-Object]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Descriptor]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Position]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Text]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Title]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Reference]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:List-Box]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Visible-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:List]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Visible-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Space]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Descriptor]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Nth-Element]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Unit]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Text-Object]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Input-Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Input-Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Radio-Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Input-Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Check-Box]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Action-Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Action-Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Delete-Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Action-Button]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Create-Button]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Descriptor]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Value-Group]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[gdl:Descriptor]"},{"type":"si:[tmdm:subtype]", "player":"si:[gdl:Type]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:topic-name-constraint]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:person-name]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:musician-name]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:person-name]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:poet-name]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:person-name]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:director-name]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:Person]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:Director]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:Person]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:Poet]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:Person]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:Musician]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:regular-expression-constraint]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:reifier-constraint]"}]},
- {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:scope-constraint]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:test-schema]"},{"type":"si:[gdl:containee]", "player":"si:[doc:default-creator-topic-view-1]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:test-schema]"},{"type":"si:[gdl:containee]", "player":"si:[doc:default-creator-topic-view-2]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:test-schema]"},{"type":"si:[gdl:containee]", "player":"si:[doc:default-editor-topic-view]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:test-schema]"},{"type":"si:[gdl:containee]", "player":"si:[doc:special-creator-topic-view]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:test-schema]"},{"type":"si:[gdl:containee]", "player":"si:[doc:person-list]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:instance-value]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:musician/John_Lennon]"}]},
- {"type":"si:[gdl:topic-view-binding]", "roles":[{"type":"si:[gdl:tm-value]", "player":"si:[doc:instance-value]"}, {"type":"si:[gdl:descriptor]", "player":"si:[doc:default-editor-topic-view]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-1]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Musician]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-1]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Poet]"}]},
- {"type":"si:[gdl:topic-view-binding]", "roles":[{"type":"si:[gdl:tm-value]", "player":"si:[doc:multi-type-value-1]"}, {"type":"si:[gdl:descriptor]", "player":"si:[doc:default-creator-topic-view-1]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-2]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Musician]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-2]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Director]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-2]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Poet]"}]},
- {"type":"si:[gdl:topic-view-binding]", "roles":[{"type":"si:[gdl:tm-value]", "player":"si:[doc:multi-type-value-2]"}, {"type":"si:[gdl:descriptor]", "player":"si:[doc:default-creator-topic-view-2]"}]},
- {"type":"si:[gdl:topic-view-binding]", "roles":[{"type":"si:[gdl:tm-value]", "player":"si:[doc:multi-type-value-3]"}, {"type":"si:[gdl:descriptor]", "player":"si:[doc:special-creator-topic-view]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-3]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Musician]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:multi-type-value-3]"}, {"type":"si:[gdl:tm-construct]", "player":"si:[doc:Poet]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:title-1]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:text-1]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:reference-1]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:list-box-1]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:person-list]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:default-creator-topic-view-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-title-1]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:default-creator-topic-view-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:title-1]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-text-1]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:title-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:text-1]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-reference-1]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:text-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:reference-1]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-list-box-1]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:reference-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:list-box-1]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-person-list]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:list-box-1]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:person-list]"}]},
- {"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:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-reference]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-space]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-text]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-radio-button]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-check-box]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-action-button]"}]},
- {"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]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit-1-space]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:unit-1-reference]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-space]"}]},
- {"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-space]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-text]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit-1-radio-button]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:unit-1-text]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-radio-button]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit-1-check-box]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:unit-1-radio-button]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-check-box]"}]},
- {"type":"si:[gdl:position]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:pos-of-unit-1-action-button]"},{"type":"si:[gdl:ancestor]", "player":"si:[doc:unit-1-check-box]"}, {"type":"si:[gdl:descendant]", "player":"si:[doc:unit-1-action-button]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1-text]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-text-create-button]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1-text]"},{"type":"si:[gdl:containee]", "player":"si:[doc:unit-1-text-delete-button]"}]},
- {"type":"si:[gdl:button-position]", "roles":[{"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-crt-btn]"},{"type":"si:[gdl:action-button]", "player":"si:[doc:unit-1-text-create-button]"}]},
- {"type":"si:[gdl:button-position]", "roles":[{"type":"si:[gdl:nth-element]", "player":"si:[doc:nth-elem-del-btn]"},{"type":"si:[gdl:action-button]", "player":"si:[doc:unit-1-text-delete-button]"}]},
- {"type":"si:[gdl:contains]", "roles":[{"type":"si:[gdl:container]", "player":"si:[doc:unit-1-reference]"},{"type":"si:[gdl:containee]", "player":"si:[doc:info-1]"}]},
- {"type":"si:[gdl:view-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[doc:value-group-person-name]"},{"type":"si:[gdl:descriptor]", "player":"si:[doc:text-1]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[doc:value-group-person-name]"},{"type":"si:[gdl:tm-construct]", "player":"si:[doc:person-name-type-constraint]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:person-name-type-constraint]"},{"type":"si:[gdl:tm-construct]", "player":"si:[doc:person-name-constraint]"}]},
- {"type":"si:[gdl:value-binding]", "roles":[{"type":"si:[gdl:value-group]", "player":"si:[doc:value-group-person-name]"},{"type":"si:[gdl:value]", "player":"si:[doc:default-tm-value-person-name-type-constraint]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:default-tm-value-person-name-type-constraint]"},{"type":"si:[gdl:tm-construct]", "player":"si:[doc:Poet]"}]},
- {"type":"si:[gdl:tm-binding]", "roles":[{"type":"si:[gdl:descriptor]", "player":"si:[doc:person-name-type-constraint]"},{"type":"si:[gdl:tm-construct]", "player":"si:[doc:person-name-constraint]"}]},
- {"type":"si:[tmcl:constrained-statement]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:person-name]"},{"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-constraint]"}]},
- {"type":"si:[tmcl:constrained-topic-type]", "roles":[{"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-constraint]"},{"type":"si:[tmcl:constrained]", "player":"si:[doc:Person]"}]},
- {"type":"si:[tmcl:constrained-statement]", "roles":[{"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-regexp-constraint]"},{"type":"si:[tmcl:constrained]", "player":"si:[doc:person-name]"}]},
- {"type":"si:[tmcl:constrained-statement]", "roles":[{"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-reifier-constraint]"},{"type":"si:[tmcl:constrained]", "player":"si:[doc:person-name]"}]},
- {"type":"si:[tmcl:allowed-reifier]", "roles":[{"type":"si:[tmcl:allowed]", "player":"si:[doc:Reifier-Type]"},{"type":"si:[tmcl:allows]", "player":"si:[doc:person-name-reifier-constraint]"}]},
- {"type":"si:[tmcl:constrained-scope]", "roles":[{"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-scope-constraint]"},{"type":"si:[tmcl:constrained]", "player":"si:[doc:Scope-Type]"}]}
- ]}
\ No newline at end of file
Added: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.2.jtm
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.2.jtm Fri Aug 12 04:48:04 2011 (r723)
@@ -0,0 +1,54 @@
+{"version":"1.1",
+ "prefixes":{"tmcl":"http://psi.topicmaps.org/tmcl/",
+ "tmdm":"http://psi.topicmaps.org/iso13250/model/",
+ "doc":"http://psi.test.org/gdl-test/",
+ "gdl":"http://psi.isidor.us/gdl/"},
+ "item_type":"topicmap",
+ "item_identifiers":["[doc:gdl-test-tm-2]"],
+ "topics":[{"subject_identifiers":["[tmcl:topic-type]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:role-type]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:association-type]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:name-type]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:occurrence-type]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmdm:supertype]"], "instance_of":["si:[tmcl:role-type]"]},
+ {"subject_identifiers":["[tmdm:subtype]"], "instance_of":["si:[tmcl:role-type]"]},
+ {"subject_identifiers":["[tmdm:supertype-subtype]"], "instance_of":["si:[tmcl:association-type]"]},
+ {"subject_identifiers":["[tmcl:constraint]"], "instance_of":["si:[tmcl:topic-type]","si:[tmcl:role-type]"]},
+ {"subject_identifiers":["[tmcl:topic-name-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:topic-occurrence-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:subject-identifier-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:regular-expression-constraint]"], "instance_of":["si:[tmcl:constraint]"]},
+ {"subject_identifiers":["[tmcl:card-max]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[tmcl:card-min]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[tmcl:regexp]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[tmcl:constrained]"], "instance_of":["si:[tmcl:role-type]"]},
+ {"subject_identifiers":["[tmcl:constrained-statement]"], "instance_of":["si:[tmcl:role-type]"]},
+ {"subject_identifiers":["[tmcl:constrained-topic-type]"], "instance_of":["si:[tmcl:association-type]"]},
+
+ {"subject_identifiers":["[doc:Person]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[doc:Director]"]},
+
+ {"subject_identifiers":["[doc:born-in]"], "instance_of":["si:[tmcl:occurrence-type]"]},
+ {"subject_identifiers":["[doc:person-name]"], "instance_of":["si:[tmcl:name-type]"]},
+
+ {"subject_identifiers":["[doc:person-psi-constraint-general]"], "instance_of":["si:[tmcl:subject-identifier-constraint]"], "occurrences":[{"type":"si:[tmcl:regexp]", "value":".+"}, {"type":"si:[tmcl:card-min]", "value":"0"}, {"type":"si:[tmcl:card-max]", "value":"*"}]},
+ {"subject_identifiers":["[doc:person-psi-constraint-special]"], "instance_of":["si:[tmcl:subject-identifier-constraint]"], "occurrences":[{"type":"si:[tmcl:regexp]", "value":"http://psi.test.org/gdl-test/Person/.+"}, {"type":"si:[tmcl:card-min]", "value":"1"}, {"type":"si:[tmcl:card-max]", "value":"1"}]},
+ {"subject_identifiers":["[doc:director-psi-constraint]"], "instance_of":["si:[tmcl:subject-identifier-constraint]"], "occurrences":[{"type":"si:[tmcl:regexp]", "value":"http://psi.test.org/gdl-test/Director/.+"}, {"type":"si:[tmcl:card-min]", "value":"1"}, {"type":"si:[tmcl:card-max]", "value":"1"}]},
+
+ {"subject_identifiers":["[doc:person-name-constraint]"], "instance_of":["si:[tmcl:topic-name-constraint]"], "occurrences":[{"type":"si:[tmcl:card-min]", "value":"1"}, {"type":"si:[tmcl:card-max]", "value":"1"}]},
+ {"subject_identifiers":["[doc:person-name-regular-expression-constraint]"], "instance_of":["si:[tmcl:regular-expression-constraint]"]}
+ ],
+ "associations":[{"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:subject-identifier-constraint]"}]},
+ {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:topic-name-constraint]"}]},
+ {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:topic-occurrence-constraint]"}]},
+ {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[tmcl:constraint]"},{"type":"si:[tmdm:subtype]", "player":"si:[tmcl:regular-expression-constraint]"}]},
+ {"type":"si:[tmdm:supertype-subtype]", "roles":[{"type":"si:[tmdm:supertype]", "player":"si:[doc:Person]"},{"type":"si:[tmdm:subtype]", "player":"si:[doc:Director]"}]},
+
+ {"type":"si:[tmcl:constrained-topic-type]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:Person]"}, {"type":"si:[tmcl:constraint]", "player":"si:[doc:person-psi-constraint-general]"}]},
+ {"type":"si:[tmcl:constrained-topic-type]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:Person]"}, {"type":"si:[tmcl:constraint]", "player":"si:[doc:person-psi-constraint-special]"}]},
+ {"type":"si:[tmcl:constrained-topic-type]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:Director]"}, {"type":"si:[tmcl:constraint]", "player":"si:[doc:director-psi-constraint]"}]},
+
+ {"type":"si:[tmcl:constrained-statement]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:person-name]"}, {"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-constraint]"}]},
+ {"type":"si:[tmcl:constrained-statement]", "roles":[{"type":"si:[tmcl:constrained]", "player":"si:[doc:person-name]"}, {"type":"si:[tmcl:constraint]", "player":"si:[doc:person-name-regular-expression-constraint]"}]}
+ ]
+ }
\ No newline at end of file
Copied and modified: branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm (from r722, 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 Fri Aug 12 02:10:00 2011 (r722, copy source)
+++ branches/gdl-frontend/src/anaToMia/GDL_Widgets/war/gdl_widgets/test.gdl.jtm Fri Aug 12 04:48:04 2011 (r723)
@@ -52,7 +52,7 @@
{"subject_identifiers":["[tmcl:constrained-topic-type]"], "instance_of":["si:[tmcl:role-type]"]},
{"subject_identifiers":["[gdl:value]"], "instance_of":["si:[tmcl:role-type]"]},
{"subject_identifiers":["[tmcl:topic-name-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
- {"subject_identifiers":["[tmcl:regular-expression-constraint]"], "instance_of":["si:[tmcl:topic-type]"]},
+ {"subject_identifiers":["[tmcl:regular-expression-constraint]"], "instance_of":["si:[tmcl:association-type]"]},
{"subject_identifiers":["[gdl:Value-Group]"]},
{"subject_identifiers":["[gdl:Text-Object]"]},
{"subject_identifiers":["[gdl:Type]"]},
1
0
Author: lgiessmann
Date: Fri Aug 12 02:10:00 2011
New Revision: 722
Log:
trunk: rest-interface: fixed a bug when updated fragments of referenced topics that are other-players of a topic's association
Modified:
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 12 01:48:57 2011 (r721)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 12 02:10:00 2011 (r722)
@@ -530,10 +530,20 @@
(elephant:get-instances-by-value
'd:FragmentC 'd::topic (d:topic new-fragment))))
(let* ((rev (d:revision new-fragment))
+ (frg-top (d:topic new-fragment))
+ (frg-assocs
+ (delete-if #'null (map 'list (lambda(role)
+ (d:parent role :revision rev))
+ (d:player-in-roles frg-top :revision rev))))
(tops
- (loop for assoc in foreign-associations
- append (loop for role in (d:roles assoc :revision rev)
- collect (d:player role :revision rev)))))
+ (append
+ (loop for assoc in foreign-associations
+ append (loop for role in (d:roles assoc :revision rev)
+ collect (d:player role :revision rev)))
+ (delete frg-top
+ (loop for assoc in frg-assocs
+ append (loop for role in (d:roles assoc :revision rev)
+ collect (d:player role :revision rev)))))))
(map 'list (lambda(top)
(map 'list #'elephant:drop-instance
(elephant:get-instances-by-value
1
0
Author: lgiessmann
Date: Fri Aug 12 01:48:57 2011
New Revision: 721
Log:
trunk: rest-itnerface: fixed a compile error
Modified:
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 12 01:43:53 2011 (r720)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 12 01:48:57 2011 (r721)
@@ -541,36 +541,6 @@
(serialize-fragment (d:create-latest-fragment-of-topic top)
(fragment-serializer)))
(delete-duplicates (delete-if #'null tops)))))
-
-
-(defun update-fragments-after-commit (new-fragment)
- "Removes all fragments that belongs to the same topic that the
- new fragment is bound to, but are older than the new fragment.
- Updates all fragments that are bound to topics that are players
- of associations contained in the new fragment."
- (declare (FragmentC new-fragment))
- (map nil (lambda(frg)
- (when (not (eql frg new-fragment))
- (elephant:drop-instance frg)))
- (elephant:get-instances-by-value
- 'd:FragmentC 'd::topic (d:topic new-fragment)))
- (let* ((rev (d:revision new-fragment))
- (top (d:topic new-fragment))
- (tops-to-update
- (delete
- top
- (let ((assocs (map 'list (lambda(role)
- (d:parent role :revision rev))
- (d:player-in-roles top :revision rev))))
- (loop for assoc in assocs
- append (loop for role in (d:roles assoc :revision rev)
- collect (d:player role :revision rev)))))))
- (map nil (lambda(top)
- (map nil #'elephant:drop-instance
- (elephant:get-instances-by-value 'd:FragmentC 'd::topic top))
- (d:serialize-fragment (create-latest-fragment-of-topic top)
- (fragment-serializer)))
- tops-to-update)))
(defun return-topic-summaries(&optional param)
1
0

[isidorus-cvs] r720 - in trunk/src: json/isidorus-json rest_interface
by lgiessmann@common-lisp.net 12 Aug '11
by lgiessmann@common-lisp.net 12 Aug '11
12 Aug '11
Author: lgiessmann
Date: Fri Aug 12 01:43:53 2011
New Revision: 720
Log:
trunk: rest-interface: fixed a potential bug => if a foreign association is contained in a fragment, i.e. an association that is not bound to the actual main topic of the passed fragment, the corresponding fragments of all players of the foreign associations are updated
Modified:
trunk/src/json/isidorus-json/json_importer.lisp
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/json/isidorus-json/json_importer.lisp
==============================================================================
--- trunk/src/json/isidorus-json/json_importer.lisp Wed Aug 10 12:45:20 2011 (r719)
+++ trunk/src/json/isidorus-json/json_importer.lisp Fri Aug 12 01:43:53 2011 (r720)
@@ -38,7 +38,8 @@
(let ((psi-of-topic
(let ((psi-uris (getf topic-values :subjectIdentifiers)))
(when psi-uris
- (first psi-uris)))))
+ (first psi-uris))))
+ (committed-associations nil))
(elephant:ensure-transaction (:txn-nosync nil)
(xtm-importer:with-tm (rev xtm-id (first tm-ids))
(loop for topicStub-values in
@@ -47,10 +48,20 @@
:xtm-id xtm-id))
(json-merge-topic topic-values rev :tm xtm-importer::tm :xtm-id xtm-id)
(loop for association-values in associations-values
- do (json-to-association association-values rev
- :tm xtm-importer::tm))))
+ do (push (json-to-association association-values rev
+ :tm xtm-importer::tm)
+ committed-associations))))
(when psi-of-topic
- (create-latest-fragment-of-topic psi-of-topic)))))))
+ (let* ((frag (create-latest-fragment-of-topic psi-of-topic))
+ (foreign-assocs
+ (nset-difference
+ committed-associations
+ (map 'list (lambda(role)
+ (parent role :revision rev))
+ (player-in-roles (topic frag) :revision rev)))))
+ (list :fragment frag
+ :foreign-associations foreign-assocs))))))))
+
(defun json-to-association (json-decoded-list start-revision
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Wed Aug 10 12:45:20 2011 (r719)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 12 01:43:53 2011 (r720)
@@ -501,11 +501,15 @@
:force-text t)))
(with-writer-lock
(handler-case
- (let ((frag (json-importer:import-from-isidorus-json json-data)))
- (when frag
- (push-to-cache (d:topic frag))
- (update-list (d:topic frag)
- (d:psis (d:topic frag) :revision 0))))
+ (let ((result (json-importer:import-from-isidorus-json json-data)))
+ (when (getf result :fragment)
+ (update-fragments-after-commit
+ (getf result :fragment)
+ (getf result :foreign-associations))
+ (push-to-cache (d:topic (getf result :fragment)))
+ (update-list (d:topic (getf result :fragment))
+ (d:psis (d:topic (getf result :fragment))
+ :revision 0))))
(condition (err)
(progn
(setf (hunchentoot:return-code*)
@@ -515,6 +519,60 @@
(setf (hunchentoot:return-code*) hunchentoot:+http-bad-request+))))
+(defun update-fragments-after-commit (new-fragment foreign-associations)
+ "Deleted all old fragment that belongs to the topic that is bound to
+ the passed new-fragment. Deletes and creates a new fragment of all
+ players of any association of the passed list foreign-associations."
+ (declare (FragmentC new-fragment)
+ (List foreign-associations))
+ (map 'list #'elephant:drop-instance
+ (delete new-fragment
+ (elephant:get-instances-by-value
+ 'd:FragmentC 'd::topic (d:topic new-fragment))))
+ (let* ((rev (d:revision new-fragment))
+ (tops
+ (loop for assoc in foreign-associations
+ append (loop for role in (d:roles assoc :revision rev)
+ collect (d:player role :revision rev)))))
+ (map 'list (lambda(top)
+ (map 'list #'elephant:drop-instance
+ (elephant:get-instances-by-value
+ 'd:FragmentC 'd::topic top))
+ (serialize-fragment (d:create-latest-fragment-of-topic top)
+ (fragment-serializer)))
+ (delete-duplicates (delete-if #'null tops)))))
+
+
+(defun update-fragments-after-commit (new-fragment)
+ "Removes all fragments that belongs to the same topic that the
+ new fragment is bound to, but are older than the new fragment.
+ Updates all fragments that are bound to topics that are players
+ of associations contained in the new fragment."
+ (declare (FragmentC new-fragment))
+ (map nil (lambda(frg)
+ (when (not (eql frg new-fragment))
+ (elephant:drop-instance frg)))
+ (elephant:get-instances-by-value
+ 'd:FragmentC 'd::topic (d:topic new-fragment)))
+ (let* ((rev (d:revision new-fragment))
+ (top (d:topic new-fragment))
+ (tops-to-update
+ (delete
+ top
+ (let ((assocs (map 'list (lambda(role)
+ (d:parent role :revision rev))
+ (d:player-in-roles top :revision rev))))
+ (loop for assoc in assocs
+ append (loop for role in (d:roles assoc :revision rev)
+ collect (d:player role :revision rev)))))))
+ (map nil (lambda(top)
+ (map nil #'elephant:drop-instance
+ (elephant:get-instances-by-value 'd:FragmentC 'd::topic top))
+ (d:serialize-fragment (create-latest-fragment-of-topic top)
+ (fragment-serializer)))
+ tops-to-update)))
+
+
(defun return-topic-summaries(&optional param)
"returns a summary of the requested topics"
(declare (ignorable param))
@@ -610,7 +668,7 @@
(elephant:drop-instance fragment)))
(elephant:get-instances-by-value
'd:FragmentC 'd:topic result))
- (update-fragments result rev))
+ (update-fragments-after-delete result rev))
((typep result 'd:AssociationC)
(let ((players
(delete-if
@@ -656,7 +714,7 @@
-(defun update-fragments(deleted-topic delete-revision)
+(defun update-fragments-after-delete(deleted-topic delete-revision)
"Updates all fragments of topics that directly and indireclty
related to the delete-topic."
(declare (TopicC deleted-topic)
1
0
Author: lgiessmann
Date: Wed Aug 10 12:45:20 2011
New Revision: 719
Log:
trunk: rest-interface: fixed updated-fragments, that is invoked after a delete-operation. Now, it can handle multiple fragments that belongs to one topic
Modified:
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Wed Aug 10 07:55:51 2011 (r718)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Wed Aug 10 12:45:20 2011 (r719)
@@ -684,13 +684,20 @@
(loop for role in (roles inst :revision rev)
collect (d:player role :revision rev)))))))
(fragments
- (delete-if #'null
- (map 'list (lambda(top)
- (elephant:get-instance-by-value
- 'd:FragmentC 'd::topic top))
- (delete-duplicates
- (delete deleted-topic
- (delete-if #'null all-tops)))))))
+ (delete-if
+ #'null
+ (map 'list (lambda(top)
+ (let ((all-frgs
+ (sort
+ (elephant:get-instances-by-value
+ 'd:FragmentC 'd::topic top)
+ #'> :key 'revision)))
+ (let ((frg (first all-frgs)))
+ (map nil 'elephant:drop-instance (rest all-frgs))
+ frg)))
+ (delete-duplicates
+ (delete deleted-topic
+ (delete-if #'null all-tops)))))))
(map nil (lambda(frg)
(setf (slot-value frg 'd::serializer-cache) nil)
(d:serialize-fragment frg (fragment-serializer)))
1
0

10 Aug '11
Author: lgiessmann
Date: Wed Aug 10 07:55:51 2011
New Revision: 718
Log:
trunk: rest-interface: fixed a bug when updating the serializatiuon cache of fragments after another topic was deleted that was bound to an association which referenced other topics/fragments
Modified:
trunk/src/model/datamodel.lisp
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/model/datamodel.lisp
==============================================================================
--- trunk/src/model/datamodel.lisp Wed Aug 10 03:37:39 2011 (r717)
+++ trunk/src/model/datamodel.lisp Wed Aug 10 07:55:51 2011 (r718)
@@ -1577,7 +1577,7 @@
(when (or (and (not source-locator) sl-provided-p)
(and sl-provided-p
(some (lambda (psi) (string-starts-with (uri psi) source-locator))
- (psis top :revision 0))))
+ (psis top :revision revision))))
(mapc (lambda(psi)(mark-as-deleted psi :revision revision
:source-locator source-locator))
(psis top :revision revision))
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Wed Aug 10 03:37:39 2011 (r717)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Wed Aug 10 07:55:51 2011 (r718)
@@ -609,7 +609,8 @@
(when (eql (d:topic fragment) result)
(elephant:drop-instance fragment)))
(elephant:get-instances-by-value
- 'd:FragmentC 'd:topic result)))
+ 'd:FragmentC 'd:topic result))
+ (update-fragments result rev))
((typep result 'd:AssociationC)
(let ((players
(delete-if
@@ -654,6 +655,49 @@
(setf (hunchentoot:return-code*) hunchentoot:+http-bad-request+))))
+
+(defun update-fragments(deleted-topic delete-revision)
+ "Updates all fragments of topics that directly and indireclty
+ related to the delete-topic."
+ (declare (TopicC deleted-topic)
+ (Integer delete-revision))
+ (let* ((rev (1- delete-revision))
+ (all-tops
+ (append
+ (let ((assocs
+ (map 'list (lambda(role)
+ (d:parent role :revision rev))
+ (d:player-in-roles deleted-topic :revision rev))))
+ (loop for assoc in assocs
+ append (loop for role in (roles assoc :revision rev)
+ collect (d:player role :revision rev))))
+ (let ((items
+ (append (used-as-theme deleted-topic :revision rev)
+ (used-as-type deleted-topic :revision rev))))
+ (loop for item in items
+ when (or (typep item 'NameC) (typep item 'OccurrenceC))
+ collect (parent item :revision rev)
+ when (or (typep item 'RoleC) (typep item 'AssociationC))
+ append (let ((inst (if (typep item 'AssociationC)
+ item
+ (d:parent item :revision rev))))
+ (loop for role in (roles inst :revision rev)
+ collect (d:player role :revision rev)))))))
+ (fragments
+ (delete-if #'null
+ (map 'list (lambda(top)
+ (elephant:get-instance-by-value
+ 'd:FragmentC 'd::topic top))
+ (delete-duplicates
+ (delete deleted-topic
+ (delete-if #'null all-tops)))))))
+ (map nil (lambda(frg)
+ (setf (slot-value frg 'd::serializer-cache) nil)
+ (d:serialize-fragment frg (fragment-serializer)))
+ fragments)))
+
+
+
(defun return-latest-revision ()
"Returns an integer that represents the latest revision that
is used in the storage."
1
0
Author: lgiessmann
Date: Wed Aug 10 03:37:39 2011
New Revision: 717
Log:
trunk: rest-interface: fixed a bug when deleting newly created associations of a topic
Modified:
trunk/src/model/datamodel.lisp
Modified: trunk/src/model/datamodel.lisp
==============================================================================
--- trunk/src/model/datamodel.lisp Mon Aug 8 02:35:56 2011 (r716)
+++ trunk/src/model/datamodel.lisp Wed Aug 10 03:37:39 2011 (r717)
@@ -1595,7 +1595,9 @@
(occurrences top :revision revision))
(mapc (lambda (ass) (mark-as-deleted ass :revision revision
:source-locator source-locator))
- (find-all-associations top :revision 0))
+ (map 'list (lambda(role)
+ (parent role :revision revision))
+ (player-in-roles top :revision revision)))
(let ((ref (reified-construct top :revision revision)))
(when ref
(private-delete-reified-construct top ref :revision revision)))
1
0
Author: lgiessmann
Date: Mon Aug 8 02:35:56 2011
New Revision: 716
Log:
trunk: rest-interface: added an additional stage of http-basic-authentication => 0: no authenticoation; 1: the host page 'isidorus.html' requires authentication; 2: all json-commit-handlers require authentication; 3: all json-get-handlers require authentication; note each stage activates the authentication of the previous stage, e.g. stage 3 is stage 1 + 2 + 3
Modified:
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Sat Aug 6 18:54:30 2011 (r715)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Mon Aug 8 02:35:56 2011 (r716)
@@ -28,9 +28,11 @@
(defparameter *use-http-authentication* 0 "if this variable is set to > 0, the
host page will require basic
authentication. If it's value is set
- to > 1, all json handlers will require
- basic-authentication. If this value is
- set to 0, no authentication is required.")
+ to > 1, all json-commit handlers will require
+ basic-authentication. If this value is set to
+ > 2 all json-handlers require authentication.
+ If this value is set to 0, no authentication
+ is required.")
;the prefix to get a fragment by the psi -> localhost:8000/json/get/<fragment-psi>
@@ -167,7 +169,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-prefix
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional psi)
(with-http-authentication
(return-json-fragment psi)))
@@ -175,7 +177,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher get-rdf-prefix
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional psi)
(with-http-authentication
(return-json-rdf-fragment psi)))
@@ -183,7 +185,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-topic-stub-prefix
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional psi)
(with-http-authentication
(return-topic-stub-of-psi psi)))
@@ -191,7 +193,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-all-type-psis
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(with-http-authentication
(return-all-tmcl-types param)))
@@ -199,7 +201,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-all-instance-psis
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(with-http-authentication
(return-all-tmcl-instances param)))
@@ -207,7 +209,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-type-tmcl-url
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(declare (ignorable param))
(with-http-authentication
@@ -218,7 +220,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-instance-tmcl-url
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(declare (ignorable param))
(with-http-authentication
@@ -229,7 +231,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-overview
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(with-http-authentication
(return-overview param)))
@@ -245,7 +247,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher json-get-summary-url
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(with-http-authentication
(return-topic-summaries param)))
@@ -269,7 +271,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher latest-revision-url
- (if (> *use-http-authentication* 1)
+ (if (> *use-http-authentication* 2)
(lambda(&optional param)
(declare (ignorable param))
(with-http-authentication
@@ -278,7 +280,7 @@
hunchentoot:*dispatch-table*)
(push
(create-regex-dispatcher sparql-url
- (if *use-http-authentication*
+ (if (> *use-http-authentication* 1)
(lambda(&optional param)
(with-http-authentication
(return-tm-sparql param)))
1
0
Author: lgiessmann
Date: Sat Aug 6 18:54:30 2011
New Revision: 715
Log:
fixed ticket #118
Modified:
trunk/src/rest_interface/rest-interface.lisp
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/rest-interface.lisp
==============================================================================
--- trunk/src/rest_interface/rest-interface.lisp Fri Aug 5 04:02:12 2011 (r714)
+++ trunk/src/rest_interface/rest-interface.lisp Sat Aug 6 18:54:30 2011 (r715)
@@ -61,7 +61,9 @@
:*xtm-commit-prefix*
:*ready-to-die*
:die-when-finished
- :*sparql-url*))
+ :*sparql-url*
+ :*use-http-authentication*
+ :*users*))
(in-package :rest-interface)
@@ -89,6 +91,7 @@
(defvar *remote-backup-remote-address* "127.0.0.1")
(defvar *local-backup-remote-address* "127.0.0.1")
(defvar *shutdown-remote-address* "127.0.0.1")
+(defvar *users* (list (list :uname "admin" :passwd "admin")))
(defun start-admin-server ()
@@ -168,3 +171,15 @@
(hunchentoot:stop *atom-server-acceptor*))
(setf *atom-server-acceptor* nil)
(close-tm-store))
+
+
+(defmacro with-http-authentication (&rest body)
+ `(multiple-value-bind (username password) (hunchentoot:authorization)
+ (if (find-if (lambda(item)
+ (and (stringp (getf item :uname))
+ (stringp (getf item :passwd))
+ (string= (getf item :uname) username)
+ (string= (getf item :passwd) password)))
+ *users*)
+ ,@body
+ (hunchentoot:require-authorization "isidorus"))))
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 5 04:02:12 2011 (r714)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Sat Aug 6 18:54:30 2011 (r715)
@@ -12,18 +12,27 @@
;caching tables
(defparameter *type-table* nil "Cointains integer==OIDs that represent a topic
instance of a vylid type-topic")
+
(defparameter *instance-table* nil "Contains integer==OIDs that represent a topic
instance of a valid instance-topic")
+
(defparameter *overview-table* nil "Is of the following structure
((:topic <oid> :psis (<oid> <oid> <...>)) (...))
that represents a list of topics and their
valid psi object id's")
-
(defparameter *use-overview-cache* t "if this boolean vaue is set to t, the rest
interface uses the *verview-table*-list to
cache topics and their psis.")
+(defparameter *use-http-authentication* 0 "if this variable is set to > 0, the
+ host page will require basic
+ authentication. If it's value is set
+ to > 1, all json handlers will require
+ basic-authentication. If this value is
+ set to 0, no authentication is required.")
+
+
;the prefix to get a fragment by the psi -> localhost:8000/json/get/<fragment-psi>
(defparameter *json-get-prefix* "/json/get/(.+)$")
;the prefix to get a fragment by the psi -> localhost:8000/json/rdf/get/<fragment-psi>
@@ -107,78 +116,173 @@
;; e.g. a json error-message.
(push hunchentoot:+http-internal-server-error+ hunchentoot:*approved-return-codes*)
;; === html and css files ====================================================
- (push
- (create-static-file-dispatcher-and-handler ajax-user-interface-url ajax-user-interface-file-path "text/html")
- hunchentoot:*dispatch-table*)
-
- (dolist (script-path-and-url (make-file-path-and-url ajax-user-interface-css-directory-path ajax-user-interface-css-prefix))
- (let ((script-path (getf script-path-and-url :path))
- (script-url (getf script-path-and-url :url)))
- (push
- (create-static-file-dispatcher-and-handler script-url script-path)
- hunchentoot:*dispatch-table*)))
+ (if (> *use-http-authentication* 0)
+ (define-easy-handler (isidorus-ui :uri ajax-user-interface-url
+ :default-request-type :get)
+ ()
+ (with-http-authentication
+ (serve-file ajax-user-interface-file-path "text/html")))
+ (push
+ (create-static-file-dispatcher-and-handler
+ ajax-user-interface-url ajax-user-interface-file-path "text/html")
+ hunchentoot:*dispatch-table*))
+
+ (let ((files-and-urls
+ (make-file-path-and-url ajax-user-interface-css-directory-path
+ ajax-user-interface-css-prefix)))
+ (dotimes (idx (length files-and-urls))
+ (let ((script-path (getf (elt files-and-urls idx) :path))
+ (script-url (getf (elt files-and-urls idx) :url)))
+ (push
+ (create-static-file-dispatcher-and-handler script-url script-path)
+ hunchentoot:*dispatch-table*))))
;; === ajax frameworks and javascript files ==================================
- (dolist (script-path-and-url (make-file-path-and-url ajax-javascripts-directory-path ajax-javascripts-url-prefix))
- (let ((script-path (getf script-path-and-url :path))
- (script-url (getf script-path-and-url :url)))
- (push
- (create-static-file-dispatcher-and-handler script-url script-path)
- hunchentoot:*dispatch-table*)))
+ (let ((files-and-urls (make-file-path-and-url ajax-javascripts-directory-path
+ ajax-javascripts-url-prefix)))
+ (dotimes (idx (length files-and-urls))
+ (let ((script-path (getf (elt files-and-urls idx) :path))
+ (script-url (getf (elt files-and-urls idx) :url)))
+ (push
+ (create-static-file-dispatcher-and-handler script-url script-path)
+ hunchentoot:*dispatch-table*))))
;; === rest interface ========================================================
(push
(if *use-overview-cache*
- (create-regex-dispatcher json-get-all-psis #'cached-return-all-topic-psis)
- (create-regex-dispatcher json-get-all-psis #'return-all-topic-psis))
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-prefix #'return-json-fragment)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher get-rdf-prefix #'return-json-rdf-fragment)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-topic-stub-prefix #'return-topic-stub-of-psi)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-all-type-psis #'return-all-tmcl-types)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-all-instance-psis #'return-all-tmcl-instances)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-type-tmcl-url #'(lambda(&optional param)
- (declare (ignorable param))
- (return-tmcl-info-of-psis 'json-tmcl::type)))
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-instance-tmcl-url #'(lambda(&optional param)
- (declare (ignorable param))
- (return-tmcl-info-of-psis 'json-tmcl::instance)))
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-overview #'return-overview)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-commit-url #'json-commit)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher json-get-summary-url #'return-topic-summaries)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher mark-as-deleted-url #'mark-as-deleted-handler)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher xtm-commit-prefix #'xtm-import-handler)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher latest-revision-url #'return-latest-revision)
- hunchentoot:*dispatch-table*)
- (push
- (create-regex-dispatcher sparql-url #'return-tm-sparql)
+ (create-regex-dispatcher json-get-all-psis
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (cached-return-all-topic-psis param)))
+ #'cached-return-all-topic-psis))
+ (create-regex-dispatcher json-get-all-psis
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-all-topic-psis param)))
+ #'return-all-topic-psis)))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-prefix
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional psi)
+ (with-http-authentication
+ (return-json-fragment psi)))
+ #'return-json-fragment))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher get-rdf-prefix
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional psi)
+ (with-http-authentication
+ (return-json-rdf-fragment psi)))
+ #'return-json-rdf-fragment))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-topic-stub-prefix
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional psi)
+ (with-http-authentication
+ (return-topic-stub-of-psi psi)))
+ #'return-topic-stub-of-psi))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-all-type-psis
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-all-tmcl-types param)))
+ #'return-all-tmcl-types))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-all-instance-psis
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-all-tmcl-instances param)))
+ #'return-all-tmcl-instances))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-type-tmcl-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (declare (ignorable param))
+ (with-http-authentication
+ (return-tmcl-info-of-psis 'json-tmcl::type)))
+ (lambda(&optional param)
+ (declare (ignorable param))
+ (return-tmcl-info-of-psis 'json-tmcl::type))))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-instance-tmcl-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (declare (ignorable param))
+ (with-http-authentication
+ (return-tmcl-info-of-psis 'json-tmcl::instance)))
+ (lambda(&optional param)
+ (declare (ignorable param))
+ (return-tmcl-info-of-psis 'json-tmcl::instance))))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-overview
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-overview param)))
+ #'return-overview))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-commit-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (json-commit param)))
+ #'json-commit))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher json-get-summary-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-topic-summaries param)))
+ #'return-topic-summaries))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher mark-as-deleted-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (with-http-authentication
+ (mark-as-deleted-handler param)))
+ #'mark-as-deleted-handler))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher xtm-commit-prefix
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional tm-id)
+ (with-http-authentication
+ (xtm-import-handler tm-id)))
+ #'xtm-import-handler))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher latest-revision-url
+ (if (> *use-http-authentication* 1)
+ (lambda(&optional param)
+ (declare (ignorable param))
+ (with-http-authentication
+ (return-latest-revision)))
+ #'return-latest-revision))
+ hunchentoot:*dispatch-table*)
+ (push
+ (create-regex-dispatcher sparql-url
+ (if *use-http-authentication*
+ (lambda(&optional param)
+ (with-http-authentication
+ (return-tm-sparql param)))
+ #'return-tm-sparql))
hunchentoot:*dispatch-table*))
;; =============================================================================
@@ -462,17 +566,17 @@
"Returns a json-object representing a topic map overview as a tree(s)"
(declare (ignorable param))
(with-reader-lock
- (handler-case
- (let ((json-string
- (json-tmcl::tree-view-to-json-string
- (json-tmcl::make-tree-view :revision 0))))
- (setf (hunchentoot:content-type*) "application/json") ;RFC 4627
- json-string)
- (Condition (err)
- (progn
- (setf (hunchentoot:return-code*) hunchentoot:+http-internal-server-error+)
- (setf (hunchentoot:content-type*) "text")
- (format nil "Condition: \"~a\"" err))))))
+ (handler-case
+ (let ((json-string
+ (json-tmcl::tree-view-to-json-string
+ (json-tmcl::make-tree-view :revision 0))))
+ (setf (hunchentoot:content-type*) "application/json") ;RFC 4627
+ json-string)
+ (Condition (err)
+ (progn
+ (setf (hunchentoot:return-code*) hunchentoot:+http-internal-server-error+)
+ (setf (hunchentoot:content-type*) "text")
+ (format nil "Condition: \"~a\"" err))))))
(defun mark-as-deleted-handler (&optional param)
@@ -762,6 +866,18 @@
*overview-table*))
(psi-oids (map 'list #'elephant::oid psis)))
(if node
- (dolist (psi psi-oids)
+ (dolist (psi psi-oids)1
(pushnew psi (getf node :psis) :test #'=))
- (push (list :topic top-oid :psis psi-oids) *overview-table*)))))
\ No newline at end of file
+ (push (list :topic top-oid :psis psi-oids) *overview-table*)))))
+
+
+(defun serve-file (file-path &optional mime-type)
+ "Returns a stream of the corresponding file."
+ (with-open-file (in file-path :direction :input
+ :element-type 'flex:octet)
+ (when mime-type
+ (setf (hunchentoot:content-type*) mime-type))
+ (let ((data (make-array (file-length in)
+ :element-type 'flex:octet)))
+ (read-sequence data in)
+ data)))
\ No newline at end of file
1
0
Author: lgiessmann
Date: Fri Aug 5 04:02:12 2011
New Revision: 714
Log:
trunk: rest-interface: changed the serialization-handler of json-fragments
Modified:
trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/rest_interface/set-up-json-interface.lisp
==============================================================================
--- trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 5 00:51:26 2011 (r713)
+++ trunk/src/rest_interface/set-up-json-interface.lisp Fri Aug 5 04:02:12 2011 (r714)
@@ -340,8 +340,9 @@
(let ((fragment (get-latest-fragment-of-topic identifier)))
(if (and fragment (find-item-by-revision (topic fragment) 0))
(handler-case
- (export-construct-as-isidorus-json-string
- fragment :revision 0)
+ (d:serialize-fragment fragment (fragment-serializer))
+ ;(export-construct-as-isidorus-json-string
+ ;fragment :revision 0)
(condition (err)
(progn
(setf (hunchentoot:return-code*)
1
0