KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > vocabulary > test > TestVocabRDFS


1 /*
2   (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
3   [See end of file]
4   $Id: TestVocabRDFS.java,v 1.5 2005/02/21 12:22:20 andy_seaborne Exp $
5 */

6
7 package com.hp.hpl.jena.vocabulary.test;
8
9 import com.hp.hpl.jena.rdf.model.test.ModelTestBase;
10 import com.hp.hpl.jena.vocabulary.*;
11 import junit.framework.*;
12
13 /**
14     @author kers
15 */

16 public class TestVocabRDFS extends ModelTestBase
17     {
18     public TestVocabRDFS(String JavaDoc name)
19         { super(name); }
20
21     public static TestSuite suite()
22         { return new TestSuite( TestVocabRDFS.class ); }
23
24     public void testVocabRDFS()
25         {
26         String JavaDoc ns = "http://www.w3.org/2000/01/rdf-schema#";
27         assertEquals( ns, RDFS.getURI() );
28         assertEquals( ns + "Class", RDFS.Class.getURI() );
29         assertEquals( ns + "Datatype", RDFS.Datatype.getURI() );
30         assertEquals( ns + "ConstraintProperty", RDFS.ConstraintProperty.getURI() );
31         assertEquals( ns + "Container", RDFS.Container.getURI() );
32         assertEquals( ns + "ContainerMembershipProperty", RDFS.ContainerMembershipProperty.getURI() );
33         assertEquals( ns + "ConstraintResource", RDFS.ConstraintResource.getURI() );
34         assertEquals( ns + "Literal", RDFS.Literal.getURI() );
35         assertEquals( ns + "Resource", RDFS.Resource.getURI() );
36         assertEquals( ns + "comment", RDFS.comment.getURI() );
37         assertEquals( ns + "domain", RDFS.domain.getURI() );
38         assertEquals( ns + "label", RDFS.label.getURI() );
39         assertEquals( ns + "isDefinedBy", RDFS.isDefinedBy.getURI() );
40         assertEquals( ns + "range", RDFS.range.getURI() );
41         assertEquals( ns + "seeAlso", RDFS.seeAlso.getURI() );
42         assertEquals( ns + "subClassOf", RDFS.subClassOf.getURI() );
43         assertEquals( ns + "subPropertyOf", RDFS.subPropertyOf.getURI() );
44         assertEquals( ns + "member", RDFS.member.getURI() );
45         }
46
47     public void testNodes()
48         {
49         assertEquals( RDFS.Class.getNode(), RDFS.Nodes.Class );
50         assertEquals( RDFS.Datatype.getNode(), RDFS.Nodes.Datatype );
51         assertEquals( RDFS.ConstraintProperty.getNode(), RDFS.Nodes.ConstraintProperty );
52         assertEquals( RDFS.Container.getNode(), RDFS.Nodes.Container );
53         assertEquals( RDFS.ContainerMembershipProperty.getNode(), RDFS.Nodes.ContainerMembershipProperty );
54         assertEquals( RDFS.ConstraintProperty.getNode(), RDFS.Nodes.ConstraintProperty );
55         assertEquals( RDFS.Literal.getNode(), RDFS.Nodes.Literal );
56         assertEquals( RDFS.Resource.getNode(), RDFS.Nodes.Resource );
57         assertEquals( RDFS.comment.getNode(), RDFS.Nodes.comment );
58         assertEquals( RDFS.domain.getNode(), RDFS.Nodes.domain );
59         assertEquals( RDFS.label.getNode(), RDFS.Nodes.label );
60         assertEquals( RDFS.isDefinedBy.getNode(), RDFS.Nodes.isDefinedBy );
61         assertEquals( RDFS.range.getNode(), RDFS.Nodes.range );
62         assertEquals( RDFS.seeAlso.getNode(), RDFS.Nodes.seeAlso );
63         assertEquals( RDFS.subClassOf.getNode(), RDFS.Nodes.subClassOf );
64         assertEquals( RDFS.subPropertyOf.getNode(), RDFS.Nodes.subPropertyOf );
65         assertEquals( RDFS.member.getNode(), RDFS.Nodes.member );
66         }
67     }
68
69
70 /*
71     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
72     All rights reserved.
73
74     Redistribution and use in source and binary forms, with or without
75     modification, are permitted provided that the following conditions
76     are met:
77
78     1. Redistributions of source code must retain the above copyright
79        notice, this list of conditions and the following disclaimer.
80
81     2. Redistributions in binary form must reproduce the above copyright
82        notice, this list of conditions and the following disclaimer in the
83        documentation and/or other materials provided with the distribution.
84
85     3. The name of the author may not be used to endorse or promote products
86        derived from this software without specific prior written permission.
87
88     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
89     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
90     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
91     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
92     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
93     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
94     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
95     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
96     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
97     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
98 */

99
Popular Tags