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 addBehaviour(Class<?> behaviour)
           
 void addBehaviour(Class<?> behaviour, String type)
           
 void addConcept(Class<?> concept)
           
 void addConcept(Class<?> concept, String type)
           
 void addFactory(Class<?> factory)
           
 void addFactory(Class<?> factory, String type)
           
 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.
 Collection<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<Class<?>> getConceptClasses()
           
 Collection<Class<?>> getConceptOnlyClasses()
           
 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)

getConceptClasses

Collection<Class<?>> getConceptClasses()

getConceptOnlyClasses

Collection<Class<?>> getConceptOnlyClasses()

addFactory

void addFactory(Class<?> factory)

addFactory

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

addConcept

void addConcept(Class<?> concept)

addConcept

void addConcept(Class<?> concept,
                String type)

addBehaviour

void addBehaviour(Class<?> behaviour)

addBehaviour

void addBehaviour(Class<?> behaviour,
                  String type)

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

Collection<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.

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.