Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OntoSim 2.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.inrialpes.exmo.ontosim.vector.model
Class Document

    java.lang.Object
      java.util.Observable
          fr.inrialpes.exmo.ontosim.vector.model.Document

    public class Document

extends Observable

Field Summary
`private int` | `cardDoc`
`private String` | `name`
`private Map<String,Integer>` | `termsOcc`

Constructor Summary
`Document(String name)`

Method Summary
`void` | `addOccTerm(String term)`
`void` | `addOccTerms(Collection<String> terms)`
`boolean` | `contains(String term)`
`int` | `getCardinality()`
`String` | `getName()`
`int` | `getNbOcc(String term)` return the number of occurrences of the given term in the document
`String[]` | `getTerms()`
`double` | `getTF(String term)`

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### name

    private String name

### cardDoc

    private int cardDoc

### termsOcc

    private Map<String,Integer> termsOcc

Constructor Detail

### Document

    public Document(String name)

Method Detail

### addOccTerm

    public void addOccTerm(String term)

### addOccTerms

    public void addOccTerms(Collection<String> terms)

### getCardinality

    public int getCardinality()

### getNbOcc

    public int getNbOcc(String term)

  return the number of occurrences of the given term in the document

  Parameters:
    `term` - : a term
  Returns:
    the number of occurrences of given term if it apear in the document (0 if it does not appear)

### getTerms

    public String[] getTerms()

### contains

    public boolean contains(String term)

### getTF

    public double getTF(String term)

### getName

    public String getName()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OntoSim 2.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) INRIA & friends, 2008-2009