net.java.rdf.annotations
Annotation Type rdf
@Retention(value=RUNTIME)
@Target(value={TYPE,CONSTRUCTOR,METHOD,FIELD,PARAMETER})
public @interface rdf
An annotation to annotate classes, methods and arguments with a uri which is meant to be interpreted
as:
- for a class: the rdf:type of the class
- for a method: the relation between an instance of the class and the argument(s) of the method. If the
method takes a number of argument then it relates the ordered list of those arguments.
- for an argument: the name of a relation between an instance of a class and that value of the argument
- for a field: the field is thought of as a relation between an instance of the class and the value of the field
The value must a full URI, by default it is owl:sameAs ie, the identity relation.
If it is the inverse of the relation that is intended, set inverse to true.
Created by Henry Story
Date: Aug 28, 2005
Time: 11:51:43 PM
Required Element Summary |
java.lang.String |
value
the String must be a full URI
The URI is the name of the relation (or of the inverse of the relation in inverse() is true
There is no default value. |
Optional Element Summary |
boolean |
inverse
|
java.lang.String |
range
|
value
public abstract java.lang.String value
- the String must be a full URI
The URI is the name of the relation (or of the inverse of the relation in inverse() is true
There is no default value. There has been discussion that if a namespace value was set on the
class or package then then no value could mean that ns+name_of_variable is the URL.
This would cause problems for refactoring. Someone changing the name of a variable would change the name
of the relation, which may not be what is expected.
inverse
public abstract boolean inverse
- Returns:
- true if it is the inverse of the named relation (value()) that this relation represents
- Default:
- false
range
public abstract java.lang.String range
- Returns:
- the range uri (for literal types). Value is "" for default.
- Default:
- ""