org.xenei.jena.entities.impl
Class SubjectInfoImpl

java.lang.Object
  extended by org.xenei.jena.entities.impl.SubjectInfoImpl
All Implemented Interfaces:
SubjectInfo

public class SubjectInfoImpl
extends Object
implements SubjectInfo


Constructor Summary
SubjectInfoImpl(Class<?> implementedClass)
           
 
Method Summary
 void add(PredicateInfoImpl pi)
          Add a predicate info to this subject.
 Class<?> getImplementedClass()
          Get the class that was annotated with the Subject annotation.
 PredicateInfo getPredicateInfo(Method m)
          Get the predicateInfo or return null if not found
 PredicateInfo getPredicateInfo(String function, Class<?> clazz)
          Get the predicate info for a method.
 com.hp.hpl.jena.rdf.model.Property getPredicateProperty(Method m)
          Get the RDF Property for the method
 com.hp.hpl.jena.rdf.model.Property getPredicateProperty(String methodName)
          Get the RDF property for a method name.
 String getPredicateUriStr(Method m)
          The the URI string of the predicate property.
 String getPredicateUriStr(String function)
          The the URI string of the predicate property.
 void removePredicateInfo(Method m)
          Remove a predicate info from this subject.
 void removePredicateInfo(String function, Class<?> clazz)
          Remove a predicate info from this subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubjectInfoImpl

public SubjectInfoImpl(Class<?> implementedClass)
Method Detail

getImplementedClass

public Class<?> getImplementedClass()
Description copied from interface: SubjectInfo
Get the class that was annotated with the Subject annotation. e.g. the class that this SubjectInfo is about.

Specified by:
getImplementedClass in interface SubjectInfo
Returns:
The class that contains the annotation.

add

public void add(PredicateInfoImpl pi)
Add a predicate info to this subject.

Parameters:
pi - The predicateInfo to add.

getPredicateInfo

public PredicateInfo getPredicateInfo(String function,
                                      Class<?> clazz)
Description copied from interface: SubjectInfo
Get the predicate info for a method.

Specified by:
getPredicateInfo in interface SubjectInfo
Parameters:
function - The method name
clazz - The return type (for a getter type method) or parameter type (for a setter type method)
Returns:
the PredicateInfo for the method.

removePredicateInfo

public void removePredicateInfo(String function,
                                Class<?> clazz)
Remove a predicate info from this subject.

Parameters:
function - The function to remove
clazz - The class that is expected for the parameter (setter) or for return (getter).

getPredicateInfo

public PredicateInfo getPredicateInfo(Method m)
Description copied from interface: SubjectInfo
Get the predicateInfo or return null if not found

Specified by:
getPredicateInfo in interface SubjectInfo
Parameters:
m - The method to get information for.
Returns:
PredicateInfo or null.

removePredicateInfo

public void removePredicateInfo(Method m)
Remove a predicate info from this subject.

Parameters:
m - the method to rermove

getPredicateUriStr

public String getPredicateUriStr(String function)
Description copied from interface: SubjectInfo
The the URI string of the predicate property.

Specified by:
getPredicateUriStr in interface SubjectInfo
Parameters:
function - The name of the method to get the predicate for.
Returns:
the URI string for the predicate property.

getPredicateUriStr

public String getPredicateUriStr(Method m)
Description copied from interface: SubjectInfo
The the URI string of the predicate property.

Specified by:
getPredicateUriStr in interface SubjectInfo
Parameters:
m - The method to get the predicate for.
Returns:
the URI string for the predicate property.

getPredicateProperty

public com.hp.hpl.jena.rdf.model.Property getPredicateProperty(Method m)
Get the RDF Property for the method

Specified by:
getPredicateProperty in interface SubjectInfo
Parameters:
m - The method to get the property for.
Returns:
A property or null if method was not found

getPredicateProperty

public com.hp.hpl.jena.rdf.model.Property getPredicateProperty(String methodName)
Get the RDF property for a method name.

Specified by:
getPredicateProperty in interface SubjectInfo
Parameters:
methodName - The method name to locate
Returns:
A property or null if function was not found


Copyright © 2012 XENEI.com. All Rights Reserved.