org.openrdf.sesame.sailimpl.rdbms.rules
Class Component

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.rdbms.rules.Component
All Implemented Interfaces:
Comparable

public class Component
extends Object
implements Comparable

Description: Represents a component of a triple template used in a rule. It can be a resource URI, variable name or a regular expression.

Version:
1.0
Author:
Damyan Ognyanoff

Field Summary
static int REGEXP
           
static int URI
           
static int VAR
           
 
Constructor Summary
Component(String value, int type)
          The constructor
 
Method Summary
 int compareTo(Object obj)
           
 boolean equals(Object o)
           
 int getType()
          Returns the type of this component.
 int hashCode()
           
 boolean isRegExp()
          Returns true when this component has type REGEXP.
 boolean isUri()
          Returns true when this component has type URI.
 boolean isVar()
          Returns true when this component has type VAR or REGEXP.
 void setRegExpTemplate(String template, String escape)
           
 String value()
          Returns the value of this component.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VAR

public static final int VAR
See Also:
Constant Field Values

URI

public static final int URI
See Also:
Constant Field Values

REGEXP

public static final int REGEXP
See Also:
Constant Field Values
Constructor Detail

Component

public Component(String value,
                 int type)
The constructor

Parameters:
value - of the component
type - - one of the URI, VAR or REGEXP constants
Method Detail

isVar

public boolean isVar()
Returns true when this component has type VAR or REGEXP.


isUri

public boolean isUri()
Returns true when this component has type URI.


isRegExp

public boolean isRegExp()
Returns true when this component has type REGEXP.


getType

public int getType()
Returns the type of this component.

Returns:
One of the values VAR, URI or REGEXP.

value

public String value()
Returns the value of this component.


compareTo

public int compareTo(Object obj)
Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object o)

hashCode

public int hashCode()

setRegExpTemplate

public void setRegExpTemplate(String template,
                              String escape)


Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.