4Suite
™
API Documentation
►
Module
Ft
.
Rdf
.
Inference
.Action
######################################################################## # # File Name: Action.py # # Documentation: http://docs.4suite.org/4Rdf/Inference/Action.py.html #
Classes:
Action
,
AverageAction
,
CountAction
,
DifferenceAction
,
ExternalParamAction
,
IndexAction
,
IntersectionAction
,
PathsAction
,
ReverseAction
,
ReversePathsAction
,
SliceAction
,
SortAction
,
SortType
,
StatementObject
,
StatementPredicate
,
StatementSubject
,
SumAction
,
UnionAction
,
UniqueAction
,
VariableSetAction
Fields:
g_keyMap
Classes
class
Action
Methods
__init__
(
self
,
id_
)
execute
(
self
,
infEng
,
context
)
class
AverageAction
(
Action
)
Methods
__init__
(
self
,
arg
)
execute
(
self
,
infEng
,
context
)
class
CountAction
(
Action
)
Methods
__init__
(
self
,
arg
)
execute
(
self
,
infEng
,
context
)
class
DifferenceAction
(
Action
)
Methods
__init__
(
self
,
arg
,
arg1
)
execute
(
self
,
infEng
,
context
)
class
ExternalParamAction
(
Action
)
Methods
__init__
(
self
,
name
,
val
)
execute
(
self
,
infEng
,
context
)
class
IndexAction
(
Action
)
#Some set functions
Methods
__init__
(
self
,
arg
,
index
)
execute
(
self
,
infEng
,
context
)
class
IntersectionAction
(
Action
)
Methods
__init__
(
self
,
arg
,
arg1
)
execute
(
self
,
infEng
,
context
)
class
PathsAction
(
Action
)
#Path actions
Methods
__init__
(
self
,
startSubject
,
endObject
,
allowedPredicates
)
execute
(
self
,
infEng
,
context
)
class
ReverseAction
(
Action
)
Methods
__init__
(
self
,
arg
)
execute
(
self
,
infEng
,
context
)
class
ReversePathsAction
(
Action
)
Methods
__init__
(
self
,
startObject
,
endSubject
,
allowedPredicates
)
execute
(
self
,
infEng
,
context
)
class
SliceAction
(
Action
)
Methods
__init__
(
self
,
arg
,
start
,
end
)
execute
(
self
,
infEng
,
context
)
class
SortAction
(
Action
)
Methods
__init__
(
self
,
arg
,
sortType
,
key
='object'
)
execute
(
self
,
infEng
,
context
)
class
SortType
###A sort action
Fields
NUMBER_SORT
= 1
STRING_SORT
= 2
class
StatementObject
(
Action
)
Methods
__init__
(
self
,
item
)
execute
(
self
,
infEng
,
context
)
class
StatementPredicate
(
Action
)
Methods
__init__
(
self
,
item
)
execute
(
self
,
infEng
,
context
)
class
StatementSubject
(
Action
)
##Actions to split up a statment
Methods
__init__
(
self
,
item
)
execute
(
self
,
infEng
,
context
)
class
SumAction
(
Action
)
###Some other agregate functions
Methods
__init__
(
self
,
arg
)
execute
(
self
,
infEng
,
context
)
class
UnionAction
(
Action
)
Methods
__init__
(
self
,
arg
,
arg1
)
execute
(
self
,
infEng
,
context
)
class
UniqueAction
(
Action
)
Methods
__init__
(
self
,
arg
)
execute
(
self
,
infEng
,
context
)
class
VariableSetAction
(
Action
)
Methods
__init__
(
self
,
name
,
val
)
execute
(
self
,
infEng
,
context
)
Fields
g_keyMap
= {'object': 2, 'predicate': 1, 'subject': 0}