Skip to content

Commit

Permalink
Merge pull request #32 from michmech/master
Browse files Browse the repository at this point in the history
JSON serialization
  • Loading branch information
DavidFatDavidF authored Aug 7, 2023
2 parents fa7df30 + 00d0712 commit 5c64f14
Show file tree
Hide file tree
Showing 36 changed files with 1,198 additions and 47 deletions.
5 changes: 4 additions & 1 deletion dmlex-v1.0/specification/dmlex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
<member><olink targetptr="JSON_implementation">JSON</olink>,</member>
<member><olink targetptr="RDF_implementation">RDF</olink>,</member>
<member>and <olink targetptr="RDB_implementation">relational databases</olink>.</member>
</simplelist> We also provide an informative serialization as VHF [to link appendix when
</simplelist> We also provide an informative serialization as NVH [to link appendix when
available]. </para>


Expand Down Expand Up @@ -667,6 +667,9 @@
<listitem>
<para>Měchura, Michal - Masaryk University </para>
</listitem>
<listitem>
<para>Tiberius, Carole - Institute of the Dutch Language</para>
</listitem>
</itemizedlist>
</appendix>
</article>
2 changes: 1 addition & 1 deletion dmlex-v1.0/specification/docbook/dbgenent.mod
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<!ENTITY previous-loc "http://docs.oasis-open.org/lexidma/dmlex/v&version;/&pstage;">
<!ENTITY latest-loc "http://docs.oasis-open.org/lexidma/dmlex/v&version;">

<!ENTITY pubdate "31 July &pubyear;">
<!ENTITY pubdate "6 August &pubyear;">

<!ENTITY pubyear "2023">
<!ENTITY releaseinfo "Standards Track Work Product">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_collocateMarker">
<title>Class: <literal>collocateMarker</literal></title>
<para>Implements the <olink targetptr="annotation_collocateMarker">collocateMarker</olink>
object type from the Annotation Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"startIndex"</literal>
<glossterm>required</glossterm>, number</para>
</listitem>
<listitem>
<para><literal>"endIndex"</literal>
<glossterm>required</glossterm>, number</para>
</listitem>
<listitem>
<para><literal>"id"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"lemma"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"labels"</literal>
<glossterm>optional</glossterm>, array of zero or more strings implementing the
<olink targetptr="core_label">label</olink> object type</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_definition">
<title>Class: <literal>definition</literal></title>
<para>Implements the <olink targetptr="core_definition">definition</olink> object type.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"definitionType"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"text"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
</itemizedlist>

<itemizedlist>
<title>Members if implementing the Annotation Module</title>
<listitem>
<para><literal>"headwordMarkers"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_headwordMarkers">headwordMarker</olink></literal> instances</para>
</listitem>
<listitem>
<para><literal>"collocateMarkers"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_collocateMarkers">collocateMarker</olink></literal> instances</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_definitionTypeTag">
<title>Class: <literal>definitionTypeTag</literal></title>
<para>Implements the <olink targetptr="values_definitionTypeTag">definitionTypeTag</olink>
object type from the Controlled Values Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"tag"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"description"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"sameAs"</literal>
<glossterm>optional</glossterm>, array of zero or more strings implementing the
<olink targetptr="values_sameAs">sameAs</olink> object type</para>
</listitem>
</itemizedlist>

</section>
52 changes: 38 additions & 14 deletions dmlex-v1.0/specification/serializations/JSON/classes/entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,65 @@
]>
<section id="json_entry">
<title>Class: <literal>entry</literal></title>
<para>Implements the <olink targetptr="core_entry">entry</olink> data type.</para>
<para>Implements the <olink targetptr="core_entry">entry</olink> object type.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"id"</literal> <glossterm>required</glossterm>, string</para>
<para><literal>"id"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"headword"</literal> <glossterm>required</glossterm>, string</para>
<para><literal>"headword"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"homographNumber"</literal> <glossterm>optional</glossterm>, string</para>
<para><literal>"homographNumber"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"partsOfSpeech"</literal> <glossterm>optional</glossterm>, array of zero or more <literal><olink targetptr="json_partOfSpeech">partOfSpeech</olink></literal> objects</para>
<para><literal>"partsOfSpeech"</literal>
<glossterm>optional</glossterm>, array of zero or more strings
implementing the <olink targetptr="core_partOfSpeech">partOfSpeech</olink> object type</para>
</listitem>
<listitem>
<para><literal>"labels"</literal> <glossterm>optional</glossterm> array of zero or more <literal><olink targetptr="json_label">label</olink></literal> objects</para>
<para><literal>"labels"</literal>
<glossterm>optional</glossterm>, array of zero or more strings
implementing the <olink targetptr="core_label">label</olink> object type</para>
</listitem>
<listitem>
<para><literal>"pronunciations"</literal> <glossterm>optional</glossterm>, array of zero or more <literal><olink targetptr="json_pronunciation">pronunciation</olink></literal> objects</para>
<para><literal>"pronunciations"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_pronunciation">pronunciation</olink></literal> instances</para>
</listitem>
<listitem>
<para><literal>"inflectedForms"</literal> <glossterm>optional</glossterm>, array of zero or more <literal><olink targetptr="json_inflectedForm">inflectedForm</olink></literal> objects</para>
<para><literal>"inflectedForms"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_inflectedForm">inflectedForm</olink></literal> instances</para>
</listitem>
<listitem>
<para><literal>"senses"</literal> <glossterm>optional</glossterm>, array of zero or more <literal><olink targetptr="json_sense">sense</olink></literal> objects</para>
<para><literal>"senses"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_sense">sense</olink></literal> instances</para>
</listitem>
</itemizedlist>

<itemizedlist>
<title>Members if implementing the <olink targetptr="etymology">Etymology Module</olink></title>
<title>Members if implementing the Annotation Module</title>
<listitem>
<para><literal>"etymologies"</literal> <glossterm>optional</glossterm>, array of zero or more <literal><olink targetptr="json_etymology">etymology</olink></literal> objects</para>
<para><literal>"placeholderMarkers"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_placeholderMarkers">placeholderMarker</olink></literal> instances</para>
</listitem>
</itemizedlist>


<itemizedlist>
<title>Members if implementing the Etymology Module</title>
<listitem>
<para><literal>"etymologies"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_etymology">etymology</olink></literal> instances</para>
</listitem>
</itemizedlist>

</section>
26 changes: 26 additions & 0 deletions dmlex-v1.0/specification/serializations/JSON/classes/etymology.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_etymology">
<title>Class: <literal>etymology</literal></title>
<para>Implements the <olink targetptr="etymology_etymology">etymology</olink> object type
from the Etymology Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"description"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"etymons"</literal>
<glossterm>optional</glossterm>, array of zero or more <literal><olink
targetptr="json_etymon">etymon</olink></literal> instances</para>
</listitem>
</itemizedlist>

</section>
38 changes: 38 additions & 0 deletions dmlex-v1.0/specification/serializations/JSON/classes/etymon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_etymon">
<title>Class: <literal>etymon</literal></title>
<para>Implements the <olink targetptr="etymology_etymon">etymon</olink> object type
from the Etymology Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"when"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"type"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"note"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"etymonUnits"</literal>
<glossterm>required</glossterm>, array of one or more <literal><olink
targetptr="json_etymonUnit">etymonUnit</olink></literal> instances</para>
</listitem>
<listitem>
<para><literal>"translation"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_etymonLanguage">
<title>Class: <literal>etymonLanguage</literal></title>
<para>Implements the <olink targetptr="etymology_etymonLanguage">etymonLanguage</olink> object type
from the Etymology Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"langCode"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"displayName"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_etymonType">
<title>Class: <literal>etymonType</literal></title>
<para>Implements the <olink targetptr="etymology_etymonType">etymonType</olink> object type
from the Etymology Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"type"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"description"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
</itemizedlist>

</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd" [
<!ENTITY % xinclude SYSTEM "../../../docbook/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section id="json_etymonUnit">
<title>Class: <literal>etymonUnit</literal></title>
<para>Implements the <olink targetptr="etymology_etymonUnit">etymonUnit</olink> object type
from the Etymology Module.</para>

<itemizedlist>
<title>Members</title>
<listitem>
<para><literal>"language"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"reconstructed"</literal>
<glossterm>optional</glossterm>, boolean</para>
</listitem>
<listitem>
<para><literal>"text"</literal>
<glossterm>required</glossterm>, string</para>
</listitem>
<listitem>
<para><literal>"partsOfSpeech"</literal>
<glossterm>optional</glossterm>, array of zero or more strings
implementing the <olink targetptr="core_partOfSpeech">partOfSpeech</olink> object type</para>
</listitem>
<listitem>
<para><literal>"translation"</literal>
<glossterm>optional</glossterm>, string</para>
</listitem>
</itemizedlist>

</section>
Loading

0 comments on commit 5c64f14

Please sign in to comment.