slib.sglib.model.graph.weight
Interface GWS


public interface GWS

Object representing a Graph Weighting Scheme containing :

Author:
Sebastien Harispe

Method Summary
 boolean existsWeight(E e)
          Check if a specific weight is specified for this edge.
 boolean existsWeight(org.openrdf.model.URI predicate)
          Check if a weight is defined for a specific predicate.
 double getDefaultWeight()
          The default weight associated to an edge
 double getWeight(E e)
          Access to the weight of the edge.
 Double getWeight(org.openrdf.model.URI e)
          Access to the weight defined for a specific predicate.
 void setDefaultWeight(double w)
          Set the weight defined by default
 void setWeight(E e, double w)
          Set the weight for an edge
 void setWeight(org.openrdf.model.URI e, double w)
          Set the default weight for the specified URI.
 

Method Detail

getDefaultWeight

double getDefaultWeight()
The default weight associated to an edge

Returns:
the default weight

setDefaultWeight

void setDefaultWeight(double w)
Set the weight defined by default

Parameters:
w - the new default weight

existsWeight

boolean existsWeight(E e)
Check if a specific weight is specified for this edge. This method will return false no specific weight is specified, even if a weight is specified for the edges with the same URIs as the specified edge.

Parameters:
e - the edge we want to check if a weight is specified for.
Returns:
true if a weight is explicitly defined for the edge.

getWeight

double getWeight(E e)
Access to the weight of the edge. The value return is the first from below:

Parameters:
e - the edge
Returns:
the weight associated to the edge

setWeight

void setWeight(E e,
               double w)
Set the weight for an edge

Parameters:
e - the edge
w - the weight

existsWeight

boolean existsWeight(org.openrdf.model.URI predicate)
Check if a weight is defined for a specific predicate.

Parameters:
predicate -
Returns:
true if a default weight exists for this predicate

getWeight

Double getWeight(org.openrdf.model.URI e)
Access to the weight defined for a specific predicate.

Parameters:
predicate - the predicate
Returns:
the default weight associated to the predicate. Null if no weight is associated to the predicate.

setWeight

void setWeight(org.openrdf.model.URI e,
               double w)
Set the default weight for the specified URI.

Parameters:
e - the default URI
w - the weight


Copyright © 2013. All Rights Reserved.