Class OntoLexLemon

java.lang.Object
it.uniroma2.art.semanticturkey.services.STServiceAdapter
it.uniroma2.art.semanticturkey.services.core.OntoLexLemon
All Implemented Interfaces:
NewerNewStyleService, STService

@STService public class OntoLexLemon extends STServiceAdapter
This class provides services for manipulating data based on the W3C OntoLex-Lemon Model.
Author:
Manuel Fiorelli
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.eclipse.rdf4j.model.IRI
     
    static final org.eclipse.rdf4j.model.IRI
     
    static final org.eclipse.rdf4j.model.IRI
     
    static final org.eclipse.rdf4j.model.IRI
     

    Fields inherited from class it.uniroma2.art.semanticturkey.services.STServiceAdapter

    applicationEventPublisher, cfManager, exptManager, stServiceContext
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addConcept(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource newConcept, boolean createPlain)
    Adds a lexical concept to a lexical sense.
    void
    addConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept, boolean createPlain, boolean createSense, org.eclipse.rdf4j.model.IRI lexicalSenseCls, CustomFormValue customFormValue)
    Adds a conceptualization of the RDF resource concept using the ontolex:LexicalEntry lexicalEntry.
    protected void
    addDefininitionInternal(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, org.eclipse.rdf4j.repository.RepositoryConnection con, org.eclipse.rdf4j.model.IRI pred)
     
    void
    addDefinition(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Literal value, org.eclipse.rdf4j.model.Resource lexicon)
    Allows the addition of a definition
    protected void
    addFormInternal(org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, org.eclipse.rdf4j.model.IRI lexicalEntry, CustomFormValue customFormValue, org.eclipse.rdf4j.model.IRI property, boolean replaces)
     
    void
    addFormRepresentation(org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, org.eclipse.rdf4j.model.IRI property)
    Adds a representation to an ontolex:Form.
    void
    addLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference, boolean createPlain, boolean createSense, org.eclipse.rdf4j.model.IRI lexicalSenseCls, CustomFormValue customFormValue)
    Adds a lexicalization of the RDF resource reference using the ontolex:LexicalEntry lexicalEntry.
    void
    addOtherForm(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, CustomFormValue customFormValue)
    Adds an other form of a given lexical entry.
    void
    addSubterm(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI sublexicalEntry, org.eclipse.rdf4j.model.IRI property)
    Adds a subterm to an ontolex:LexicalEntry.
    void
    clearLexicalEntryConstituents(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Sets the constituents of a lexical entry
    countLexicalEntriesByAlphabeticIndex(@Length(min=1) String index, org.eclipse.rdf4j.model.IRI lexicon)
     
    AnnotatedValue<org.eclipse.rdf4j.model.IRI>
    createLexicalEntry(org.eclipse.rdf4j.model.IRI newLexicalEntry, org.eclipse.rdf4j.model.IRI lexicalEntryCls, @LanguageTaggedString org.eclipse.rdf4j.model.Literal canonicalForm, org.eclipse.rdf4j.model.IRI lexicon, CustomFormValue customFormValue)
    Creates a new ontolex:LexicalEntry.
    AnnotatedValue<org.eclipse.rdf4j.model.IRI>
    createLexicon(org.eclipse.rdf4j.model.IRI newLexicon, String language, @LanguageTaggedString org.eclipse.rdf4j.model.Literal title, CustomFormValue customFormValue)
    Creates a new lime:Lexicon for the provided language.
    void
    createLexicoSemanticRelation(org.eclipse.rdf4j.model.Resource source, org.eclipse.rdf4j.model.Resource target, boolean undirectional, org.eclipse.rdf4j.model.IRI category, org.eclipse.rdf4j.model.IRI relationClass, org.eclipse.rdf4j.model.Resource translationSet)
    Creates a lexico-semantic relation.
    AnnotatedValue<org.eclipse.rdf4j.model.IRI>
    createTranslationSet(org.eclipse.rdf4j.model.IRI newTranslationSet, CustomFormValue customFormValue)
    Creates a new vartrans:TranslationSet.
    void
    deleteLexicalEntry(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Deletes a lexical entry.
    void
    deleteLexicalRelation(@HasType("http://www.w3.org/ns/lemon/vartrans#LexicalRelation") org.eclipse.rdf4j.model.Resource relation)
    Deletes a lexical relation between two lexical entries.
    void
    deleteLexicon(org.eclipse.rdf4j.model.IRI lexicon, boolean updateModificationTimestamps)
    Deletes a lexicon.
    protected void
    deleteLexicoSemanticRelationInternal(org.eclipse.rdf4j.model.Resource relation)
     
    void
    deleteSenseRelation(@HasType("http://www.w3.org/ns/lemon/vartrans#SenseRelation") org.eclipse.rdf4j.model.Resource relation)
    Deletes a sense relation between two lexical senses.
    void
    deleteTranslationSet(org.eclipse.rdf4j.model.IRI translationSet)
    Deletes a translation set.
    org.eclipse.rdf4j.model.IRI
    generateFormIRI(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.Literal writtenRep, org.eclipse.rdf4j.model.IRI formProperty)
    Generates a new URI for an ontolex:Form, given its written representation, the lexical entry it is attached to and the property used for the binding.
    org.eclipse.rdf4j.model.IRI
    generateLexicalEntryURI(org.eclipse.rdf4j.model.Literal canonicalForm, org.eclipse.rdf4j.model.IRI lexicon)
    Generates a new URI for an ontolex:LexicalEntry, optionally given its accompanying canonicalForm and the lexicon it was attached to.
    org.eclipse.rdf4j.model.IRI
    generateLexicalSenseIRI(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference)
    Generates a new URI for an ontolex:LexicalSense, given its lexical entry and reference.
    org.eclipse.rdf4j.model.IRI
    generateLexiconURI(org.eclipse.rdf4j.model.Literal title)
    Generates a new URI for a lime:Lexicon, optionally given its accompanying title.
    org.eclipse.rdf4j.model.IRI
    Generates a new URI for a vartrans:TranslationSet.
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>>
    getConceptualRelationCategories(org.eclipse.rdf4j.model.Resource lexicon)
    Returns the categories of conceptual relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
    protected static org.eclipse.rdf4j.model.IRI
    getDefinitionPredicate(org.eclipse.rdf4j.model.Resource lexicon, org.eclipse.rdf4j.repository.RepositoryConnection con)
     
    getFormLanguage(org.eclipse.rdf4j.model.Resource form)
    Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
    getFormLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.Resource form)
    Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
    getLexicalEntriesByAlphabeticIndex(@Length(min=1) String index, org.eclipse.rdf4j.model.IRI lexicon)
    Returns the entries in a given lexicon that starts with the supplied index consisting of two characters.
    getLexicalEntryIndex(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Returns the 2-digits index of the given lexicalEntry
    getLexicalEntryLanguage(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
    getLexicalEntryLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI lexicalEntry)
    Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
    getLexicalEntryLexicons(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Returns the lexicons which the lexicalEntry belongs to
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
    getLexicalEntrySenses(org.eclipse.rdf4j.model.IRI lexicalEntry)
    Returns the senses of a lexicalEntry
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>>
    getLexicalRelationCategories(org.eclipse.rdf4j.model.Resource lexicon)
    Returns the categories of lexical relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
    getLexiconLanguage(org.eclipse.rdf4j.model.IRI lexicon)
    Returns the language of a lexicon
    getLexiconLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI lexicon)
    Returns the language declared by the provided lexicon
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
    Returns lexicons.
    protected static Set<org.eclipse.rdf4j.model.IRI>
    getLinguisticCatalogs(org.eclipse.rdf4j.repository.RepositoryConnection con, org.eclipse.rdf4j.model.Resource lexicon)
     
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>>
    getSenseRelationCategories(org.eclipse.rdf4j.model.Resource lexicon)
    Returns the categories of sense relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
    Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
    Returns lexicons.
    static boolean
    isLanguageComaptibleWithLexiconMetadata(org.eclipse.rdf4j.repository.RepositoryConnection conn, String language, org.eclipse.rdf4j.model.IRI lexicon)
    Checks whether the given language is compatible to the one specified in the lexicon
    protected boolean
    isLocallyDefined(org.eclipse.rdf4j.model.Resource resource)
     
    static boolean
    langMatches(String language, String languageRange)
    Checks whether the provided language is compatible with the given language range
    org.eclipse.rdf4j.model.Model
    prepareClearLexicalEntryConstituents(org.eclipse.rdf4j.model.IRI lexicalEntry)
     
    void
    removeConcept(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource concept, boolean deletePlain)
    Removes a lexical concept from a lexical sense.
    void
    removeConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept)
    Removes a conceptualization.
    void
    removeDefinition(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, org.eclipse.rdf4j.model.Resource lexicon)
    Allows the deletion of a definition
    void
    removeForm(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.IRI property, org.eclipse.rdf4j.model.Resource form)
    Removes a form of a lexical entry, and deletes it.
    void
    removeFormRepresentation(org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, org.eclipse.rdf4j.model.IRI property)
    Removes a representations from an ontolex:Form.
    void
    removeLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference)
    Removes a lexicalization.
    void
    removePlainConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept)
    Removes a plain conceptualization.
    void
    removePlainLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference)
    Removes a plain lexicalization.
    void
    removeReifiedLexicalization(org.eclipse.rdf4j.model.Resource lexicalSense, boolean removePlain)
    Removes a reified lexicalization expressed as an ontolex:LexicalSense.
    void
    removeSense(org.eclipse.rdf4j.model.Resource lexicalSense, boolean removePlain)
    Removes a lexical sense (see ontolex:LexicalSense).
    void
    removeSubterm(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI sublexicalEntry, org.eclipse.rdf4j.model.IRI property)
    Removes a subterm from an ontolex:LexicalEntry.
    void
    setCanonicalForm(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, CustomFormValue customFormValue)
    Sets the canonical form of a given lexical entry.
    void
    setLexicalEntryConstituents(org.eclipse.rdf4j.model.IRI lexicalEntry, List<org.eclipse.rdf4j.model.IRI> constituentLexicalEntries, boolean ordered)
    Sets the constituents of a lexical entry
    void
    setReference(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource newReference, boolean deletePlain, boolean createPlain)
    Sets the reference of a lexical sense.
    static <T> boolean
    sortConstituents(List<T> values, Function<T,org.eclipse.rdf4j.model.Resource> valueExtractor, org.eclipse.rdf4j.model.Model statements, org.eclipse.rdf4j.model.Resource subjectResource)
     
    void
    updateDefinition(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, org.eclipse.rdf4j.model.Literal newValue, org.eclipse.rdf4j.model.Resource lexicon)
    Allows the update of definitions
    void
    updateFormRepresentation(org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, org.eclipse.rdf4j.model.Literal newRepresentation, org.eclipse.rdf4j.model.IRI property)
    Updates a representation of an ontolex:Form.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LEXINFO

      public static final org.eclipse.rdf4j.model.IRI LEXINFO
    • WN

      public static final org.eclipse.rdf4j.model.IRI WN
    • MORPHOSYNTACTIC_PROPERTY

      public static final org.eclipse.rdf4j.model.IRI MORPHOSYNTACTIC_PROPERTY
    • WN_DEFINITION

      public static final org.eclipse.rdf4j.model.IRI WN_DEFINITION
  • Constructor Details

    • OntoLexLemon

      public OntoLexLemon()
  • Method Details

    • createLexicon

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(limeLexicon)\', \'C\')") public AnnotatedValue<org.eclipse.rdf4j.model.IRI> createLexicon(@Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newLexicon, String language, @Optional @LanguageTaggedString @LanguageTaggedString org.eclipse.rdf4j.model.Literal title, @Optional CustomFormValue customFormValue) throws CODAException, CustomFormException, URIGenerationException
      Creates a new lime:Lexicon for the provided language.
      Parameters:
      newLexicon -
      language -
      title -
      customFormValue -
      Returns:
      Throws:
      CustomFormException
      CODAException
      URIGenerationException
    • getLexicons

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(limeLexicon)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getLexicons()
      Returns lexicons.
      Returns:
    • deleteLexicon

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(limeLexicon)\', \'D\')") public void deleteLexicon(@LocallyDefined @Deleted org.eclipse.rdf4j.model.IRI lexicon, @Optional(defaultValue="false") boolean updateModificationTimestamps)
      Deletes a lexicon.
      Parameters:
      lexicon -
      updateModificationTimestamps -
    • getLexiconLanguage

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(limeLexicon)\', \'R\')") public String getLexiconLanguage(@LocallyDefined org.eclipse.rdf4j.model.IRI lexicon)
      Returns the language of a lexicon
      Parameters:
      lexicon -
      Returns:
    • addDefinition

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', definitions)\',\'C\')") public void addDefinition(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Literal value, @Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon) throws URIGenerationException
      Allows the addition of a definition
      Parameters:
      resource -
      value -
      lexicon -
      Throws:
      CODAException
      URIGenerationException
    • getDefinitionPredicate

      protected static org.eclipse.rdf4j.model.IRI getDefinitionPredicate(org.eclipse.rdf4j.model.Resource lexicon, org.eclipse.rdf4j.repository.RepositoryConnection con) throws org.eclipse.rdf4j.query.QueryEvaluationException, org.eclipse.rdf4j.repository.RepositoryException
      Throws:
      org.eclipse.rdf4j.query.QueryEvaluationException
      org.eclipse.rdf4j.repository.RepositoryException
    • removeDefinition

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', definitions)\',\'D\')") public void removeDefinition(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, @Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon) throws URIGenerationException
      Allows the deletion of a definition
      Parameters:
      resource -
      value -
      lexicon -
      Throws:
      it.uniroma2.art.coda.exception.parserexception.PRParserException
      URIGenerationException
    • addDefininitionInternal

      protected void addDefininitionInternal(org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, org.eclipse.rdf4j.repository.RepositoryConnection con, org.eclipse.rdf4j.model.IRI pred) throws URIGenerationException, org.eclipse.rdf4j.repository.RepositoryException, org.eclipse.rdf4j.query.MalformedQueryException, org.eclipse.rdf4j.query.UpdateExecutionException
      Throws:
      URIGenerationException
      org.eclipse.rdf4j.repository.RepositoryException
      org.eclipse.rdf4j.query.MalformedQueryException
      org.eclipse.rdf4j.query.UpdateExecutionException
    • updateDefinition

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#resource)+ \', definitions)\',\'U\')") public void updateDefinition(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource resource, org.eclipse.rdf4j.model.Value value, org.eclipse.rdf4j.model.Literal newValue, @Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon)
      Allows the update of definitions
      Parameters:
      resource -
      value -
      newValue -
      lexicon -
      Throws:
      it.uniroma2.art.coda.exception.parserexception.PRParserException
    • createLexicalEntry

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'C\')") public AnnotatedValue<org.eclipse.rdf4j.model.IRI> createLexicalEntry(@Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newLexicalEntry, @Optional(defaultValue="<http://www.w3.org/ns/lemon/ontolex#LexicalEntry>") @SubClassOf(superClassIRI="http://www.w3.org/ns/lemon/ontolex#LexicalEntry") org.eclipse.rdf4j.model.IRI lexicalEntryCls, @LanguageTaggedString @LanguageTaggedString org.eclipse.rdf4j.model.Literal canonicalForm, @LocallyDefined @Modified org.eclipse.rdf4j.model.IRI lexicon, @Optional CustomFormValue customFormValue) throws CODAException, CustomFormException, URIGenerationException
      Creates a new ontolex:LexicalEntry.
      Parameters:
      newLexicalEntry -
      lexicalEntryCls -
      canonicalForm -
      lexicon -
      customFormValue -
      Returns:
      Throws:
      CODAException
      CustomFormException
      URIGenerationException
    • getLexicalEntryLanguage

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public String getLexicalEntryLanguage(@LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry)
      Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
      Parameters:
      lexicalEntry -
      Returns:
    • isLanguageComaptibleWithLexiconMetadata

      public static boolean isLanguageComaptibleWithLexiconMetadata(org.eclipse.rdf4j.repository.RepositoryConnection conn, String language, org.eclipse.rdf4j.model.IRI lexicon)
      Checks whether the given language is compatible to the one specified in the lexicon
      Parameters:
      conn -
      language -
      lexicon -
    • langMatches

      public static boolean langMatches(String language, String languageRange)
      Checks whether the provided language is compatible with the given language range
      Parameters:
      language -
      languageRange -
      Returns:
    • getLexiconLanguageInternal

      public static Optional<String> getLexiconLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI lexicon)
      Returns the language declared by the provided lexicon
      Parameters:
      conn -
      lexicon -
      Returns:
    • getLexicalEntryLanguageInternal

      public static Optional<String> getLexicalEntryLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.IRI lexicalEntry)
      Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
      Parameters:
      conn -
      lexicalEntry -
      Returns:
    • getFormLanguageInternal

      public static Optional<String> getFormLanguageInternal(org.eclipse.rdf4j.repository.RepositoryConnection conn, org.eclipse.rdf4j.model.Resource form)
      Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
      Parameters:
      conn -
      form -
      Returns:
    • getLexicalEntriesByAlphabeticIndex

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getLexicalEntriesByAlphabeticIndex(@Length(min=1) @Length(min=1) String index, @Optional org.eclipse.rdf4j.model.IRI lexicon)
      Returns the entries in a given lexicon that starts with the supplied index consisting of two characters.
      Parameters:
      index -
      lexicon -
      Returns:
    • countLexicalEntriesByAlphabeticIndex

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public Integer countLexicalEntriesByAlphabeticIndex(@Length(min=1) @Length(min=1) String index, @Optional org.eclipse.rdf4j.model.IRI lexicon)
    • deleteLexicalEntry

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'D\')") public void deleteLexicalEntry(@LocallyDefined @Deleted org.eclipse.rdf4j.model.IRI lexicalEntry)
      Deletes a lexical entry.
      Parameters:
      lexicalEntry -
    • getLexicalEntryIndex

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public String getLexicalEntryIndex(@LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry)
      Returns the 2-digits index of the given lexicalEntry
      Parameters:
      lexicalEntry -
      Returns:
    • getLexicalEntryLexicons

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getLexicalEntryLexicons(@LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry)
      Returns the lexicons which the lexicalEntry belongs to
      Parameters:
      lexicalEntry -
      Returns:
    • getLexicalEntrySenses

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getLexicalEntrySenses(@LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry)
      Returns the senses of a lexicalEntry
      Parameters:
      lexicalEntry -
      Returns:
    • addSubterm

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, subterms)\', \'C\')") public void addSubterm(@LocallyDefined @Modified org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI sublexicalEntry, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/decomp#subterm") @Optional(defaultValue="<http://www.w3.org/ns/lemon/decomp#subterm>") org.eclipse.rdf4j.model.IRI property)
      Adds a subterm to an ontolex:LexicalEntry.
      Parameters:
      lexicalEntry -
      sublexicalEntry -
      property -
    • removeSubterm

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, subterms)\', \'D\')") public void removeSubterm(@LocallyDefined @Modified org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.IRI sublexicalEntry, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/decomp#subterm") @Optional(defaultValue="<http://www.w3.org/ns/lemon/decomp#subterm>") org.eclipse.rdf4j.model.IRI property)
      Removes a subterm from an ontolex:LexicalEntry.
      Parameters:
      lexicalEntry -
      sublexicalEntry -
      property -
    • setLexicalEntryConstituents

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, constituents)\', \'C\')") public void setLexicalEntryConstituents(@LocallyDefined @Modified org.eclipse.rdf4j.model.IRI lexicalEntry, @LocallyDefinedResources List<org.eclipse.rdf4j.model.IRI> constituentLexicalEntries, boolean ordered) throws URIGenerationException, DeniedOperationException
      Sets the constituents of a lexical entry
      Parameters:
      lexicalEntry -
      constituentLexicalEntries -
      ordered -
      Throws:
      DeniedOperationException
      URIGenerationException
    • clearLexicalEntryConstituents

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, constituents)\', \'D\')") public void clearLexicalEntryConstituents(@LocallyDefined @Modified org.eclipse.rdf4j.model.IRI lexicalEntry) throws DeniedOperationException
      Sets the constituents of a lexical entry
      Parameters:
      lexicalEntry -
      Throws:
      DeniedOperationException
    • prepareClearLexicalEntryConstituents

      public org.eclipse.rdf4j.model.Model prepareClearLexicalEntryConstituents(org.eclipse.rdf4j.model.IRI lexicalEntry) throws org.eclipse.rdf4j.repository.RepositoryException, org.eclipse.rdf4j.query.MalformedQueryException, org.eclipse.rdf4j.query.QueryEvaluationException, DeniedOperationException, org.eclipse.rdf4j.query.UpdateExecutionException
      Throws:
      org.eclipse.rdf4j.repository.RepositoryException
      org.eclipse.rdf4j.query.MalformedQueryException
      org.eclipse.rdf4j.query.QueryEvaluationException
      DeniedOperationException
      org.eclipse.rdf4j.query.UpdateExecutionException
    • setCanonicalForm

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, lexicalForms)\', \'C\')") public void setCanonicalForm(@Modified @LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry, @Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, @Optional CustomFormValue customFormValue) throws URIGenerationException, CODAException, CustomFormException
      Sets the canonical form of a given lexical entry.
      Parameters:
      lexicalEntry -
      newForm -
      writtenRep -
      customFormValue -
      Throws:
      URIGenerationException
      CODAException
      CustomFormException
    • addOtherForm

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, lexicalForms)\', \'C\')") public void addOtherForm(@Modified @LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry, @Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, @Optional CustomFormValue customFormValue) throws URIGenerationException, CODAException, CustomFormException
      Adds an other form of a given lexical entry.
      Parameters:
      lexicalEntry -
      newForm -
      writtenRep -
      customFormValue -
      Throws:
      URIGenerationException
      CODAException
      CustomFormException
    • addFormInternal

      protected void addFormInternal(@Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newForm, @LanguageTaggedString @LanguageTaggedString org.eclipse.rdf4j.model.Literal writtenRep, @LocallyDefined org.eclipse.rdf4j.model.IRI lexicalEntry, @Optional CustomFormValue customFormValue, org.eclipse.rdf4j.model.IRI property, boolean replaces) throws URIGenerationException, CODAException, CustomFormException
      Throws:
      URIGenerationException
      CODAException
      CustomFormException
    • removeForm

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, lexicalForms)\', \'D\')") public void removeForm(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource lexicalEntry, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/ontolex#lexicalForm") org.eclipse.rdf4j.model.IRI property, @LocallyDefined org.eclipse.rdf4j.model.Resource form)
      Removes a form of a lexical entry, and deletes it.
      Parameters:
      lexicalEntry -
      property -
      form -
    • addFormRepresentation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexForm, formRepresentations)\', \'C\')") public void addFormRepresentation(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/ontolex#representation") org.eclipse.rdf4j.model.IRI property)
      Adds a representation to an ontolex:Form.
      Parameters:
      form -
      representation -
      property -
    • updateFormRepresentation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexForm, formRepresentations)\', \'U\')") public void updateFormRepresentation(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, org.eclipse.rdf4j.model.Literal newRepresentation, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/ontolex#representation") org.eclipse.rdf4j.model.IRI property)
      Updates a representation of an ontolex:Form.
      Parameters:
      form -
      representation -
      newRepresentation -
      property -
    • removeFormRepresentation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexForm, formRepresentations)\', \'D\')") public void removeFormRepresentation(@LocallyDefined @Modified org.eclipse.rdf4j.model.Resource form, org.eclipse.rdf4j.model.Literal representation, @SubPropertyOf(superPropertyIRI="http://www.w3.org/ns/lemon/ontolex#representation") org.eclipse.rdf4j.model.IRI property)
      Removes a representations from an ontolex:Form.
      Parameters:
      form -
      representation -
      property -
    • getFormLanguage

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexForm)\', \'R\')") public String getFormLanguage(@LocallyDefined org.eclipse.rdf4j.model.Resource form)
      Returns the language declared by the provided lexical entry, or as fallback the one declared by the lexicon
      Parameters:
      form -
      Returns:
    • addLexicalization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#reference)+ \', lexicalization)\', \'C\')") public void addLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference, boolean createPlain, boolean createSense, @SubClassOf(superClassIRI="http://www.w3.org/ns/lemon/ontolex#LexicalSense") @Optional(defaultValue="<http://www.w3.org/ns/lemon/ontolex#LexicalSense>") org.eclipse.rdf4j.model.IRI lexicalSenseCls, @Optional CustomFormValue customFormValue) throws URIGenerationException, CODAException, CustomFormException
      Adds a lexicalization of the RDF resource reference using the ontolex:LexicalEntry lexicalEntry. If createPlain is true, then a plain lexicalization directly connecting the lexical entry and the reference is created as follows:
      • If lexicalEntry is defined in the working graph (see STServiceContext.getWGraph(), then a triple with the property ontolex:denotes is asserted;
      • If reference is defined in the working graph, then a triple with the property {@code ontolex:isDenoted is asserted;</li> <li>If neither is defined in the working graph, then an exception is thrown.</li> </ul> If {@code createSense} is {@code true}, then an {@code ontolex:LexicalSense} is created (possibly in addition to the plain lexicalization) and connected to the lexical entry and the reference following a policy analogous to the one already described. Differently from the case above, the creation of a sense does not fail if both the lexical entry and the reference aren't locally defined. Indeed, the service will just create a sense and connect it to both. @param lexicalEntry @param reference @param createPlain @param createSense @param lexicalSenseCls @param customFormValue @throws URIGenerationException @throws CustomFormException @throws CODAException
      Throws:
      URIGenerationException
      CODAException
      CustomFormException
    • isLocallyDefined

      protected boolean isLocallyDefined(org.eclipse.rdf4j.model.Resource resource) throws org.eclipse.rdf4j.repository.RepositoryException, org.eclipse.rdf4j.query.MalformedQueryException
      Throws:
      org.eclipse.rdf4j.repository.RepositoryException
      org.eclipse.rdf4j.query.MalformedQueryException
    • removeLexicalization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#reference)+ \', lexicalization)\', \'D\')") public void removeLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference)
      Removes a lexicalization. This operation removes both the plain lexicalization and its reification through a sense. Is also address the triples connecting the resources in both directions.
      Parameters:
      lexicalEntry -
      reference -
    • removePlainLexicalization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#reference)+ \', lexicalization)\', \'D\')") public void removePlainLexicalization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference)
      Removes a plain lexicalization. This operation removes the triples connecting the lexical entry and the reference in both directions.
      Parameters:
      lexicalEntry -
      reference -
    • removeReifiedLexicalization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(resource, lexicalization)\', \'D\')") public void removeReifiedLexicalization(@Deleted org.eclipse.rdf4j.model.Resource lexicalSense, boolean removePlain)
      Removes a reified lexicalization expressed as an ontolex:LexicalSense. Optionally, it is possible to remove the corresponding plain lexicalization(s).
      Parameters:
      lexicalSense -
      removePlain -
    • addConceptualization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, conceptualization)\', \'C\')") public void addConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept, boolean createPlain, boolean createSense, @SubClassOf(superClassIRI="http://www.w3.org/ns/lemon/ontolex#LexicalSense") @Optional(defaultValue="<http://www.w3.org/ns/lemon/ontolex#LexicalSense>") org.eclipse.rdf4j.model.IRI lexicalSenseCls, @Optional CustomFormValue customFormValue) throws URIGenerationException, CODAException, CustomFormException
      Adds a conceptualization of the RDF resource concept using the ontolex:LexicalEntry lexicalEntry. If createPlain is true, then a plain conceptualization directly connecting the lexical entry and the reference is created as follows:
      • If lexicalEntry is defined in the working graph (see STServiceContext.getWGraph(), then a triple with the property ontolex:evokes is asserted;
      • If concept is defined in the working graph, then a triple with the property ontolex:isEvokedBy is asserted;
      • If neither is defined in the working graph, then an exception is thrown.
      If createSense is true, then an ontolex:LexicalSense is created (possibly in addition to the plain conceptualization) and connected to the lexical entry and the reference following a policy analogous to the one already described. Differently from the case above, the creation of a sense does not fail if both the lexical entry and the reference aren't locally defined. Indeed, the service will just create a sense and connect it to both.
      Parameters:
      lexicalEntry -
      concept -
      createPlain -
      createSense -
      lexicalSenseCls -
      customFormValue -
      Throws:
      URIGenerationException
      CustomFormException
      CODAException
    • removePlainConceptualization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, conceptualization)\', \'D\')") public void removePlainConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept)
      Removes a plain conceptualization. This operation removes the triples connecting the lexical entry and the concpet in both directions.
      Parameters:
      lexicalEntry -
      concept -
    • removeConceptualization

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#concept)+ \', conceptualization)\', \'D\')") public void removeConceptualization(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource concept)
      Removes a conceptualization. This operation removes both the plain conceptualization and its reification through a sense. Is also address the triples connecting the resources in both directions.
      Parameters:
      lexicalEntry -
      concept -
    • removeSense

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(resource, sense)\', \'D\')") public void removeSense(@Deleted org.eclipse.rdf4j.model.Resource lexicalSense, boolean removePlain)
      Removes a lexical sense (see ontolex:LexicalSense). Optionally, it is possible to remove the corresponding plain lexicalization(s) and conceptualizations.
      Parameters:
      lexicalSense -
      removePlain -
    • setReference

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(resource, sense)\', \'U\')") public void setReference(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource newReference, boolean deletePlain, boolean createPlain)
      Sets the reference of a lexical sense. Optionally, deletes plain references and, if specified, creates new ones.
      Parameters:
      lexicalSense -
      newReference -
      deletePlain -
      createPlain -
    • addConcept

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, conceptualization)\', \'U\')") public void addConcept(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource newConcept, boolean createPlain)
      Adds a lexical concept to a lexical sense. Optionally, creates plain conceptualizations.
      Parameters:
      lexicalSense -
      newConcept -
      createPlain -
    • removeConcept

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, conceptualization)\', \'D\')") public void removeConcept(org.eclipse.rdf4j.model.Resource lexicalSense, org.eclipse.rdf4j.model.Resource concept, boolean deletePlain)
      Removes a lexical concept from a lexical sense. Optionally, delete plain conceptualizations.
      Parameters:
      lexicalSense -
      concept -
      deletePlain -
    • getLexicalRelationCategories

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(property)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>> getLexicalRelationCategories(@Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon)
      Returns the categories of lexical relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
      Parameters:
      lexicon -
    • getSenseRelationCategories

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(property)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>> getSenseRelationCategories(@Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon)
      Returns the categories of sense relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
      Parameters:
      lexicon -
    • getConceptualRelationCategories

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(property)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.IRI>> getConceptualRelationCategories(@Optional @LocallyDefined org.eclipse.rdf4j.model.Resource lexicon)
      Returns the categories of conceptual relations, possibly filtered based on the linguistic catalogs of the supplied lexicon.
      Parameters:
      lexicon -
    • createLexicoSemanticRelation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(\' +@auth.typeof(#source)+ \', values)\', \'C\')") public void createLexicoSemanticRelation(org.eclipse.rdf4j.model.Resource source, org.eclipse.rdf4j.model.Resource target, boolean undirectional, @Optional org.eclipse.rdf4j.model.IRI category, @SubClassOf(superClassIRI="http://www.w3.org/ns/lemon/vartrans#LexicoSemanticRelation") org.eclipse.rdf4j.model.IRI relationClass, @Optional @LocallyDefined org.eclipse.rdf4j.model.Resource translationSet) throws URIGenerationException
      Creates a lexico-semantic relation.
      Parameters:
      source -
      target -
      undirectional -
      category -
      relationClass -
      Throws:
      URIGenerationException
    • deleteLexicalRelation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalEntry, values)\', \'D\')") public void deleteLexicalRelation(@LocallyDefined @HasType("http://www.w3.org/ns/lemon/vartrans#LexicalRelation") @HasType("http://www.w3.org/ns/lemon/vartrans#LexicalRelation") org.eclipse.rdf4j.model.Resource relation)
      Deletes a lexical relation between two lexical entries.
      Parameters:
      relation -
    • deleteSenseRelation

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(ontolexLexicalSense, values)\', \'D\')") public void deleteSenseRelation(@LocallyDefined @HasType("http://www.w3.org/ns/lemon/vartrans#SenseRelation") @HasType("http://www.w3.org/ns/lemon/vartrans#SenseRelation") org.eclipse.rdf4j.model.Resource relation)
      Deletes a sense relation between two lexical senses.
      Parameters:
      relation -
    • deleteLexicoSemanticRelationInternal

      protected void deleteLexicoSemanticRelationInternal(org.eclipse.rdf4j.model.Resource relation)
    • createTranslationSet

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(vartransTranslationSet)\', \'C\')") public AnnotatedValue<org.eclipse.rdf4j.model.IRI> createTranslationSet(@Optional @NotLocallyDefined org.eclipse.rdf4j.model.IRI newTranslationSet, @Optional CustomFormValue customFormValue) throws CODAException, CustomFormException, URIGenerationException
      Creates a new vartrans:TranslationSet.
      Parameters:
      newTranslationSet -
      customFormValue -
      Returns:
      Throws:
      CustomFormException
      CODAException
      URIGenerationException
    • getTranslationSets

      @STServiceOperation @Read @PreAuthorize("@auth.isAuthorized(\'rdf(vartransTranslationSet)\', \'R\')") public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> getTranslationSets()
      Returns lexicons.
      Returns:
    • deleteTranslationSet

      @STServiceOperation(method=POST) @Write @PreAuthorize("@auth.isAuthorized(\'rdf(vartransTranslationSet)\', \'D\')") public void deleteTranslationSet(@LocallyDefined org.eclipse.rdf4j.model.IRI translationSet)
      Deletes a translation set.
      Parameters:
      translationSet -
    • generateLexicalEntryURI

      public org.eclipse.rdf4j.model.IRI generateLexicalEntryURI(org.eclipse.rdf4j.model.Literal canonicalForm, org.eclipse.rdf4j.model.IRI lexicon) throws URIGenerationException
      Generates a new URI for an ontolex:LexicalEntry, optionally given its accompanying canonicalForm and the lexicon it was attached to. The actual generation of the URI is delegated to STServiceAdapter.generateIRI(String, Map), which in turn invokes the current binding for the extension point URIGenerator. In the end, the URI generator will be provided with the following:
      • lexicon as the xRole
      • a map of additional parameters consisting of canonicalForm and lexicon (each, if not null)
      Parameters:
      canonicalForm -
      lexicon -
      Returns:
      Throws:
      URIGenerationException
    • generateTranslationSetURI

      public org.eclipse.rdf4j.model.IRI generateTranslationSetURI() throws URIGenerationException
      Generates a new URI for a vartrans:TranslationSet.
      Returns:
      Throws:
      URIGenerationException
    • generateLexiconURI

      public org.eclipse.rdf4j.model.IRI generateLexiconURI(org.eclipse.rdf4j.model.Literal title) throws URIGenerationException
      Generates a new URI for a lime:Lexicon, optionally given its accompanying title. The actual generation of the URI is delegated to STServiceAdapter.generateIRI(String, Map), which in turn invokes the current binding for the extension point URIGenerator. In the end, the URI generator will be provided with the following:
      • lexicon as the xRole
      • a map of additional parameters consisting of title (if not null)
      Parameters:
      title - the title of the lexicon
      Returns:
      Throws:
      URIGenerationException
    • generateFormIRI

      public org.eclipse.rdf4j.model.IRI generateFormIRI(org.eclipse.rdf4j.model.IRI lexicalEntry, org.eclipse.rdf4j.model.Literal writtenRep, org.eclipse.rdf4j.model.IRI formProperty) throws URIGenerationException
      Generates a new URI for an ontolex:Form, given its written representation, the lexical entry it is attached to and the property used for the binding. The actual generation of the URI is delegated to STServiceAdapter.generateIRI(String, Map), which in turn invokes the current binding for the extension point URIGenerator. In the end, the URI generator will be provided with the following:
      • lexicalEntry as the xRole
      • a map of additional parameters consisting of lexicalEntry, writtenRep and formProperty (each, if not null)
      Parameters:
      lexicalEntry -
      writtenRep -
      formProperty -
      Returns:
      Throws:
      URIGenerationException
    • generateLexicalSenseIRI

      public org.eclipse.rdf4j.model.IRI generateLexicalSenseIRI(org.eclipse.rdf4j.model.Resource lexicalEntry, org.eclipse.rdf4j.model.Resource reference) throws URIGenerationException
      Generates a new URI for an ontolex:LexicalSense, given its lexical entry and reference. The actual generation of the URI is delegated to STServiceAdapter.generateIRI(String, Map), which in turn invokes the current binding for the extension point URIGenerator. In the end, the URI generator will be provided with the following:
      • ontolexLexicalSense as the xRole
      • a map of additional parameters consisting of lexicalEntry and reference
      Parameters:
      lexicalEntry -
      reference -
      Returns:
      Throws:
      URIGenerationException
    • getLinguisticCatalogs

      protected static Set<org.eclipse.rdf4j.model.IRI> getLinguisticCatalogs(org.eclipse.rdf4j.repository.RepositoryConnection con, org.eclipse.rdf4j.model.Resource lexicon) throws org.eclipse.rdf4j.query.QueryEvaluationException, org.eclipse.rdf4j.repository.RepositoryException
      Throws:
      org.eclipse.rdf4j.query.QueryEvaluationException
      org.eclipse.rdf4j.repository.RepositoryException
    • sortConstituents

      public static <T> boolean sortConstituents(List<T> values, Function<T,org.eclipse.rdf4j.model.Resource> valueExtractor, org.eclipse.rdf4j.model.Model statements, org.eclipse.rdf4j.model.Resource subjectResource)