org.openrdf.elmo
Interface RoleMapper<URI>

Type Parameters:
URI - Class used to represent a rdf:type.
All Known Implementing Classes:
RoleMapperImpl

public interface RoleMapper<URI>

Maps between roles and rdf:type.

Author:
James Leigh

Method Summary
 void addFactory(Class<?> javaClass)
           
 void addFactory(Class<?> javaClass, String type)
           
 void addRole(Class<?> role)
           
 void addRole(Class<?> role, String type)
           
 Class<?>[] findBaseRoles()
          Roles that should be included by any bean.
 Collection<Class<?>> findIndividualRoles(URI instance, Collection<Class<?>> classes)
          Adds roles to the collection that are specific to this instance.
 Collection<Class<?>> findRoles(Collection<URI> types, Collection<Class<?>> roles)
          Finds all the roles that should be implemented by these types.
 Class<?>[] findRoles(URI type)
          Finds the Java Class for this rdf:Class.
 Collection<URI> findSubTypes(Class<?> role, Collection<URI> rdfTypes)
          Finds the rdf:types for concept and any sub-concept(s).
 URI findType(Class<?> concept)
          Finds the rdf:Class for this Java Class.
 Collection<URI> findTypes(Class<?> role, Collection<URI> rdfTypes)
          Finds the rdf:types that this interface or class represents.
 boolean isIndividualRolesPresent(URI instance)
          Determines if a registered role hase this value as a {link org.openrdf.annotations.oneOf} value.
 boolean isTypeRecorded(URI type)
          Finds if there exists a Java Class for this rdf:Class.
 void setRdfTypeFactory(RdfTypeFactory<URI> vf)
           
 

Method Detail

setRdfTypeFactory

void setRdfTypeFactory(RdfTypeFactory<URI> vf)

addFactory

void addFactory(Class<?> javaClass)

addFactory

void addFactory(Class<?> javaClass,
                String type)

addRole

void addRole(Class<?> role)

addRole

void addRole(Class<?> role,
             String type)

findBaseRoles

Class<?>[] findBaseRoles()
Roles that should be included by any bean. Used when the resource has no rdf:type.

Returns:
roles implemented by all Beans.

isIndividualRolesPresent

boolean isIndividualRolesPresent(URI instance)
Determines if a registered role hase this value as a {link org.openrdf.annotations.oneOf} value.

Parameters:
instance -
Returns:
true if {link findIndividualRoles(Object, Collection) will modify the collection.

findIndividualRoles

Collection<Class<?>> findIndividualRoles(URI instance,
                                         Collection<Class<?>> classes)
Adds roles to the collection that are specific to this instance. Defined with the {link org.openrdf.annotations.oneOf} annotation.

Parameters:
instance -
classes -
Returns:
classes

findRoles

Class<?>[] findRoles(URI type)
Finds the Java Class for this rdf:Class. Searches for register classes.

Parameters:
type -

findRoles

Collection<Class<?>> findRoles(Collection<URI> types,
                               Collection<Class<?>> roles)
Finds all the roles that should be implemented by these types.

Parameters:
types - rdf:types
roles - collection should be used to add the classes.
Returns:
roles

isTypeRecorded

boolean isTypeRecorded(URI type)
Finds if there exists a Java Class for this rdf:Class. Searches for register classes.

Parameters:
type -

findType

URI findType(Class<?> concept)
Finds the rdf:Class for this Java Class.

Parameters:
concept -
Returns:
URI of the rdf:Class for this Java Class or null.

findTypes

Collection<URI> findTypes(Class<?> role,
                          Collection<URI> rdfTypes)
Finds the rdf:types that this interface or class represents.

Parameters:
concept -
rdfTypes -
Returns:
rdfTypes

findSubTypes

Collection<URI> findSubTypes(Class<?> role,
                             Collection<URI> rdfTypes)
Finds the rdf:types for concept and any sub-concept(s).

Parameters:
concept -
rdfTypes -
Returns:
rdfTypes


Copyright © 2004-2008 Aduna. All Rights Reserved.