 Hello everybody, I'm Anka from the xwiki project and in the next 15 minutes We're gonna see how we implemented Annotations on documents the extensible wiki way and you'll soon understand what that means So a bit about xwiki xwiki is an enterprise Application wiki written in Java. It's been there for six years. I've been a committer for almost three years now That's from 2010 23 committers 12 commits per day for issues fixed per day, which is quite good Now what's enterprise application wiki? What's that application wiki most important? Well, first it means that it's a wiki it has the documents it has enterprise level collaboration features around these documents and Besides that it has extensibility features to allow users to create situational applications Meaning that users would normal users would go in the web interface of the wiki. They will define data types and and they will fill in data for those data types Store it in the wiki and then write a little bit of scripting to use that data to create little applications and We have actually I have actually done that. You're gonna see how it works in the demo Now about these annotations the first time I use the annotations seriously was when I was preparing my Bachelor of Science thesis and I was Creating these PDFs sending them to my supervisor. My supervisor was filling them with yellow stuff Hopefully after a couple of months I managed to get a non yellow paper to actually do the thesis and So he was giving me various suggestions Don't rephrase that don't write it like this and so on and so on So we were exchanging these documents between me and him now imagine that I have a colleague I want to write the paper with and some other professor. I want to to annotate to review my paper and You can see that's already a bit too much Communication and if we add some more people and some more people it becomes a whole big pile of mess We don't know where the paper is which one is the latest version which review is for which version and so on Of course, obviously the solution is to do this in a wiki Could have I could have put some smiley faces on those people actually So we you have authors that collaborate in the wiki to create the paper You have the reviewers that also do the annotations on top of that paper in that wiki and everything is everything is Integrated in the same system so you can see always the latest version latest modifications latest reviews and so on Let's see how that actually happens in x wiki So this is a demo time Where I have to find the correct window now I've created this very Interesting document about x week about fuzz them which I shamelessly copied from the internet and we can see that some people Have added some annotations like this one here You can see the little icon you can read the text but you can also see the annotations on top of it For example, this one is a is a rephrasing suggestion instead of to meet to This is a suggestion to do to meet in order to this is a little Explanation like on top explanation like a little comment if you want a contextual comment And this is also a suggestion to remove this part whatever I Can also add a new annotation for example on open source. I'm gonna say that So I select I hit the keyboard shortcut and I get this window and I type my annotation say in as defined by OC and I'm gonna put a link to OC The open source initiative for if anyone, but I guess no one So now I have this annotation here Which is being printed in the in the tooltip, but as I said x wiki is a X wiki is an extensible wiki you can actually define data and then do stuff with that data So this table here. I generated from structured data, which I store in the wiki. It's a table of very fictive speakers So let's look a bit of the source of this of this part of the table Here it is. I hope you see it. Do you see it? Should I make it bigger? This is actually the source of that table as you can see none of the content Which is displayed in the page is actually stored anywhere in the content of the page It's stored in some objects attached to this page And there's a little bit of velocity script there that the iterates through all the objects and displays them now It's very interesting that we can actually annotate this Even if the content is not there So I will select this and I will add my annotation rephrase To strong word Add a notation And I can see the annotation here the same for this RSS macro Which displays the latest the latest articles from the FOSM RSS feed I can add this annotation here and everything works fine even if it's not in the source of the document Now how does this work? How can I annotate stuff which are not actually in the document? It's all because of the Rendering engine of xwiki and the way it works So you have the page in wiki syntax the content of the page and this page is parsed in an abstract Abstract syntax tree which has a node for every entity if you want every Entity in the model of the page that you that you find a word is actually the text that will get displayed And then various paragraph link and so on the macros that we've seen the little piece of a script is a macro and The content that is generated by this macro is also generated in the tree It's a bit gray here because it doesn't actually exist in the source. It will be generated in the tree so then We take the annotations and we map them on this tree How does this work the annotations are stored as the actual text that the user has selected with a bit of Context around it to make sure that I can I can find the unique the unique place because it can appear multiple times And so on and so the text is red is mapped on this tree And then this tree is rendered into whatever in this case html This strategy comes in very handy when you think that xwiki is a is a is a polyglot wiki You can have various syntaxes for the input like wiki syntax x wiki syntax media wiki syntax And so on and various formats for the output like html or some other things you might want to think of So it's very interesting that you have annotations at the tree level because it will work with any input and any output And that's really really cool Now a wiki is mainly about editing right you might have already thought about that What will happen if I edit the text on which I added the annotation? So let's see I will I will perform the modification here and I will remove this part Let's perform the modification to meet in order In order to and the suggestion said let's remove this part here Do you want me to close my tweet deck? Somebody's harassing so My rotation has turned orange. You can see it here. And if I hover I have a I Have a text telling me what was the original text and what's the current text? I can also validate it and say okay. It still makes sense where it is or I can delete it if I don't like it. Let's validate it and Here it has disappeared, but I haven't lost my annotation Because I can go to the annotations tab and I find it here I find the original text of the annotation and the fact that it was removed the red icon Indicates the fact that it was removed from the page. I couldn't map it on the page So what else now what will happen? I? Showed you the the rendered content the generated content which is annotated. What will happen if I edit that? Assuming that I want to not display people in a in a table anymore Now you can see how easy it is to actually program in xwiki and I want to put them in a list I want to put first the name of the speaker followed by Semi-colon with the name of the talk and in parentheses. I want to put the name of the project from which the speaker comes I hope I'll get this property name right okay, and There the structure has changed But my annotation has still still stays there as you assume The same will happen if a new feed comes in and if the RSS macro changes or whatever it It it it works and it manages to To find the place of the annotation Because of that because it's actually the text which is being annotated as long as it is in the page It works and also if it modifies I'll I'll show later now As I've explained you can store a structured data and operate with it But annotations are nothing else but this structured data So what if I want for example in the case of this annotation? I wanted to put a to put a URL. What if I want to actually To actually store this URL in a field so that I know that it's a URL that that Provides more information about the annotation. Let's do that I'm going to go to the class that defines the annotation structure there, I'm gonna say edit and I'm gonna want to edit the class We can see here all the fields about the selection and everything and I will add one called reference and of type string I Added I see it here. I can do a little bit of configuration Like say I want to change the pretty name. I want it to appear as URL. I Do save and view I do save and view I go back to my document using this great great Feature if I want to edit this annotation you see I already have the field here and if I want to edit it My field is already here. I can fill it in and I can see it under the URL field, which is quite great now This customization of the annotations type and annotations UI We can see More of it done in the Socracy project Which is a project that aims to provide an online environment for political debate for regular users Like not necessarily political people, but regular users They have these articles which they comment they discuss and so on and here we customize it quite a lot You have a mood of your of your annotation. You have various other fields. I can say for example that I Annotate this I say that it's I can I can choose various type. I say it's an appreciation Suggestion I am furious because the idea is not new not clear and I completely disagree with it. I Add my annotation and I can see it colored according to the mood and so on I can also filter the annotations by various criteria to only see in the page the ones that I want Which is quite interesting and easy easy to do in xwiki because it's just a layer on top of the UI you'll see Then it's not only the UI that you can customize in the In the annotations for example for the screba project, which is a which is a project between various Various participants that aims to provide automatic annotations automatic semantic annotations on content and and images and everything How do we do it at in xwiki? You can actually take the content of a document send it to an external annotator which will generate some annotations in an rdf data store and and Then display the annotations on the on the wiki page So I can say analyze this document and now the automatic annotation Annotate annotators are running and it automatically generated these annotations on the page I can see that for them has been identified as an organization All these people here which now have some real names have been identified as persons and And so on How come all this is possible? It's possible because of the modular of the modular structure of xwiki There's the annotation core that uses a rendering module to do the rendering of annotations the maintainer Which I talked about which identifies the moment when a when a document updates and automatically Readjust the annotation to still make sense and the annotation storage the annotation storage by default is implemented using xwiki objects and so on but for screbo We could very easily just change this module do it to make it so that it fetches data from an rdf store Everything has remained unchanged and still still it works on top of xwiki Then we have this rest module This is a rest interface that provides the data to to the annotations UI Which is very flexible due to the J6 and this a 6 extensions which deserve a talk all by their own and For so crazy we just adjusted bit a bit this part everything remained unchanged and it still works properly on top of the xwiki So thank you very much. You have the URLs here If you download xwiki now and test it you get a pen and the sticker and if you write an extension for xwiki Send us an email and we'll send you a t-shirt because You can do that since it's a very very extensible platform. Thank you The dreadful clock shows that I still have one minute one minute and a half. So are there any questions? questions Sorry, we tried that you mean you mean chatting in the wiki. We tried that it wasn't very I The question is if there if we have an extension for chatting in the wiki We tried that it's quite easy to do actually with an xmpp javascript library It's very doable and without changing anything on the server side just writing a little little Yeah, and we have an IRC bot that stores reads from IRC and stores in the wiki. Yes No, it doesn't have to remain the same it works It just detects that everything was changed. It also detects when the annotation is changed and the text and it adjusts automatically Nothing has to remain the same