com.clarkparsia.pellet.rules.builtins
Class StringFunctionAdapter

java.lang.Object
  extended by com.clarkparsia.pellet.rules.builtins.StringFunctionAdapter
All Implemented Interfaces:
Function

public class StringFunctionAdapter
extends java.lang.Object
implements Function

Title: String-to-String Function Adapter

Description: Adapter from StringToStringFunction to Function

Copyright: Copyright (c) 2008

Company: Clark & Parsia, LLC.

Author:
Ron Alford

Constructor Summary
StringFunctionAdapter(StringToStringFunction function)
           
StringFunctionAdapter(StringToStringFunction function, java.lang.String datatypeURI)
           
 
Method Summary
 Literal apply(ABox abox, Literal expected, Literal... litArgs)
          Apply the function against a set of arguments.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringFunctionAdapter

public StringFunctionAdapter(StringToStringFunction function)

StringFunctionAdapter

public StringFunctionAdapter(StringToStringFunction function,
                             java.lang.String datatypeURI)
Method Detail

apply

public Literal apply(ABox abox,
                     Literal expected,
                     Literal... litArgs)
Description copied from interface: Function
Apply the function against a set of arguments. Test the expected argument against the result. Return null if the arguments were invalid. If 'expected' was not null and matched the result, return 'expected'. If 'expected' was not null and did not match, return null; Otherwise, return the result.

Specified by:
apply in interface Function


Copyright © 2004 Evren Sirin. All Rights Reserved.