01: package net.java.rdf.annotations;
02:
03: import static java.lang.annotation.ElementType.*;
04: import static java.lang.annotation.RetentionPolicy.*;
05: import java.lang.annotation.Retention;
06: import java.lang.annotation.Target;
07:
08: /**
09: * An annotation to annotate classes, methods and arguments with a uri which is meant to be interpreted
10: * as:<ul>
11: * <li>for a class: the rdf:type of the class
12: * <li>for a method: the relation between an instance of the class and the argument(s) of the method. If the
13: * method takes a number of argument then it relates the ordered list of those arguments.
14: * <li>for an argument: the name of a relation between an instance of a class and that value of the argument
15: * <li>for a field: the field is thought of as a relation between an instance of the class and the value of the field
16: * </ul>
17: * The value must a full URI, by default it is owl:sameAs ie, the identity relation.
18: * If it is the inverse of the relation that is intended, set inverse to true.
19: *
20: * Created by Henry Story
21: * Date: Aug 28, 2005
22: * Time: 11:51:43 PM
23: */
24: @Retention(RUNTIME)
25: @Target({TYPE,CONSTRUCTOR,METHOD,FIELD,PARAMETER})
26: public @interface rdf {
27: /** help compose xsd literal ranges */
28: String xsd = "http://www.w3.org/2001/XMLSchema#";
29:
30: /** the String must be a full URI */
31: String value() default "http://www.w3.org/2002/07/owl#sameAs";
32:
33: /**
34: * @return true if it is the inverse of the named relation (value()) that this relation represents
35: */
36: boolean inverse() default false;
37:
38: /**
39: * @return the range uri (for literal types). Value is "" for default.
40: */
41: String range() default "";
42:
43: }
|