@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface RDF
Applied to: Method declaration
Value: String (required)
@RDF
annotation declares a RDFBean data property. The annotations must be applied to getter methods of an RDFBean class or interface.
The mandatory value element defines a qualified name or absolute URI of an RDF property (predicate) mapped to this property.
Example:
@RDF("foaf:name")
public String getName() {
return name;
}
Alternative inverseOf
element specifies that this property is an inversion of a property defined on RDFBeans class returned by this method:
@RDFBean("urn:test:Parent")
public class Parent {
...
@RDF(inverseOf="urn:test:hasParent")
public Child[] getChildren() {
return children;
}
...
}
@RDFBean("urn:test:Child")
public class Child {
...
@RDF("urn:test:hasParent")
public Parent getParent() {
return parent;
}
...
}
Copyright © 2017. All rights reserved.