NAME

RDF::Base::Pred

DESCRIPTION

Represents preds.

Inherits from RDF::Base::Resource.

name

  $p->name( \%args )

Uses the name property, if existing. Defaults to the label

Returns: The name of the predicate as a RDF::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 range of the predicate is a type of resource.

Returns: 1 or 0

coltype

  $p->coltype()

The retuned value will be one of obj, valtext, valdate, valfloat or valbin.

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

Returns: A scalar string

coltype_id

  $p->coltype_id()

See RDF::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_card

  $pred->on_new_range_card( \%args )

special args:

  force_range_card_max: removes extra properties. Keeps newest

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_facet

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 RDF::Base::List of arcs

SEE ALSO

RDF::Base, RDF::Base::Resource, RDF::Base::Arc, RDF::Base::List, RDF::Base::Search