Rit::Base::Pred
Represents preds.
Inherits from Rit::Base::Resource.
$p->name( \%args )
Uses the name property, if existing. Defaults to the label
Returns: The name of the predicate as a Rit::Base::Literal::String object
Returns: The label as a scalar string
Same as /label
$p->plain
Same as /label
$p->syskey
Returns a unique predictable id representing this object, as a scalar string
$p->valtype()
Find the valtype of a predicate. This will use the range or the coltype.
Returns: A valtype
node to use as the valtype for arcs with this pred.
$p->objtype()
Returns true if the /coltype the value is 'obj'. This will not return true if the real value is a literal resource, unless the literal resource has a value that is a node.
Calls /coltype.
Returns: 1 or 0
$p->coltype()
The retuned value will be one of obj
, valtext
,
valdate
, valfloat
or valbin
.
See Rit::Base::Literal::Class for the coltypes.
Returns: A scalar string
$p->coltype_id()
See Rit::Base::Literal::Class for the coltypes.
Returns: An integer as a scalar string
Is this a pred? Yes.
Returns: 1
$this->find_by_anything( $label, \%args )
Supported args are:
return_single_value
Data from node rec mus always be awailible. Thus always load the node rec.
Reimplements this here because we can't give the node_rec to init for any class.
$pred->on_new_range( \%args )
$pred->vacuum_pred_arcs( \%args )
Special args:
convert_prop_to_value
For now, we just ignore failed vacuums...
TODO: Handle failed vacuums
$n->set_coltype( $coltype_id, \%args ) $n->set_coltype( $coltype, \%args )
returns: The new coltype id
$pred->vacuum( \%args )
$p->has_arcs
Retruns: true, if there is any arc that uses the pred
$p->has_active_arcs
Retruns: true, if there is any active arc that uses the pred
$p->active_arcs
Retruns: a Rit::Base::List of arcs
Rit::Base, Rit::Base::Resource, Rit::Base::Arc, Rit::Base::List, Rit::Base::Search