de.unidu.is.retrieval.hyrex
Class Path

java.lang.Object
  extended byde.unidu.is.retrieval.ProbDoc
      extended byde.unidu.is.retrieval.hyrex.Path
All Implemented Interfaces:
java.lang.Comparable

public class Path
extends ProbDoc

Represents a query result from HyREX. A path consists of a weight, a document identifier, and a path. Here, the document identifier is represented as an integer, the weight is a double, and the path is a string.

Since:
2004-01-04 (early version from 2001/2002, now fused with ProbDoc)
Version:
$Revision: 1.7 $, $Date: 2005/03/14 17:33:14 $
Author:
Kai Grossjohann, Gudrun Fischer, Henrik Nottelmann

Field Summary
protected  java.lang.String path
          The path associated with the document.
 
Fields inherited from class de.unidu.is.retrieval.ProbDoc
docID, weight
 
Constructor Summary
Path()
          Creates a new, empty instance.
Path(java.lang.String query_result)
          Creates a new instance from a HyREX string.
Path(java.lang.String docID, java.lang.String path, double weight)
          Creates a new instance.
 
Method Summary
 java.lang.String getPath()
          Returns the path.
 java.lang.String path()
          Deprecated. Use getPath()instead.
 void setPath(java.lang.String path)
          Sets the path.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class de.unidu.is.retrieval.ProbDoc
compareTo, equals, getDocID, getWeight, hashCode, setDocID, setWeight
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected java.lang.String path
The path associated with the document.

Constructor Detail

Path

public Path()
Creates a new, empty instance.


Path

public Path(java.lang.String docID,
            java.lang.String path,
            double weight)
Creates a new instance.

Parameters:
docID - document ID
path - document path
weight - document weight

Path

public Path(java.lang.String query_result)
Creates a new instance from a HyREX string.

The argument string has the following format: 5 0.42 4711 /foo[1]/bar[2]

This is a string of four tab-separated fields. The first field (5) is an index number (5 means the fifth item from the ranking list). The second field (0.42) gives the weight and is a double between 0 and 1. The third field (4711) is an integer and gives the document identifier. The fourth field (/foo[1]/bar[2]) is a path specifying an XML node.

Parameters:
query_result - argument string
Method Detail

path

public java.lang.String path()
Deprecated. Use getPath()instead.

Returns the path.

Returns:
path

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class ProbDoc
Returns:
string representation

getPath

public java.lang.String getPath()
Returns the path.

Returns:
path.

setPath

public void setPath(java.lang.String path)
Sets the path.

Parameters:
path - path to set.