public class OntologyBuilder
extends com.exalead.gni.GNIObject
Constructor and Description |
---|
OntologyBuilder(MOTPipeInterface pipe)
Initialize an ontology builder
|
OntologyBuilder(MOTPipeInterface pipe,
java.lang.String filename)
Initialize an ontology builder
|
OntologyBuilder(MOTPipeInterface pipe,
java.lang.String filename,
java.lang.String prefix)
Initialize an ontology builder
|
OntologyBuilder(MOTPipeInterface pipe,
java.lang.String filename,
java.lang.String prefix,
boolean matchOnSeparators)
Initialize an ontology builder
|
OntologyBuilder(MOTPipeInterface pipe,
java.lang.String filename,
java.lang.String prefix,
java.lang.String[] skippedSeparators)
Initialize an ontology builder
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(int exprId,
java.lang.String displayForm,
int displayKind,
int[] tids,
int trustLevel,
int lang)
Add an entry to the ontology
|
int |
addExpr(java.lang.String expr,
int level,
int lang)
Add an expression to the ontology
|
void |
addOntology(Ontology ontology)
Add an ontology object to the ontology being built
|
int |
addTag(java.lang.String tag)
Add a new tag
|
boolean |
compile(java.lang.String filename)
Compiles the ontology without bloom filter
|
boolean |
compileWithBloom(java.lang.String dirname)
Compiles the ontology with a bloom filter
|
protected void |
finalize() |
int |
getTagId(java.lang.String tag)
Get the tag id of an existing tag
|
public OntologyBuilder(MOTPipeInterface pipe, java.lang.String filename, java.lang.String prefix, boolean matchOnSeparators)
pipe
- A mot pipeline to normalize entriesfilename
- The name of the old compiled ontologyprefix
- A prefix to add to every annotation (may be null)matchOnSeparators
- Make the ontology match on separatorspublic OntologyBuilder(MOTPipeInterface pipe, java.lang.String filename, java.lang.String prefix, java.lang.String[] skippedSeparators)
pipe
- A mot pipeline to normalize entriesfilename
- The name of the old compiled ontologyprefix
- A prefix to add to every annotation (may be null)skippedSeparators
- Skipped separatorspublic OntologyBuilder(MOTPipeInterface pipe, java.lang.String filename, java.lang.String prefix)
pipe
- A mot pipeline to normalize entriesfilename
- The name of the old compiled ontologyprefix
- A prefix to add to every annotation (may be null)public OntologyBuilder(MOTPipeInterface pipe, java.lang.String filename)
pipe
- A mot pipeline to normalize entriesfilename
- The name of the old compiled ontologypublic OntologyBuilder(MOTPipeInterface pipe)
pipe
- A mot pipeline to normalize entriespublic int addTag(java.lang.String tag)
tag
- The tagpublic int getTagId(java.lang.String tag)
tag
- The tagpublic int addExpr(java.lang.String expr, int level, int lang)
expr
- The expression to addlevel
- The level of the expression (exact, lowercase, normalized...)lang
- The language of the expressionpublic void addEntry(int exprId, java.lang.String displayForm, int displayKind, int[] tids, int trustLevel, int lang)
exprId
- The entry expression iddisplayForm
- The display form of the entrydisplayKind
- The display kind of the entrytids
- The tids of the packages to which add the entrytrustLevel
- The trust level of the entrylang
- The language of the entrypublic boolean compile(java.lang.String filename)
public boolean compileWithBloom(java.lang.String dirname)
public void addOntology(Ontology ontology) throws java.lang.Exception
ResourceNotFoundException
javax.xml.bind.JAXBException
java.lang.Exception
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Copyright © 2013 Dassault Systèmes, All Rights Reserved.