|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LemonModel
Interface that contains a set of lexica and manages the URIs for all elements of the model. The seperation of URIs and the structure of the lemon model is intended to allow for models to be created quickly as individual elements frequently have stereotypical URIs.
Field Summary | |
---|---|
static String |
LEMON_URI
The URI for lemon |
Method Summary | ||
---|---|---|
Lexicon |
addLexicon(URI uri,
String language)
Add a (new blank) lexicon |
|
void |
addPattern(MorphPattern pattern)
Add a pattern to the model |
|
URI |
getContext()
Get the base URI of the model. |
|
LemonFactory |
getFactory()
Get the factory for making new elements |
|
Collection<Lexicon> |
getLexica()
Get the set of lexica contained by this model |
|
Collection<MorphPattern> |
getPatterns()
Get all patterns now in the model |
|
void |
importLexicon(Lexicon lexicon,
LinguisticOntology lingOnto)
Import a lexicon from another model |
|
|
merge(Elem from,
Elem to)
Merge two elements |
|
void |
purgeLexicon(Lexicon lexicon,
LinguisticOntology lingOnto)
Remove a lexicon and all entries |
|
|
query(Class<Elem> target,
String sparqlQuery)
Return all elements in the lemon model matching some certain SPARQL query |
|
void |
removeLexicon(Lexicon lexicon)
Remove a lexicon from the repository. |
Field Detail |
---|
static final String LEMON_URI
Method Detail |
---|
Collection<Lexicon> getLexica()
URI getContext()
LemonFactory getFactory()
Lexicon addLexicon(URI uri, String language)
void removeLexicon(Lexicon lexicon)
void purgeLexicon(Lexicon lexicon, LinguisticOntology lingOnto)
lexicon
- The lexiconlingOnto
- The linguistic ontology used for links in the lexicon. If this
is incorrect it may result in links being followed that are not in the model
resulting in to many entries being deletedvoid importLexicon(Lexicon lexicon, LinguisticOntology lingOnto)
lexicon
- The lexiconlingOnto
- The linguistic ontology used for links in the lexicon. If this
is incorrect it may result in links being followed that are not in the model
resulting in to many entries being imported<Elem extends LemonElementOrPredicate> Iterator<Elem> query(Class<Elem> target, String sparqlQuery)
target
- The class of the targetsparqlQuery
- The query in sparql, must be a select query returning a single variable
<Elem extends LemonElement> void merge(Elem from, Elem to)
from
- The element to be removedto
- The element to be preservedvoid addPattern(MorphPattern pattern)
pattern
- The patternCollection<MorphPattern> getPatterns()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |