gov.llnl.ontology.wordnet
Class TagLinkedOntologyReader

java.lang.Object
  extended by gov.llnl.ontology.wordnet.OntologyReaderAdaptor
      extended by gov.llnl.ontology.wordnet.TagLinkedOntologyReader
All Implemented Interfaces:
OntologyReader

public class TagLinkedOntologyReader
extends OntologyReaderAdaptor

This OntologyReader provides a mapping between a set of document tags and a set of Sysnet names. It maps maps tags to Sysnets via the getSynset(java.lang.String) method which will interpret the given name as a tag and return the Synset associated with that tag name. All other accessor methods to Sysnets are unchanged and will not do the mapping.

Author:
Keith Stevens

Field Summary
 
Fields inherited from class gov.llnl.ontology.wordnet.OntologyReaderAdaptor
reader
 
Constructor Summary
TagLinkedOntologyReader(OntologyReader reader, Map<String,String> tagMap)
          Conctructs a new TagLinkedOntologyReader that decorates the given OntologyReader with a mapping from tags to Synset names as detailed by tagMap.
 
Method Summary
 Synset getSynset(String tagName)
          Returns the Synset linked to by the given tagName.
 
Methods inherited from class gov.llnl.ontology.wordnet.OntologyReaderAdaptor
addSynset, addSynset, allSynsets, allSynsets, getMaxDepth, getSynset, getSynsets, getSynsets, morphy, morphy, removeSynset, replaceSynset, wordnetTerms, wordnetTerms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.llnl.ontology.wordnet.OntologyReader
getSynsets
 

Constructor Detail

TagLinkedOntologyReader

public TagLinkedOntologyReader(OntologyReader reader,
                               Map<String,String> tagMap)
Conctructs a new TagLinkedOntologyReader that decorates the given OntologyReader with a mapping from tags to Synset names as detailed by tagMap.

Parameters:
reader - The OntologyReader to adapt
tagMap - The mapping from tag names to Sysnet names.
Method Detail

getSynset

public Synset getSynset(String tagName)
Returns the Synset linked to by the given tagName. If tagName does not correspond with any Synset name, this returns null.

Specified by:
getSynset in interface OntologyReader
Overrides:
getSynset in class OntologyReaderAdaptor


Copyright © 2010-2011. All Rights Reserved.