it.unimi.dico.islab.idbs2.kc
Class DocumentExtraction

java.lang.Object
  extended by it.unimi.dico.islab.idbs2.kc.DocumentExtraction

public class DocumentExtraction
extends Object

Representation of an extraction process as a link between a KnowledgeChunk and a Document. This class is effectively a representation of the relation kc.extracted.

The following image shows the relations between the fields of this object and the fields of the wrapped database table (fields with the same color represents a mapping between relational schema and the corresponding object).


Author:
Vegeziel
See Also:
Document, KnowledgeChunk

Constructor Summary
protected DocumentExtraction()
          Empty constructor needed for Hibernate compatibility.
protected DocumentExtraction(Document doc, KnowledgeChunk exKc, double weight, String note)
          Only constructor for DocumentExtraction class.
 
Method Summary
 Integer getCode()
          Getter for the code field.
 Document getDocument()
          Getter for the document field.
 KnowledgeChunk getExtractedKc()
          Getter for the kc field.
 int getId()
          Getter for the correspondent kc.extracted table row.
 String getNote()
          Getter for the note field.
 Double getWeight()
          Getter for the weight field.
 void setCode(Integer code)
          Setter for the code field.
protected  void setDocument(Document document)
          Setter for the document field.
protected  void setExtractedKc(KnowledgeChunk kc)
          Setter for the kc field.
 void setNote(String note)
          Setter for the note field.
 void setWeight(Double weight)
          Setter for the weight field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentExtraction

protected DocumentExtraction()
Empty constructor needed for Hibernate compatibility. Direct use is discouraged. Use the KowledgeChunk .addDocument instead.

See Also:
KnowledgeChunk.addDocument(Document)

DocumentExtraction

protected DocumentExtraction(Document doc,
                             KnowledgeChunk exKc,
                             double weight,
                             String note)

Only constructor for DocumentExtraction class. Direct use is discouraged: use the KnowledgeChunk.addDocument instead.

Parameters:
doc - the origin of the extraction (represented by a Document object).
exKc - the extracted knowledge chunk (represented by a KnowledgeChunk object).
weight - the weight (importance) of this KC with reference to this extraction (usually used for the importance of the properties)
note - a textual annotation about the extraction of this KC
Method Detail

getId

public int getId()

Getter for the correspondent kc.extracted table row. Used by Hibernate.

Returns:
the identifier of this extraction (database purposes only).

getDocument

public Document getDocument()

Getter for the document field.

Returns:
the document, origin of the extraction represented by an instance of this class.

setDocument

protected void setDocument(Document document)

Setter for the document field. Direct use normally not needed: use KnowledgeChunk.addDocument instead.

Parameters:
document - the document, origin of the extraction represented by an instance of this class.
See Also:
KnowledgeChunk.addDocument(Document)

getExtractedKc

public KnowledgeChunk getExtractedKc()

Getter for the kc field.

Returns:
the knowledge chunk, subject of the extraction represented by an instance of this class.

setExtractedKc

protected void setExtractedKc(KnowledgeChunk kc)

Setter for the kc field. Direct use normally not needed: use KnowledgeChunk.addDocument instead.

Parameters:
kc - the knowledge chunk, subject of the extraction represented by an instance of this class.
See Also:
KnowledgeChunk.addDocument(Document)

getWeight

public Double getWeight()

Getter for the weight field. Representation of the weight associated to this extraction.

Returns:
the weight of this extraction.

setWeight

public void setWeight(Double weight)

Setter for the weight field. Representation of the weight associated to this extraction.

Parameters:
weight - the weight of this extraction.

getCode

public Integer getCode()

Getter for the code field.

Returns:
code.

setCode

public void setCode(Integer code)

Setter for the code field.

Parameters:
code - the code of this extraction.

getNote

public String getNote()

Getter for the note field. Could contain usefull information about this extraction.

Returns:
extraction notes.

setNote

public void setNote(String note)

Setter for the note field. Could contain usefull information about this extraction.

Parameters:
note - extraction notes.