com.viceversatech.rdfbeans.annotations
Annotation Type RDFSubject


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface RDFSubject

Applied to: Method declaration
Parameter: prefix (String, optional)

@RDFSubject annotation indicates that the annotated getter method returns a String value of RDFBean identifier.

The prefix parameter defines the optional prefix part of RDFBean identifier and must contain either a namespace URI or a reference to namespace defined by RDFNamespaces annotation.

If prefix parameter is set, it is expected that the method returns a local part of RDFBean identifier. Otherwise, the method must return a value of RDFBean identifier as a fully qualified name.

Examples:

 @RDFSubject(prefix="http://rdfbeans.example.com/persons/") 
 public String  getPersonId() {
 ...
 
 @RDFSubject(prefix="persons:") 
 public String getPersonId() { 
 ...
 
 @RDFSubject 
 public String getPersonId() { 
 ... // A fully qualified name must be returned
 

Version:
$Id: RDFSubject.java 21 2011-04-02 09:15:34Z alexeya $
Author:
Alex Alishevskikh, alexeya(at)gmail.com

Optional Element Summary
 java.lang.String prefix
          An optional namespace prefix of RDFBean identifiers
 

prefix

public abstract java.lang.String prefix
An optional namespace prefix of RDFBean identifiers

Default:
""


Copyright © 2011. All Rights Reserved.