free web site hit counter

The Sun BabelFish Blog

Don't panic !

Thursday Apr 17, 2008

KiWi: Knowledge in a Wiki

KiWi logo

Last month I attended the European Union KiWi project startup meeting in Salzburg, to which Sun Microsystems Prague is contributing some key use cases.

KiWi is a project to build an Open Source Semantic Wiki. It is based on the IkeWiki [don't follow this link if you have Safari 3.1] Java wiki, which uses the Jena Semantic Web frameworks, the Dojo toolkit for the Web 2.0 functionality, and any one of the Databases Jena can connect to, such as PostgreSQL. KiWi is in many ways similar to Freebase in its hefty use of JavaScript, and its emphasis on structured data. But instead of being a closed source platform, KiWi is open source, and builds upon the Semantic Web standards. In my opinion it currently overuses JavaScript features, to the extent that all clicks lead to dynamic page rewrites that do not change the URL of the browser page. This I feel unRESTful, and the permalink link in the socialise toolbar to the right does not completely remove my qualms. Hopefully this can be fixed in this project. It would be great also if KIWI could participate fully in the Linked Data movement.

The meeting was very well organized by Sebastian Schaffert and his team. It was 4 long days of meetings that made sure that everyone was on the same page, understood the rules of the EU game, and most of all got to know each other. (see kiwiknows tagged pictures on flickr ). Many thanks also to Peter Reiser for moving and shaking the various Sun decision makers to sign the appropriate papers, and dedicate the resources for us to be part of this project.

You can follow the evolution of the project on the Planet Kiwi page.

Anyway, here is a video that shows the resourceful kiwi mascot in action:

Wednesday Feb 06, 2008

replacing ant with rdf

Tim Boudreau just recently asked "What if we built Java code with...Java?". Why not replace Ant or Maven xml build documents with Java (Groovy/Jruby/jpython/...) scripts? It could be a lot easier to program for Java programmers, and much easier to understand for them too. Why go through xml, when things could be done more simply in a universal language like Java? Good question. But I think it depends on what types of problem one wants to solve. Moving to Java makes the procedural aspect of a build easier to program for a certain category of people. But is that a big enough advantage to warrant a change? Probably not. If we are looking for an improvement, why not explore something really new, something that might resolve some as yet completely unresolved problems at a much higher level? Why not explore what a hyperdata build system could bring to us? Let me start to sketch out some ideas here, very quickly, because I am late on a few other projects I am meant to be working on.

The answer to software becoming more complicated has been to create clear interfaces between the various pieces, and have people specialise in building components to the interfaces. It's the "small is beautiful" philosophy of Unix. As a result though, as software complexity builds up, every piece of software requires more and more pieces of other software, leading us from a system of independent software pieces to networked software. Let me be clear. The software industry has been speaking a lot about software containing networked components and being deployed on the network. This is not what I am pointing to here. No I want to emphasise that the software itself is built of components on the network. Ie. we need more and more a networked build system. This should be a big clue as to why hyperdata can bring something to the table that other systems cannot. Because RDF is a language whose pointer system is build on the Universal Resource Identifier (URI) it eats networked components for lunch, breakfast and dinner. (see my Jazoon presentation).

Currently my subversion repository consists of a lot of lib subdirectories full of jar files taken from other projects. Would it not be better if I referred to these libraries by URL instead? The URL where they can be HTTP gotten from of course? Here are a few advantages:

  • it would use up less space in my SubVersion repository. A pointer just takes up less space than an executable in most cases.
  • it would use up less space on the hard drive of people downloading my code. Why? Because I am referring to the jar via a universal name, a clever IDE will be able to use the local cached version already downloaded for another tool.
  • it would make setting up IDE's a lot easier. Again because each component now has a Universal Name, it will be possible to link up jars to their source code once only.
  • the build process, describing as it does how the code relates to the source, can be used by IDEs to jump to the source (also identified via URLs) when debugging a library on the network. (see some work I started on a bug ontology called Baetle)
  • Doap files can be then used to tie all these pieces together, allowing people to just drag and drop projects from a web site onto their IDE, as I demonstrated with Netbeans
  • as IDE gain knowledge of which components are successors to which other components, from such DOAP files, it is easy to imagine them developing RSS like functionality, where it scans the web for updates to your software components, and alerts you to those updates which you can then test out quickly yourself.
  • The system can be completely decentralised, making it a WEB 3.0 system, rather than a web 2.0 system. It should be as easy as having to place your components and your RDF file on a web server served up with the correct mime types.
  • It will be easy to link up jars or source code ( referred to as usual by URLs ) to bugs (described via something like Baetle ). Making it easy to describe how bugs in one project depend on bugs in other projects.

So here are just a few of the advantages that a hyperdata based build system could bring. They seem important enough in my opinion to justify exploring this in more detail. Ok. Well, let me try something here. When compiling files one needs the following: a classpath and a number of source files.

@prefix java: <http://rdf.sun.com/java/> .

_:cp a java:ClassPath;
       java:contains ( <http://apache.multidist.com/cocoon/2.1.11> <http://openrdf.org/sesame/2.0/> ) .

_:outputJar a java:Jar;
       java:buildFrom <src>;
       java:classpath _:cp .

_:outputJar 
        :pathtemplate "dist/${date}/myprog.jar";
        :fullList <outputjars.rdf> .
If the publication mechanism is done correctly the relative URLs should work on the file system just as well as they do on the http view of the repository. Making a jar would then be a matter of some program following the URLs to download all the pieces (if needed), put them in place and use that to build the code. Clearly this is just a sketch. Perhaps someone else has already had thoughts on this?

Friday Oct 05, 2007

Doap Bean available

I have just made the NetBeans Doap Bean available on the plugin portal. Just download onto your desktop and install in a version of NetBeans 6 (check Tools < Plugins in the menu)

This is the module I demonstrated at James Gosling's 'fun things' presentation on NetBeans day in San Francisco. I have updated the code to make it easy to understand for people who would wish to emulate and enhance it. It is easy to do that. Install the plugin, and go to the https://sommer.dev.java.net/ project. Then drag the blue button next to the URL

from your browser (I have checked that it works with Safari and Firefox on OSX) onto the DOAP button on the toolbar. This will fetch the information from the web page and pop up a window with a human readable representation of the RDF. This window should look like this:

window describing the so(m)mer project

Clicking on the other tabs will show you the original RDF/XML or an easier to read Turtle representation of the data. It is really important to show these tabs so that you can distinguish good from bad doap. Of course one can also go to the W3C Validator for an independent opinion.
In any case if the source code is available via a CVS or Subversion repository, you should be able to download it with just the click on the "download" button. (Make sure that NetBeans knows where your svn command line tool is though, by going to the menu Versioning &gr; Subversion > Checkout... )

If you want to try dropping other projects onto the button go to DoapSpace, they have put together a large collection of doap files for all the projects on SourceForge, Freshmeat and PyPi.

As I mention this is really only version 0.1 of the doap integration of Netbeans. Clearly one could do a lot more, such as:

  • Having it produce Doap for a project automatically
  • Tying it into NetBeans's Project panel
  • describing the relationships a project and others it depends on
  • Linking bug reports to information gleaned from the doap:bugdatabase relation
  • Perhaps see if one can set things up so that one can immediately find the javadoc online for a doap project one has information of
  • find a way to view source on a jar, by relating jars to source code repositories... (more difficult this one)
  • and a lot more...

Now you may wonder: How is one going to know that there is a doap link on some project's source page? Searching for the doap link seems a lot of work, right? Well to get an idea of how things will integrate you can install the Firefox Semantic Radar plugin, and go to the So(m)mer project again. You will then see displayed at the bottom of your browser an icon of square smiley faces, as shown on the following screenshot

semantic radar icon in Firefox

I should probably add this icon to the Doap button come to think of it...
The Doap button is in the So(m)mer repository, which is all published under the very generous BSD licence, so you are welcome to help out and add your own features... I may be having to work on a few other things next, so I won't be getting in your way :-)

Wednesday Oct 03, 2007

Turtle support for NetBeans 6

Yesterday I added NTriples support for NetBeans. Today it was the turn of Turtle, a notation for RDF that takes human writers into account, and that is carefully being looked after by Dave Beckett, who now works at Yahoo!, on some project which seems to be leading to employment opportunities . Of course making things simple for humans, makes things more complicated for the computer. But not so complex, that I did not get most of it done in one day.

Turtle makes things more readable because it allows one to

  • declare namespaces, so as not to have to constantly write out the URLs in full
  • declare a base url
  • use relative urls
  • some punctuation shorthands:
    • use "," when you have sentences that have the same subject and predicate but different objects
    • use ";" when you have sentences that have the same subject but different predicates and objects
  • [] for anonymous nodes (nodes you can't be bothered to give a URL to). You can place predicate object statements into the brackets, meaning that their subject is the anonymous node.
  • ( a b c ) shorthand for lists
Here for example is a section of my foaf file in Turtle:
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix : <http://bblfish.net/people/henry/card#> .

:me    a foaf:Person;
       foaf:depiction <http://farm1.static.flickr.com/164/373663745_1801c2dddf.jpg?v=0>;
       foaf:openid <http://openid.sun.com/bblfish> ;
       foaf:gender "male";
       foaf:birthday "07-29";
       foaf:title "Mr";
       foaf:family_name "Story";
       foaf:givenname "Henry";
       foaf:name "Henry J. Story";
       foaf:homepage <http://bblfish.net/>;
       foaf:schoolHomepage <http://www.bbk.ac.uk/phil/>,
                           <http://www.doc.ic.ac.uk/>,
                           <http://www.kcl.ac.uk/kis/schools/hums/philosophy/>;
       foaf:mbox <mailto:henry.story@bblfish.net>,
                 <mailto:henry.story@gmail.com>,
                 <mailto:henry.story@sun.com>;
       foaf:nick "bblfish".
This is clearly much easier to read and to write that NTriples, but it hides somewhat the fact that everything is named by a URL.

There are again two main sections to the NetBeans Schliemann file (view the current version)

TOKEN:space:( [" " "\t" "\n" "\r"]+ ) #unicodify
TOKEN:comment:("#" [^ "\n" "\r"]* ["\n" "\r"]+ )
TOKEN:bnode:( "_:" ["A"-"Z" "a"-"z" "0"-"9"]+ ) 
TOKEN:uriref:( "<" [^ "<" ">" " " "\t"]* ">" ) #unicodify
TOKEN:string:( "\"" [^ "\"" "\n" "\r"]* "\"" )
TOKEN:qname:(["A"-"Z" "a"-"z" "0"-"9"]* ":" ["A"-"Z" "a"-"z" "0"-"9" "_"]+)
TOKEN:longString:("\"\"\"" .* "\"\"\"" )
TOKEN:punct:(";" | "," | "." | "^^" )
TOKEN:integer:([ "+" "-"]? ["0"-"9"]+)
TOKEN:decimal:(["+" "-"]? ((["0"-"9"]+ "." ["0"-"9"]*) | ( "." ["0"-"9"]+) )) # I leave out the decimals that can't be distinguished from integers 
TOKEN:exponent:(["e" "E"]["+" "-"]?["0"-"9"]+)
TOKEN:boolean:("true"|"false") 
TOKEN:exists:("[" | "]")
TOKEN:list:( "(" | ")" )
TOKEN:prefix:("@base" | "@prefix")
TOKEN:prefixName:(["A"-"Z" "a"-"z"]["A"-"Z" "_" "a"-"z"]* )
TOKEN:shortrels:("a" | "=")
TOKEN:nameSep:(":")
TOKEN:lang:("@" ["A"-"Z" "a"-"z"]["A"-"Z" "a"-"z"]) #wrong but simpler

I have not yet filled in all the unicode special cases as I wanted to first make sure the main pieces would be working.

Then there is the grammar that goes with it.

S = ( Statement )*;
Statement = ( Directive "."  ) | ( Triples  "."  ) ;
Directive = PrefixID | Base ;
PrefixID = "@prefix"  [ <prefixName> ] ":"  <uriref> ;
Base = "@base"  <uriref> ;
Triples = Subject  PredicateObjectList ;
#PredicateObjectList = ( Verb  ObjectList [";"] )+ ; #we have to force the ";" even though this is not necessary
PredicateObjectList = Verb  ObjectList More ; #Here it gets confused about whether the last ";" belongs here or below
More = (  ";"  Verb  ObjectList) *; 
ObjectList = Object (  ","  Object )* ;
Verb = Predicate | "a" | "=";
Subject = Resource | Blank ;
Predicate = Resource ;
Object = Resource | Blank | Literal ;
Literal = ( QuotedString [ <lang> ] ) | DatatypeString | <integer> | Double | <decimal> | <boolean> ;
DatatypeString = QuotedString "^^" Resource ;
QuotedString = <string> | <longString> ;
Resource = <uriref> | <qname>;
Blank = <bnode> | <exists,"["><exists,"]"> | <exists,"["> PredicateObjectList <exists,"]"> | Collection ;
Double = <integer> <exponent> | <decimal> <exponent> ;
Collection = <list,"("> [ ItemList ]  <list,")"> ;
ItemList = Object (  Object )*;

The Grammar is a little different from Dave's official Turtle spec. For one I added the "=" sign as a tease. More importantly I ignore all blank spaces and all comments. It tried not to, but the parser in NBS only looks ahead by one token I think, so the white spaces was confusing it a lot. Removing them does not seem to be problematic, but only time will tell. I did this with the two lines:

SKIP:space
SKIP:comment
More problematic was that I could not get the optional ending of sentences with ";" to work. In Turtle one can have sentences like
:me foaf:knows      [ a foaf:Person;
                   foaf:name "Tim Boudreau";
                   foaf:weblog <http://weblogs.java.net/blog/timboudreau/>
                                ] .
Notice how the last line does not need a semicolon as it is followed by a "]" which clearly closes the sentence too. But it is nice to be able to add the semicolon anyway, as it is one less thing for the programmer to worry about. But I could not get it to work. Following the Turtle spec I tried:
Triples = Subject  PredicateObjectList ;
PredicateObjectList =  Verb  ObjectList More [";"] ; 
More = (  ";"  Verb  ObjectList) *;

But this confuses the parser, who does not know if the final ";" is the one at the end of the PredicateObjectList line, or at the beginning of the More line... So for the moment I decide not to allow extra semicolons....

Again since everything is built on URIs (and so also URLs) in RDF, it is nice to add functionality so that one can click on links. Just as in yesterday's demo, I added a line to the nbs file:

HYPERLINK:uriref: net.java.dev.sommer.editors.Turtle.hyperlink

And then wrote out a clearly more complicated Turtle.java class. This is more complicated because Turtle allows relative urls, and defines the base e in different parts of the document. Hacking the AST libraries I put something together that works well enough for me to be satisfied at having done a great days work, and having spent a great time here in Prague.

Tuesday Oct 02, 2007

working on NTriples support in Netbeans 6

In the last couple of days I have been learning about the very powerful Schlieman project. The result of the project is that one can now very simply create language support for NetBeans, and is what has allowed the very quick recent growth of a huge number of languages such as Groovy, Ruby, Prolog, Erlang, and many many others...

I did not take more than a day for me to get the basics for NTriples support done. NTriples is the simplest serialization of RDF. It is extremely explicit, one line per statement.

<SubjectURL> <PredicateURL> <ObjectURL> .
This is RDF at its purest. It is not very humanly writable, but it is easiest to understand. If you download cwm you can transform any rdf/xml into this format. For example you can transform my foaf file into NTriples like this:
hjs@bblfish:0$ cwm --rdf http://bblfish.net/people/henry/card --ntriples | head
    
<http://bblfish.net/people/henry/card> <http://www.iana.org/assignments/relation/alternate> <http://bblfish.net/people/henry/card.n3> .
<http://bblfish.net/people/henry/card> <http://www.iana.org/assignments/relation/alternate> <http://bblfish.net/people/henry/card.rdf> . 
<http://bblfish.net/people/henry/card> <http://xmlns.com/foaf/0.1/maker> <http://bblfish.net/people/henry/card#me> .
<http://bblfish.net/people/henry/card> <http://xmlns.com/foaf/0.1/primaryTopic> <http://bblfish.net/people/henry/card#me> .

So I now have basic syntax highlighting and clickability: i.e. you can control-hover of a URL, then click, and it will fetch a representation of that resource and open it in a browser. There is a lot more that can be done: if the representation were RDF it would be nice if it could be translated into NTriples and opened inside of NetBeans itself...

All of the source code is available under a BSD licence on the so(m)mer project. Download it with subversion from https://sommer.dev.java.net/svn/sommer/trunk. The project is in the misc/Editor directory. Once opened, just right click on the project and choose "Install/Reload in the development IDE". For debugging it is better to do this in the Target Platform IDE. Then you can open any ntriples extension file and get a little syntax highlighting.

The main tokenizer and grammar code itself is in the Ntriples.nbs file. As you can see it is split into token definitions

TOKEN:space:( [" " "\t"]+ )
TOKEN:comment:( [" " "\t"]* "#" [^ "\n" "\r"]* ["\n" "\r"]+ )
TOKEN:bnode:( "_:" ["A"-"Z" "a"-"z" "0"-"9"]+ ) 
TOKEN:absoluteURI:( "<" [^ "<" ">" " " "\t"]+ ">" )
TOKEN:qliteral:( "\"" [^ "\"" "\n" "\r"]* "\"" )
TOKEN:eol:(["\n" "\r"]+)
TOKEN:brackets:(".")
TOKEN:type:("^^")
and a simple grammar
S = (Triple | BlankLine )*;
BlankLine = Space <eol>;
Triple =   Space Subject <space> Predicate <space> Object Space "." Space <eol>;
Subject = UriRef | <bnode>;
Predicate = UriRef;
Object = UriRef | <bnode> | Literal ;
Literal =   <qliteral> [ <type,"^^"> UriRef ];
UriRef =  <absoluteURI>;
Space = (<space>)*;

As you can see, this is an incredibly simple grammar for the most powerful of all languages. You can express anything in NTriples, clearly and distinctly, or even fuzzily if you wish to. Of course it is not very practical for human editing as it is. But for machine consumption it is excellent, and it compresses very very well as you can imagine. :-) Making it more human friendly will be the topic of my next blogs.

The Token processing comes first, so one has to be careful there not to create ambiguity for the parser. The reference for Schlieman is currently the Schliemann NBS Language Description Wiki page.

One can then add color information (and one could easily do a lot better than this)
COLOR:bnode: {
    foreground_color: "blue";
}

COLOR:qliteral: {
    foreground_color: "green";
}

COLOR:absoluteUri: {
    foreground_color: "blue";
}

COLOR:type: {
    foreground_color: "red";
}
Then finally I added hyperlink functionality by adding the line
HYPERLINK:absoluteURI: net.java.dev.sommer.editor.ntriples.HyperLink.hyperlink
I then wrote the very simple HyperLink.java class with the hyperlink(Context context) method. This was easy to do by following Geertjan's excellent hints.
public class HyperLink {

    public static Runnable hyperlink(Context context) {
        SyntaxContext scontext = (org.netbeans.api.languages.SyntaxContext) context;
        ASTPath path = scontext.getASTPath();
        ASTToken t = (ASTToken) path.getLeaf();
        
        String url = t.getIdentifier();
        if (url.startsWith("<"))
            url = url.substring(1);
        if (url.endsWith(">"))
            url = url.substring(0,url.length()-1);
        final String cleanUrl = url;
        return new Runnable() {

            public void run() {
                try {
                    org.openide.awt.HtmlBrowser.URLDisplayer.getDefault().showURL(new java.net.URL(cleanUrl));
                } catch (MalformedURLException ex) {
                    Logger.getLogger(HyperLink.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        };
    }
}

You will find Gertjan's blog to be a great source of information on how to get going with Schlieman and NetBeans programming in general. One very useful thing to help with writing a grammar and a parser is a debugging tool of course. To get this you need to open the Tools>Plugins menu and get the Generic Languages Framework Studio plugin. Once it is installed you will find in the Windows > Others menu an AST and Tokens submenu, which when clicked will open two very helpful views on the left of your editor you can see in the main image. This apparently only currently works on the latest developer release of NetBeans, but should be distributes standard with Netbeans beta 2 .

I will next try to add support from Turtle and N3, then it would be nice to add a more intelligent way of displaying linked to RDF files. I can think of quite a lot of different features here...

Monday Sep 10, 2007

The Church of NetBeans

If there is anyone else who is close to being as homeless as me at Sun, it is certainly Tim Boudreau, who is now on a World Tour in a truck he bought for $1000. As he is the ultimate NetBeans evangelist, he painted up his car with the NetBeans logo, and will evangelise to whomever wants to hear the word :-) Read up on his story on his blog.

Tim is also a creative guitar player and song composer so don't hesitate to ask him to play you a song.
This reminds me of Timbuk 3's song "Reverend Jack and his Roamin Cadillac Church" (iTunes).

Come hell or high water
A soul's got to find some release
Some find it in power
And some in heavenly peace
Some look to the preacher
As he speaks from his holy perch
Me, I back Rev. Jack & his Roamin Cadillac Church
So if you're stuck at the station
On the road to the Glory on High
If you need some inspiration
He's got more than your money can buy
If you're lookin for salvation
Well my friend it's the end of your search
Here comes Rev. Jack & his Roamin Cadillac Church
Ain't no use watchin the road, son
When you ride in his automobile
Cause we're all back seat drivers,
& there's nobody at the wheel
Now for the well-to-do doctor
There's a home & a summer retreat
And for the jet-settin banker
There's a place in the social elite
But for the poor & the hungry
All the lost souls left in the lurch
There's just Rev. Jack & his Roamin Cadillac Church

Monday Jul 02, 2007

refactoring xml

Refactoring is defined as "Improving a computer program by reorganising its internal structure without altering its external behaviour". This is incredibly useful in OO programming, and is what has led to the growth of IDEs such as Netbeans, IntelliJ and Eclipse, and is behind very powerful software development movements such as Agile and Xtreeme programming. It is what helps every OO programmer get over the insidious writers block. Don't worry too much about the model or field names now, it will be easy to refactor those later!

If maintaining behavior is what defines refactoring of OO programs - change the code, but maintain the behavior - what would the equivalent be for XML? If XML is considered a syntax for declarative languages, then refactoring XML would be changing the XML whilst maintaining its meaning. So this brings us right to the question of meaning. Meaning in a procedural language is easy to define. It is closely related to behavior, and behavior is what programming languages do their best to specify very precisely. Java pushes that very far, creating very complex and detailed tests for every aspect of the language. Nothing can be called Java if it does not pass the JCP, if it does not act the way specified.
So again what is meaning of an XML document? XML does not define behavior. It does not even define an abstract semantics, how the symbols refer to the world. XML is purely specified at the syntactic level: how can one combine strings to form valid XML documents, or valid subsets of XML documents. If there is no general mapping of XML to one thing, then there is nothing that can be maintained to retain its meaning. There is nothing in general that can be said to be preserved by transformation one XML document into another.
So it is not really possible to define the meaning of an XML document in the abstract. One has to look at subsets of it, such at the Atom syndication format. These subset are given more or less formal semantics. The atom syndication format is given an english readable one for example. Other XML formats in the wild may have none at all, other than what an english reader will be able to deduce by looking at it. Now it is not always necessary to formally describe the semantics of a language for it to gain one. Natural languages for example do not have formal semantics, they evolved one. The problem with artificial languages that don't have a formal semantics is that in order to reconstruct it one has to look at how they are used, and so one has to make very subtle distinction between appropriate and inappropriate uses. This inevitably ends up being time consuming and controversial. Nothing that is going to make it easy to build automatic refactoring tools.

This is where Frameworks such as RDF come in very handy. The semantics of RDF, are very well defined using model theory. This defines clearly what every element of an RDF document means, what it refers to. To refactor RDF is then simply any change that preserves the meaning of the document. If two RDF names refer to the same resource, then one can replace one name with the other, the meaning will remain the same, or at least the facts described by the one will be the same as the one described by the other, which may be exactly what the person doing the refactoring wishes to preserve.

In conclusion: to refactor a document is to change it at the syntactic level whilst preserving its meaning. One cannot refactor XML in general, and in particular instances it will be much easier to build refactoring tools for documents with clear semantics. XML documents that have clear RDF interpretations will be very very easy to refactor mechanically. So if you are ever asking yourself what XML format you want to use: think how useful it is to be able to refactor your Java programs. And consider that by using a format with clear semantics you will be able to make use of similar tools for your data.

Monday Mar 19, 2007

NetBeans Day, Paris

The Sun Tech Days converence has moved to Paris and is taking place under the Grande Arche de la Defense, the third arch of triumph, from which you can see, on a clear day, the second arch at Etoile, and in the far distance the first arch that is standing in front of the Louvre.

NetBeans is becoming more and more impressive. I just uploaded a number of photos on flickr. There you can see

  • Romain Guy (blog) elegantly bringing us up to date with Matisse and the ease of linking it to data sources.
  • Ludovic Champenois (blog) and Alexis Moussine-Pouchkine (blog) giving an overview of the latest J2EE and Web Services abilities of NetBeans.
  • Roman Strobl (blog) going into the NetBeans profiler, how to build on the NetBeans platform, and a lot more
  • Petr Suchomel (blog) showing off some really impressive elements of the mobility pack: most memorable of all a graphical programming environment to write cell phone applications, and Java powered vector graphics cell phones.
  • John Treacy (blog) directing all of this from the front bench.
  • An attentive crowd of developers come from all over France. (The other developers were at the Solaris track in another room)

Time to go to bed, for the next installment, tomorrow morning.

Friday Mar 02, 2007

Baetle: Bug And Enhancement Tracking LanguagE ( version 0.00001 )

So here is an absolute first draft version of a Bug ontology, just starting from information I can glean from bugs in the NetBeans repository. It really is not meant to be anything else than a place to start from, to see what the field looks like, and to try out a few ideas. There is a lot that needs to changed. If possible other ontologies should be reused. But for the moment we just need to work out if this can be of any use...

The idea is that this should end up being a solid Bug Ontology that could be used by bugzilla and other repositories to enable people to query for bugs across repositories. So if people want to join in helping out, I am currently developing it on the mailing list at dev@sommer.dev.java.net, just because I have access to that repository, and so that I don't need to create another space immediately.

Before sitting down and writing out the OWL it is just a lot easier to diagram these in UML. So that's what I have done here.

Here is a description of bug 18177 from the NetBeans bug tracker, using the above outline. It is in N3.

@prefix : <https://sommer.dev.java.net/baetle/2007-02-02/#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix awol: <http://bblfish.net/work/atom-owl/2006-06-06/#> .

<http://www.netbeans.org/issues/show_bug.cgi?id=18177#it>
       a :Feature;
       :status "resolved";
       :resolution "fixed";
       :qa_contact [ foaf:mbox <mailto:issues@openide.sun.com> ];
       :priority "P1";
       :component [ :label "openide"
                    :version "3.6";
                  ];
       :bugType "looks";
       :assigned_to  <http://people.netbeans.org/phrebejk#i>";
       :reporter [ :nick "jtulach"];
       :interested [ :mbox <mailto:jtulach@netbeans.org> ];
       :interested [ :mbox <mailto:mentlicherh@netbeans.org> ];
       :updated "2003-12-11T06:25:15"^^xsd:dateTime;
       :dependsOn <http://www.netbeans.org/issues/show_bug.cgi?id=21365#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=19905#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=19340#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=18179#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=19357#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=17934#it>,
                  <http://www.netbeans.org/issues/show_bug.cgi?id=27843#it>;
       :blocks <http://www.netbeans.org/issues/show_bug.cgi?id=27843#it>,
               <http://www.netbeans.org/issues/show_bug.cgi?id=26921#it>;
       :hasDuplicate <http://www.netbeans.org/issues/show_bug.cgi?id=2217#it>;
       :description <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc1>;
       :comment <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc2>,
                <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc3>,
                <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc4>,
                <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc5>,
                <http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc6>;
       :attachment <http://www.netbeans.org/nonav/issues/showattachment.cgi/10189/looks.zip>.



<http://www.netbeans.org/issues/show_bug.cgi?id=2217#desc1> a :Description;
     :content [ awol:body """We need a reasonable way how to organize looks so we can easily locate them for
given representation object in a way that makes it probable that correct look
will be found. We need a way for different modules to replace (or lower
priority) of some look and provide their own. We need use to be present with
available looks (which make some sence on that object) and being able to
pernamently change the order of looks available for given object.""";
               awol:type "text/plain";
              ];
     :author [ foaf:mbox <mailto:jtulach@netbeans.org> ];
     :created "2001-11-29T08:17:00"^^xsd:dateTime .     

I have hyperlinked a couple of the relations above, to show exactly how what we are doing is just describing the web. (RDF stands for Resource Description Framework after all) Click on the links and you will get a description of what that thing is about. There is already one big improvement here over the xml format provided by the service (see the xml for bug 18177 for example) and that is that we don't have to send the content of an attachment around. We just refer to it by a url (http://www.netbeans.org/nonav/issues/showattachment.cgi/10189/looks.zip).

The bugs have the #it anchor, to distinguish the bug from the page which describes it.

The URL for the code should clearly be the urls of the http repository versions. Then we should be able to link the code to packages, which should link up to libraries, which link up to products; and we can link any of those to bugs.

So what could one do with all that information available from a SPARQL endpoint?

Search

Flickr Diary

www.flickr.com
This is a Flickr badge showing public photos from bblfish. Make your own badge here.

Recent Entries

Navigation

Referers