openjdk version "11.0.16"
is needed to be installed to Ubuntucd
to docker
directory. web/start_mariadb.sh
and then wait till database is ready. web/deploy_2_wildfly.sh
Test REST API endpoint:
http://localhost/dictionary/rest/lexicalitems/1
reference: https://en.wikipedia.org/wiki/Lexical_item
Critical question on definition of lexical item :
Based on Gemini, lexical entry has the detail information of lexical item, including the definition, part of speech etc`.
According to Crystal (1980: 274), polysemy is a term used in semantic analysis to refer to a lexical item which has a range of different meanings.
Reference: https://www.iasj.net/iasj/download/5784a6a9435b5c81
reference: https://www.vocabulary.com/dictionary/lexical%20entry
PATCH
can be used instead of POST
for updateNew entity Explanation
is introduced to aggregate defintion , part of speech , pronunciation etc. along with LexicalItem
as foreign key. There is an invariant relationship from lexical item to explanation, i.e. one-to-many. However, when implementing it with JPA/Hibernate, there are at least three ways
LexicalItemRepository
and ExplanationRepository
Think first from the frontend point of view:
CREATE
READ
UPDATE
DELETE
Unidirectional @ManyToOne
Association (Explanation
> LexicalItem
)
CREATE
LexicalItem
and Explanation
READ
ExplanationRepository
is not trivialUPDATE
LexicalItem
and Explanation
DELETE
LexicalItemRepository.find
/EntityManager.find
to search for the managed entity and then call EntityManager.remove
This design strategy cannot simply meet the repositories.