org.topbraid.spin.util
Class ModulesUtil

java.lang.Object
  extended by org.topbraid.spin.util.ModulesUtil

public class ModulesUtil
extends java.lang.Object

Utilities on SPIN modules.

Author:
Holger Knublauch

Constructor Summary
ModulesUtil()
           
 
Method Summary
static RDFNode getBody(Resource module)
          Gets the spin:body of a module, including inherited ones if the direct body is null.
static java.util.Map<Property,RDFNode> getPotentialBindings(Module module, RDFNode[] values)
          Attempts to find "good" default bindings for a collection of RDFNode values at a given module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModulesUtil

public ModulesUtil()
Method Detail

getBody

public static RDFNode getBody(Resource module)
Gets the spin:body of a module, including inherited ones if the direct body is null.

Parameters:
module - the module to get the body of
Returns:
the body or null

getPotentialBindings

public static java.util.Map<Property,RDFNode> getPotentialBindings(Module module,
                                                                   RDFNode[] values)
Attempts to find "good" default bindings for a collection of RDFNode values at a given module. For each argument, this algorithm checks whether each value would match the argument's type.

Parameters:
module - the module Resource to check
values - the potential values
Returns:
a Map of argProperty properties to a subset of the values