NAME

Rit::Base::Pred

DESCRIPTION

Represents preds.

Inherits from Rit::Base::Resource.

name

  $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

label

Returns: The label as a scalar string

value

Same as /label

plain

  $p->plain

Same as /label

syskey

  $p->syskey

Returns a unique predictable id representing this object, as a scalar string

valtype

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

objtype

  $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

coltype

  $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

coltype_id

  $p->coltype_id()

See Rit::Base::Literal::Class for the coltypes.

Returns: An integer as a scalar string

range_card_max_1

domain_card_max_1

range_card_min_1

domain_card_min_1

is_pred

Is this a pred? Yes.

Returns: 1

find_by_anything

  $this->find_by_anything( $label, \%args )

Supported args are:

  return_single_value

init

Data from node rec mus always be awailible. Thus always load the node rec.

get_by_node_rec

Reimplements this here because we can't give the node_rec to init for any class.

on_bless

on_unbless

on_arc_add

on_arc_del

on_new_range

  $pred->on_new_range( \%args )

vacuum_pred_arcs

  $pred->vacuum_pred_arcs( \%args )

Special args:

  convert_prop_to_value

For now, we just ignore failed vacuums...

TODO: Handle failed vacuums

set_coltype

  $n->set_coltype( $coltype_id, \%args )

  $n->set_coltype( $coltype, \%args )

returns: The new coltype id

vacuum

  $pred->vacuum( \%args )

use_class

this_valtype

list_class

has_arcs

  $p->has_arcs

Retruns: true, if there is any arc that uses the pred

has_active_arcs

  $p->has_active_arcs

Retruns: true, if there is any active arc that uses the pred

active_arcs

  $p->active_arcs

Retruns: a Rit::Base::List of arcs

SEE ALSO

Rit::Base, Rit::Base::Resource, Rit::Base::Arc, Rit::Base::List, Rit::Base::Search