Question: the link: <http://www.mind4m.com/stories.php?pageid=10>

what's this line meaning?

```
var curChildIndex = $(this).parent().prevAll().length + 1;

```

select all the li label before the current a label the add one? am i right? but why it adds one?

```
$(this).parent().children('div:nth-child('+curChildIndex+')')
.fadeIn('normal',function() {
                    $(this).addClass('current');
                });

```

i can't understand this well. could i write this part to `children('div:nth-child(curChildIndex)')`

Answer: 
There are many Jena tutorials on the web. However, what you are asking for is pretty straightforward. Here's one solution:

```
package example;

import com.hp.hpl.jena.ontology.*;
import com.hp.hpl.jena.rdf.model.ModelFactory;

class RdfXmlExample {
    public static void main( String[] args ) {
        new RdfXmlExample().run();
    }

    public void run() {
        OntModel m = ModelFactory.createOntologyModel( OntModelSpec.RDFS_MEM );
        String NS = "http://example.com/test#";

        OntClass a = m.createClass( NS + "A" );
        OntClass b = m.createClass( NS + "B" );

        a.addSubClass( b );

        OntProperty c = m.createOntProperty( NS + "c" );
        c.addRange( a );

        m.write( System.out, "RDF/XML-ABBREV" );
    }
}

```

which produces:

```
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <rdfs:Class rdf:about="http://example.com/test#B">
    <rdfs:subClassOf>
      <rdfs:Class rdf:about="http://example.com/test#A"/>
    </rdfs:subClassOf>
  </rdfs:Class>
  <rdf:Property rdf:about="http://example.com/test#c">
    <rdfs:range rdf:resource="http://example.com/test#A"/>
  </rdf:Property>
</rdf:RDF>

```
Code + explanation of 

* Jena RDF API tutorial
* SPARQL tutorial
* Ontology API overview

<http://incubator.apache.org/jena/getting_started/index.html>

decent place to start with jena.