edu.mayo.informatics.lexgrid.convert.directConversions.semnet
Class SemNetToLg

java.lang.Object
  extended by edu.mayo.informatics.lexgrid.convert.directConversions.semnet.SemNetToLg

public class SemNetToLg
extends java.lang.Object

Reads SemanticNet -> EMF The UMLS semantic network files provide an indication of both stated and inherited relationships. Parameter inheritanceLevel_ provided through LoaderPreference XML file, controls which relationships are loaded and navigable within the LexBIG repository. When selecting the option to load none(inheritanceLevel_ = 0) of the inherited relationships, all associations are extracted from the source file SRSTR. When loading all(inheritanceLevel_ = 1) inherited relations, associations are extracted from the source file SRSTRE1. An additional option(inheritanceLevel_ = 2) is provided to load only stated relations for direct subclass ('is_a') associations, but inherited relationships for all other associations. Direct or stated relationships are always imported, regardless of the selected option

Version:
subversion $Revision: 1052 $ checked in on $Date: 2006-01-30 05:42:24 -0600 (Mon, 30 Jan 2006) $
Author:
Thomas Johnson, Dan Armbrust, Sridhar Dwarkanath

Constructor Summary
SemNetToLg(java.net.URI fileLocation, java.lang.Integer inheritanceLevel, LgMessageDirectorIF messages)
           
 
Method Summary
 void closeStreamedRead()
           
 boolean getStreamingOn()
           
protected  java.lang.String getTermsAndConditions()
          Return the license agreement.
 URNVersionPair[] getUrnVersionPairs()
           
protected  void initScheme(CodingScheme scheme)
          Initialize metadata for the scheme.
protected  void populateAllInferredRelations(CodingScheme scheme, java.util.Map codeToRelation, java.util.Map codeToRelDescription, java.util.Map codeToRevRelation, boolean skipIsA)
          Populates the relations container with all inferred relations for the coding scheme.
protected  void populateConcepts(CodingScheme scheme, java.util.Map codeToRelation, java.util.Map codeToRelDescription, java.util.Map codeToRevRelation, java.util.Map termToCode)
          Populates the concepts container for the coding scheme.
protected  void populateNoInferredRelations(CodingScheme scheme, java.util.Map codeToRelation, java.util.Map codeToRelDescription, java.util.Map codeToRevRelation, java.util.Map termToCode, boolean onlyIsA)
          Populates the relations container with no inferred relations for the coding scheme.
 CodingScheme[] readAllCodingSchemes()
           
 CodingScheme readCodingScheme()
           
 CodingScheme readCodingScheme(java.lang.String registeredName)
           
 void setStreamingOn(boolean streamOn)
           
 java.util.Iterator streamedReadOnAssociationInstances(CodingScheme codingScheme, Relations relationsContainer, Association associationContainer)
           
 java.util.Iterator streamedReadOnAssociations(CodingScheme codingScheme, Relations relationsContainer)
           
 java.util.Iterator streamedReadOnConcepts(CodingScheme codingScheme, Entities conceptsContainer)
           
 boolean supportsStreamedRead(CodingScheme codingScheme)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemNetToLg

public SemNetToLg(java.net.URI fileLocation,
                  java.lang.Integer inheritanceLevel,
                  LgMessageDirectorIF messages)
Method Detail

readCodingScheme

public CodingScheme readCodingScheme()
                              throws java.lang.Exception
Throws:
java.lang.Exception

initScheme

protected void initScheme(CodingScheme scheme)
                   throws java.io.IOException
Initialize metadata for the scheme.

Parameters:
scheme -
Throws:
java.io.IOException

populateConcepts

protected void populateConcepts(CodingScheme scheme,
                                java.util.Map codeToRelation,
                                java.util.Map codeToRelDescription,
                                java.util.Map codeToRevRelation,
                                java.util.Map termToCode)
                         throws java.io.IOException
Populates the concepts container for the coding scheme.

Parameters:
scheme -
codeToRelation -
codeToRelDescription -
codeToRevRelation -
Throws:
java.io.IOException

populateNoInferredRelations

protected void populateNoInferredRelations(CodingScheme scheme,
                                           java.util.Map codeToRelation,
                                           java.util.Map codeToRelDescription,
                                           java.util.Map codeToRevRelation,
                                           java.util.Map termToCode,
                                           boolean onlyIsA)
                                    throws java.io.IOException
Populates the relations container with no inferred relations for the coding scheme.

Parameters:
scheme -
codeToRelation -
codeToRelDescription -
codeToRevRelation -
termToCode -
Throws:
java.io.IOException

populateAllInferredRelations

protected void populateAllInferredRelations(CodingScheme scheme,
                                            java.util.Map codeToRelation,
                                            java.util.Map codeToRelDescription,
                                            java.util.Map codeToRevRelation,
                                            boolean skipIsA)
                                     throws java.io.IOException
Populates the relations container with all inferred relations for the coding scheme.

Parameters:
scheme -
codeToRelation -
codeToRelDescription -
codeToRevRelation -
Throws:
java.io.IOException

getTermsAndConditions

protected java.lang.String getTermsAndConditions()
Return the license agreement. First try to resolve from a license.txt file in the source directory. If not available, return the default.

Returns:
The associated license terms for the source.

getUrnVersionPairs

public URNVersionPair[] getUrnVersionPairs()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

readAllCodingSchemes

public CodingScheme[] readAllCodingSchemes()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

readCodingScheme

public CodingScheme readCodingScheme(java.lang.String registeredName)
                              throws java.lang.Exception
Throws:
java.lang.Exception

streamedReadOnAssociations

public java.util.Iterator streamedReadOnAssociations(CodingScheme codingScheme,
                                                     Relations relationsContainer)
                                              throws java.lang.Exception
Throws:
java.lang.Exception

streamedReadOnAssociationInstances

public java.util.Iterator streamedReadOnAssociationInstances(CodingScheme codingScheme,
                                                             Relations relationsContainer,
                                                             Association associationContainer)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception

streamedReadOnConcepts

public java.util.Iterator streamedReadOnConcepts(CodingScheme codingScheme,
                                                 Entities conceptsContainer)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

supportsStreamedRead

public boolean supportsStreamedRead(CodingScheme codingScheme)

closeStreamedRead

public void closeStreamedRead()

setStreamingOn

public void setStreamingOn(boolean streamOn)

getStreamingOn

public boolean getStreamingOn()

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.