Ticket #418 (closed defect: fixed)

Opened 1 year ago

Last modified 1 month ago

Update Annotation data model (After #357 is done)

Reported by: pradeep Assigned to: pradeep
Priority: critical Milestone: 0.9.1
Component: ambra Version: 0.8
Keywords: Cc:
Blocking: Blocked By: 780

Description (Last modified by amit)

  • clean-up the usage of topaz:state.
  • use proper xsd:data type for all fields
  • do data migration
  • Clean up rdf:type usage or lack thereof

Dependency Graph

Change History

(follow-up: ↓ 2 ) 07/11/07 23:06:41 changed by ebrown

  • status changed from new to closed.
  • resolution set to fixed.

(In [3158]) fixes #418 annotated.groovy finiky - adding parenthesis fixed it

The minus restriction added in [3095] worked fine without dates, but when restricting with dates, it barfs without parenthesis.

(in reply to: ↑ 1 ) 07/11/07 23:08:28 changed by ebrown

  • status changed from closed to reopened.
  • resolution deleted.

Replying to ebrown:

(In [3158]) fixes #418 annotated.groovy finiky - adding parenthesis fixed it

Oops, meant to fix #481. This is not fixed and this comment doesn't apply.

07/20/07 10:13:28 changed by amit

  • version set to 0.8.
  • milestone changed from Bugs to 0.9.

09/02/07 22:41:40 changed by

  • milestone deleted.

Milestone 0.9 deleted

01/11/08 08:20:50 changed by amit

  • priority changed from medium to high.
  • status changed from reopened to new.
  • component changed from topaz to publishing-app.
  • description changed.
  • milestone set to pubApp_0.8.2.1.

01/29/08 19:10:37 changed by pradeep

  • owner changed from pradeep to russ.

This essentially is a data migration of untyped literals to typed literals that need to be done prior to the deployment of a version that has the xsd data types added. Tasks:

1. Annotea.java needs to be updated to have xsd:dateTime datatype for a:created and xsd:int. The following patch need to be applied:

--- src/main/java/org/plos/models/Annotea.java  (revision 4594)
+++ src/main/java/org/plos/models/Annotea.java  (working copy)
@@ -42,7 +42,7 @@
   private String                                            title;
   @Predicate(uri = Rdf.dc_terms + "mediator")
   private String                                            mediator;
-  @Predicate(uri = Rdf.topaz + "state", dataType = Predicate.UNTYPED)
+  @Predicate(uri = Rdf.topaz + "state")
   private int                                               state;

2. topaz:state values in the database for Annotations and Replys need to be updated with the xsd:int and a:created values in the database (model = ri) need to be update with xsd:dateTime.

This also requires access to mulgara on production. Russ, I am passing this on to you since it is a somewhat synchronized data migration. The data migration needs to happen before bringing up a version with the above code update.

What is the down-side of not applying this patch and doing the data migration - well nothing really. OTM is capable of loading and saving untyped literals. So it really is a nice to have patch and datamigration. So it is up to you to decide when and how to do the migration.

btw: #357 must be fixed and it is a fairly simple data migration step

(follow-up: ↓ 8 ) 02/20/08 11:58:34 changed by russ

  • owner changed from russ to pradeep.

okay #357 is complete.

it's unclear to me from the description above what changes need to be made to mulgara - i don't need full ITQL statements, but if you can tell me what triples i'm looking for and what changes/inserts/deletes need to me made that would be helpful!

it's also unclear to me whether this ticket NEEDS to be in this milestone.

  • can we wait on this for later?
  • or does the completion of #357 mean that we need to do both migration and code change now?
  • or have we already made the code change therefore we need to do the migration now before going live with 0.8.2.1?

thanks!

(in reply to: ↑ 7 ) 02/20/08 15:14:33 changed by pradeep

Replying to russ:

okay #357 is complete.

Great!

it's unclear to me from the description above what changes need to be made to mulgara - i don't need full ITQL statements, but if you can tell me what triples i'm looking for and what changes/inserts/deletes need to me made that would be helpful!

The basic idea is to convert all (well, most) literal values from un-typed to typed. ie. from 'value' to 'value'<xsd:foo-type>. Not doable with ITQL alone. You need to select the candidate statements and delete the current untyped version and insert the new typed version. Change the OTM @Predicate annotation to add a dataType='...' to ensure that future updates all create typed literals.

it's also unclear to me whether this ticket NEEDS to be in this milestone. * can we wait on this for later?

Sure.

* or does the completion of #357 mean that we need to do both migration and code change now?

No.

* or have we already made the code change therefore we need to do the migration now before going live with 0.8.2.1?

No.

02/21/08 10:50:44 changed by russ

  • owner changed from pradeep to rich.
  • milestone deleted.

wonderful.

removing from this milestone, assigning to rich to figure out next steps...

07/31/08 23:51:43 changed by amit

  • blocking changed.
  • blockedby changed.
  • milestone set to 0.9.1.

09/08/08 16:17:44 changed by dragisak

  • owner changed from rich to ronald.

09/08/08 17:21:07 changed by dragisak

  • blockedby set to 780.

09/19/08 00:13:03 changed by amit

  • owner changed from ronald to pradeep.

10/14/08 19:19:37 changed by amit

  • priority changed from high to critical.

10/14/08 19:54:18 changed by amit

We should look at making a few more modifications here.

10/17/08 06:40:26 changed by pradeep

(In [6541]) Use generics for annotea:body. Addresses #418.

10/17/08 06:40:34 changed by pradeep

(In [6542]) Convert topaz:state to use an xsd:int data-type. Addresses #418.

10/27/08 12:52:24 changed by pradeep

  • status changed from new to closed.
  • resolution set to fixed.

(In [6604]) getType() in Annotea is now abstract. Persistable 'type' property is now only available for Reply objects.

Also moved getWebType() to Annotea. This fixes a subtle bug related to getType() being used as the basis for getWebType and therefore having getType() for Reply objects masking the Reply Type.

This means there are replies in the database that doesn't have an rdf:type of http://www.w3.org/2001/12/replyType#Comment Currently ambra does not rely on this. But it is better to do the following update on the production databases:

insert select $s <rdf:type> <http://www.w3.org/2001/12/replyType#Comment>
from <...> where $s <rdf:type> <http://www.w3.org/2001/03/thread#Reply>
into <...>;

This closes #418.