public class RF1Importer extends BaseImporter
| Modifier and Type | Class and Description |
|---|---|
protected class |
RF1Importer.RoleValuePair |
BaseImporter.ImportEntry, BaseImporter.Module| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Set<String>> |
children |
protected InputStream |
conceptsFile |
protected SnomedMetadata |
metadata
Contains the meta-data necessary to transform the distribution form of
SNOMED into a DL model.
|
protected Map<String,Set<String>> |
parents |
protected Map<String,String> |
primitive |
protected List<String> |
problems |
protected InputStream |
relationshipsFile |
protected Map<String,List<String[]>> |
rels |
protected Map<String,Map<String,String>> |
roles |
protected String |
version |
| Constructor and Description |
|---|
RF1Importer(InputStream conceptsFile,
InputStream relationshipsFile,
String version)
Creates a new
RF1Importer. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
VersionRows |
extractVersionRows()
Processes the raw RF1 files and generates a
VersionRows. |
SnomedMetadata |
getMetadata() |
Iterator<Ontology> |
getOntologyVersions(IProgressMonitor monitor)
There are several models used to represent ontologies that have been adopted by different groups.
|
List<String> |
getProblems()
Returns a list of problems that happened during the import process.
|
protected Set<Set<RF1Importer.RoleValuePair>> |
groupRoles(List<String[]> groups) |
protected void |
populateChildren(String src,
String tgt) |
protected void |
populateParent(String src,
String tgt) |
protected void |
populateRels(String src,
String role,
String tgt,
String group) |
protected void |
populateRoleDef(String code,
String rightId,
String parentRole) |
protected void |
populateRoles(Set<String> roles,
String parentSCTID) |
boolean |
usesConcreteDomains() |
protected final InputStream conceptsFile
protected final InputStream relationshipsFile
protected final String version
protected SnomedMetadata metadata
public RF1Importer(InputStream conceptsFile, InputStream relationshipsFile, String version)
RF1Importer.conceptsFile - descriptionsFile - relationshipsFile - version - The version of this ontology.public Iterator<Ontology> getOntologyVersions(IProgressMonitor monitor)
IImporterThere are several models used to represent ontologies that have been adopted by different groups. In this implementation a model based on SNOMED's RF2 format is used because it contains features that are not available in other formats.
An ontology in RF2 maps to a set of interdependent modules. This method returns all the ontologies found in a set of files. Implementations of importers for other file formats can simply return a single ontology.
If the files contain related modules then all of them are returned as a single ontology. This method returns an iterator that allows importing each ontology version.
monitor - A progress monitor.protected Set<Set<RF1Importer.RoleValuePair>> groupRoles(List<String[]> groups)
public void clear()
public List<String> getProblems()
IImporterImportException is thrown to get a detailed list of problems.public boolean usesConcreteDomains()
public VersionRows extractVersionRows()
VersionRows.public SnomedMetadata getMetadata()
Copyright © 2018 Australian e-Health Research Centre. All Rights Reserved.