diff --git a/Doc/Common/bibliography.xml b/Doc/Common/bibliography.xml index 3bd50bc45262813c0a06313642ce6b9e12001db5..c71a11184bf195c404c9d6730d4c261e399bc7f6 100644 --- a/Doc/Common/bibliography.xml +++ b/Doc/Common/bibliography.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bibliography version="5.0" xmlns="http://docbook.org/ns/docbook" +<bibliography version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Common/glossary.xml b/Doc/Common/glossary.xml index 4d73aebce3a612575b1956541a0c7cad16b1b5e1..9b4041816a19e6cfcf71e5bc112aa56ce0bbc607 100644 --- a/Doc/Common/glossary.xml +++ b/Doc/Common/glossary.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<glossary version="5.0" xml:id="glossary" +<glossary version="5.1" xml:id="glossary" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Common/outdatedBibliography.xml b/Doc/Common/outdatedBibliography.xml index 9674584afeaa40be555146cd3ef4b773ca90dea8..22fb88709657d3468b478ea4ceeec23f45ca0c73 100644 --- a/Doc/Common/outdatedBibliography.xml +++ b/Doc/Common/outdatedBibliography.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bibliography version="5.0" xmlns="http://docbook.org/ns/docbook" +<bibliography version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sd1/Ref/Screen/strings2html.png b/Doc/Sd1/Ref/Screen/strings2html.png new file mode 100644 index 0000000000000000000000000000000000000000..806a4e871a5775980b37006dca8a0d08ee50d525 Binary files /dev/null and b/Doc/Sd1/Ref/Screen/strings2html.png differ diff --git a/Doc/Sd1/arrays.xml b/Doc/Sd1/arrays.xml index d1a9bb83db015b98de074675cb16b10f4408cf16..2643da8c89eeed35051af7e8309560e83bdb096a 100644 --- a/Doc/Sd1/arrays.xml +++ b/Doc/Sd1/arrays.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterArrays" +<chapter version="5.1" xml:id="sw1ChapterArrays" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" @@ -9,10 +9,78 @@ xmlns:db="http://docbook.org/ns/docbook"> <title>Arrays</title> + <section xml:id="sd1SectArray2html"> + <title>Converting string arrays to <xref linkend="glo_HTML"/>.</title> + + <qandaset defaultlabel="qanda" xml:id="sd1QandaArray2html"> + <qandadiv> + <qandaentry> + <question> + <para>Consider an array of strings. As an example we provide a + list of country names:</para> + + <programlisting language="none">final String[] countries = { + "England" + ,"France" + ,"Germany" + };</programlisting> + + <para>An application is supposed to generate the following + output:</para> + + <programlisting language="none"><ul> + <li>England</li> + <li>France</li> + <li>Germany</li> +</ul></programlisting> + + <para>Implement A class method <methodname>strings2html(final + String [] strings)</methodname> as in:</para> + + <programlisting language="none">public class Stringarray2Html { + + /** + * Create an unordered ... + * ... + */ + static public String strings2html(final String [] strings) { + ... + return ...; + } +}</programlisting> + + <para>Do not forget to provide appropriate <xref + linkend="glo_Javadoc"/> method and class documentation. Generating + <xref linkend="glo_Javadoc"/> HTML documentation from your project + should yield a result like:</para> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/Screen/strings2html.png"/> + </imageobject> + </mediaobject> + + <para>Provide appropriate unit tests covering at least:</para> + + <itemizedlist> + <listitem> + <para>An empty input array.</para> + </listitem> + + <listitem> + <para>An input array containing at least two strings.</para> + </listitem> + </itemizedlist> + </question> + </qandaentry> + </qandadiv> + </qandaset> + </section> + <section xml:id="sw1SectHarderExternalStringExercise"> <title>External array and string exercises</title> - <qandaset xml:id="sw1QandaExternalHarderString"> + <qandaset defaultlabel="qanda" xml:id="sw1QandaExternalHarderString"> <qandadiv> <qandaentry> <question> diff --git a/Doc/Sd1/collections.xml b/Doc/Sd1/collections.xml index 2085267695ae6ed24e87c38d2a6414021a952e3d..a74620f39366bcb54dffdb958447e5f2af5ddee4 100644 --- a/Doc/Sd1/collections.xml +++ b/Doc/Sd1/collections.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sd1Collection1" +<chapter version="5.1" xml:id="sd1Collection1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/coreClasses.xml b/Doc/Sd1/coreClasses.xml index 6505fdc6c9d8c6962ce8b1f00880803782e1486a..2384430fc93e1f0d8df9d3acaa7cbb30d53fd041 100644 --- a/Doc/Sd1/coreClasses.xml +++ b/Doc/Sd1/coreClasses.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterCoreClasses" +<chapter version="5.1" xml:id="sw1ChapterCoreClasses" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" @@ -260,7 +260,7 @@ public class CircleAreaCalculator { <section xml:id="sw1SectAdvancedExternalStringExercise"> <title>External String exercises</title> - <qandaset xml:id="sw1QandaExternalAdvancedString"> + <qandaset defaultlabel="qanda" xml:id="sw1QandaExternalAdvancedString"> <qandadiv> <qandaentry> <question> diff --git a/Doc/Sd1/deployment.xml b/Doc/Sd1/deployment.xml index 08391af2cfe1e826be2ac2f55f594cdb77c81369..ea70120d3478980df5c604d5c6e685b72337d1f8 100644 --- a/Doc/Sd1/deployment.xml +++ b/Doc/Sd1/deployment.xml @@ -1,4 +1,4 @@ - <chapter xml:id="sd1Deploy" version="5.0" + <chapter xml:id="sd1Deploy" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/errorHandling.xml b/Doc/Sd1/errorHandling.xml index 32f9cbe4e14a89e6b7c0c9764677a967caf8e5d1..82e5ffe341784dfe42c1d385bb817328f981d616 100644 --- a/Doc/Sd1/errorHandling.xml +++ b/Doc/Sd1/errorHandling.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterErrorHandling" +<chapter version="5.1" xml:id="sw1ChapterErrorHandling" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/extraExercise.xml b/Doc/Sd1/extraExercise.xml index a42d6ad53bb0e50eb3ba7428fa82958233ba57c1..7ac82622c1c7d42ee6b513077cdbb488c6f90480 100644 --- a/Doc/Sd1/extraExercise.xml +++ b/Doc/Sd1/extraExercise.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sd1ExtraExercise" +<chapter version="5.1" xml:id="sd1ExtraExercise" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/inheritance.xml b/Doc/Sd1/inheritance.xml index 729829010f8b0fab9ccbb0b11a1530dc5c5dbf29..d61d27ca6f50899805e8c1b591703f76b90cd7aa 100644 --- a/Doc/Sd1/inheritance.xml +++ b/Doc/Sd1/inheritance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterInheritance" +<chapter version="5.1" xml:id="sw1ChapterInheritance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/interfacesAbstractClasses.xml b/Doc/Sd1/interfacesAbstractClasses.xml index e5eebe18797f25473871c369b3c294c2e2ed0df5..8caa0e15217ee7d7e720ea4d6c537bd2c3f0089b 100644 --- a/Doc/Sd1/interfacesAbstractClasses.xml +++ b/Doc/Sd1/interfacesAbstractClasses.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterInterfacesAbstractClasses" +<chapter version="5.1" xml:id="sw1ChapterInterfacesAbstractClasses" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/languageFundamentals.xml b/Doc/Sd1/languageFundamentals.xml index 62138dcb1ae158ce70732a602b234bd5caad7da7..62c52d6a0c3dc093250634707acbb61eb54f50c2 100644 --- a/Doc/Sd1/languageFundamentals.xml +++ b/Doc/Sd1/languageFundamentals.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1LanguageFundamental" +<chapter version="5.1" xml:id="sw1LanguageFundamental" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 4abfcd88b3873e59f2ce70fc860b7038895f6959..22ff44c8ae38fedaf94685e3939458543153aa21 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterObjectsClasses" +<chapter version="5.1" xml:id="sw1ChapterObjectsClasses" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" @@ -67,6 +67,33 @@ </listitem> </itemizedlist> + <section xml:id="sd1GenerateJavadoc"> + <title>Generating <xref linkend="glo_Javadoc"/>.</title> + + <para>Java includes the powerful <xref linkend="glo_Javadoc"/> + documentation generating subsystem. There are at multiple ways to + generate HTML documentation from your own Java code:</para> + + <itemizedlist> + <listitem> + <para>Invoking the <command>javadoc</command> executable supplying + appropriate command line arguments.</para> + </listitem> + + <listitem> + <para>Using a Maven target by command line.</para> + </listitem> + + <listitem> + <para>Using Eclipse. Just select your project in the package view + and choose <guimenu>Project</guimenu> <guisubmenu>Generate Javadoc + ...</guisubmenu> . See <link + xlink:href="https://www.youtube.com/watch?v=FCJKTT86vP0">related + video</link> in case of problems.</para> + </listitem> + </itemizedlist> + </section> + <section xml:id="sd1ImportMavenSolutions"> <title>Solutions to exercises</title> @@ -92,9 +119,10 @@ <informalfigure> <para>Select branch <quote>master</quote> and hit finish. This will clone the repository and may take some time depending on your - available bandwidth (~100MB). As a result you will see the root - folder <filename>~/git/GoikLectures</filename>. This step is - required only once.</para> + available bandwidth (~100MB, mostly due to included videos). As a + result you will see the root folder + <filename>~/git/GoikLectures</filename>. This step is required + only once.</para> <para>If you fancy working on console level you may simply issue the following command instead:</para> @@ -1717,7 +1745,7 @@ Is 2016 a leap year? true</programlisting> <section xml:id="sd1InterestCalculator"> <title>Interest calculations</title> - <section version="5.0" xml:id="sd1InterestCalculatorSimple"> + <section version="5.1" xml:id="sd1InterestCalculatorSimple"> <title>A simple interest calculator</title> <para>Consider the following implementation of an interest diff --git a/Doc/Sd1/preliminaries.xml b/Doc/Sd1/preliminaries.xml index 947b682018e536553f811683f4749fd6a3ca14ab..49c4fb923fc3fc063c77027a4ef0606625a0cc49 100644 --- a/Doc/Sd1/preliminaries.xml +++ b/Doc/Sd1/preliminaries.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1Lect1" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="sw1Lect1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index cb81eabc2715adc68b4e9cde263889b4e323fce4..f28eb26292a321100db243affe4f88e2505aef91 100644 --- a/Doc/Sd1/statements.xml +++ b/Doc/Sd1/statements.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterStatements" +<chapter version="5.1" xml:id="sw1ChapterStatements" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/streams.xml b/Doc/Sd1/streams.xml index 0da0691c29c65498fc459fc47dc9329a64fc3be3..86bee45d2bb8ad8dce2b24e55787a98cc516b957 100644 --- a/Doc/Sd1/streams.xml +++ b/Doc/Sd1/streams.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sd1ReadCharStreams" +<chapter version="5.1" xml:id="sd1ReadCharStreams" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sd1/workingWithNumbers.xml b/Doc/Sd1/workingWithNumbers.xml index 548a2d866c06b8413838dd2d7cbedb4b71ddc886..3c283dfd9d05f0041697dc38df8fd793d15f22f9 100644 --- a/Doc/Sd1/workingWithNumbers.xml +++ b/Doc/Sd1/workingWithNumbers.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sw1ChapterWorkingWithNumbers" +<chapter version="5.1" xml:id="sw1ChapterWorkingWithNumbers" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/dom.xml b/Doc/Sda1/dom.xml index 5f31d93fbba9ff77c08dc7803bf553a603808000..1b31668254025a81cac70e2a4db3b3bb0effd48d 100644 --- a/Doc/Sda1/dom.xml +++ b/Doc/Sda1/dom.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="dom" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="dom" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/fo.xml b/Doc/Sda1/fo.xml index 68962efefd667130a72473825bc58aab1198dc1a..b4cf170c6a1ea3dfbfa010be5387c1180acd979b 100644 --- a/Doc/Sda1/fo.xml +++ b/Doc/Sda1/fo.xml @@ -1,4 +1,4 @@ - <chapter xml:id="fo" version="5.0" xmlns="http://docbook.org/ns/docbook" + <chapter xml:id="fo" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/jdbc.xml b/Doc/Sda1/jdbc.xml index 99eaedc6b3a99010169e259e44c074bf8057dcd1..c459da7f3471e778467c13a75306041af1738e85 100644 --- a/Doc/Sda1/jdbc.xml +++ b/Doc/Sda1/jdbc.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="introPersistence" +<chapter version="5.1" xml:id="introPersistence" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/jpaintro.xml b/Doc/Sda1/jpaintro.xml index 58135b4723130b0ab6620c39ed38d985bdca8b2e..c418e4924c48c10a472a2e1392ffc0f368e17433 100644 --- a/Doc/Sda1/jpaintro.xml +++ b/Doc/Sda1/jpaintro.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="chapJpaGettingStarted" +<chapter version="5.1" xml:id="chapJpaGettingStarted" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/prerequisites.xml b/Doc/Sda1/prerequisites.xml index 0a6422cb9e2395ec122f9ef2c27b2f9371fcabfa..5565d3cb194a74212f4daf7c1be2ae6d533804f7 100644 --- a/Doc/Sda1/prerequisites.xml +++ b/Doc/Sda1/prerequisites.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="prerequisites" +<chapter version="5.1" xml:id="prerequisites" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/sax.xml b/Doc/Sda1/sax.xml index 455595ac1c7b1330c8f6ad66ccc1a27fa9cb15ff..c968c2508ce6fc7cf75bfd43441981255d043f6c 100644 --- a/Doc/Sda1/sax.xml +++ b/Doc/Sda1/sax.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sax" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="sax" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/schema.xml b/Doc/Sda1/schema.xml index 509d8e5509451ac6d633d8337163391fb93bfb9e..5a6829c647db394ac585b00147bb2de8e587879d 100644 --- a/Doc/Sda1/schema.xml +++ b/Doc/Sda1/schema.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xmlns="http://docbook.org/ns/docbook" +<book version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/try.xml b/Doc/Sda1/try.xml index a0b2492357fc825aaf17e0066a12bb0a0a406c0a..7c7d7e85fb89f50d74d046912eb04a12f6abbe8c 100644 --- a/Doc/Sda1/try.xml +++ b/Doc/Sda1/try.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xmlns="http://docbook.org/ns/docbook" +<book version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/vaadin.xml b/Doc/Sda1/vaadin.xml index ae7a0fe4e6d81a957ec7e344046e673f71e05c37..f579b5b7bc4cfd290249f8e396942686330783ec 100644 --- a/Doc/Sda1/vaadin.xml +++ b/Doc/Sda1/vaadin.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sda1ChapVaadin" +<chapter version="5.1" xml:id="sda1ChapVaadin" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/xmlintro.xml b/Doc/Sda1/xmlintro.xml index b8c0b1f84849c85b58105deedd6c3c6ca7249883..755dce8431b34f86ae565264f14030d3002ea925 100644 --- a/Doc/Sda1/xmlintro.xml +++ b/Doc/Sda1/xmlintro.xml @@ -1,4 +1,4 @@ - <chapter xml:id="xmlIntro" version="5.0" xmlns="http://docbook.org/ns/docbook" + <chapter xml:id="xmlIntro" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda1/xmlschema.xml b/Doc/Sda1/xmlschema.xml index 620759454cc0d476a65fe6a1d4d39ab6a963d229..cd02e089133a9200f177b9e277e0f2601a45517a 100644 --- a/Doc/Sda1/xmlschema.xml +++ b/Doc/Sda1/xmlschema.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="xmlSchema" +<chapter version="5.1" xml:id="xmlSchema" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sda1/xslt.xml b/Doc/Sda1/xslt.xml index 6c3dace0b424667df161bf633e932d81805d95dc..a3a259e7eb5ac0af3fb84e97fd71214418db47b6 100644 --- a/Doc/Sda1/xslt.xml +++ b/Doc/Sda1/xslt.xml @@ -1,4 +1,4 @@ - <chapter xml:id="xsl" version="5.0" xmlns="http://docbook.org/ns/docbook" + <chapter xml:id="xsl" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda2/jax-rs.xml b/Doc/Sda2/jax-rs.xml index 86d0a6fd7be3ec9df8c357e9d1c53691d707579b..844a5c648cf54e41004f05c78ac5cbba51db55d2 100644 --- a/Doc/Sda2/jax-rs.xml +++ b/Doc/Sda2/jax-rs.xml @@ -1,4 +1,4 @@ - <chapter xml:id="jax-rs" version="5.0" xmlns="http://docbook.org/ns/docbook" + <chapter xml:id="jax-rs" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda2/jpa.xml b/Doc/Sda2/jpa.xml index 15529e21f72b8de8fdaea220a88eacd0148abc15..9786b9861618ac40724a2abd8100ecf0b7a0e2a4 100644 --- a/Doc/Sda2/jpa.xml +++ b/Doc/Sda2/jpa.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="jpa" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="jpa" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda2/ldap.xml b/Doc/Sda2/ldap.xml index f1e524a298be6768276ac2791d63c6128c6b525e..86f2477932b2dd2184c367e9c3ea2a3975c6bab3 100644 --- a/Doc/Sda2/ldap.xml +++ b/Doc/Sda2/ldap.xml @@ -1,4 +1,4 @@ - <chapter xml:id="ldap" version="5.0" xmlns="http://docbook.org/ns/docbook" + <chapter xml:id="ldap" version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sda2/sda2.xml b/Doc/Sda2/sda2.xml index 13e6b803e057c1f0ea0e56e883272f9f1e35263a..266c8044efdb17c7e4f2d6bea3ffd0f05d2770b3 100644 --- a/Doc/Sda2/sda2.xml +++ b/Doc/Sda2/sda2.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xmlns="http://docbook.org/ns/docbook" +<book version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sdi/apache.xml b/Doc/Sdi/apache.xml index c22de25c3c27182a88575fb0ab7950a18d8e5a03..0271313637aa91a990e2f75aaae21cba4986f3e1 100644 --- a/Doc/Sdi/apache.xml +++ b/Doc/Sdi/apache.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiApache" +<chapter version="5.1" xml:id="sdiApache" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sdi/dns.xml b/Doc/Sdi/dns.xml index 670dfae877188b2fd0ee8b0c1bd65a9eb4f130d4..58b54b250693c5bf81ebf227a3f21a3e8ca2b64e 100644 --- a/Doc/Sdi/dns.xml +++ b/Doc/Sdi/dns.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiDns" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="sdiDns" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sdi/gettingStarted.xml b/Doc/Sdi/gettingStarted.xml index 1246a2f039f4a0721ab84ce98c93c6005adf500c..9e2004928f6de8bb6ec9c6560d0d0b4206647fdc 100644 --- a/Doc/Sdi/gettingStarted.xml +++ b/Doc/Sdi/gettingStarted.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiGettingStarted" +<chapter version="5.1" xml:id="sdiGettingStarted" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sdi/ldap.xml b/Doc/Sdi/ldap.xml index 6c02939ae187c67050a3d3a12d358dc29c7e66da..1e3832e0922096445796857ec2ac8fa4d3ae382f 100644 --- a/Doc/Sdi/ldap.xml +++ b/Doc/Sdi/ldap.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiLdap" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="sdiLdap" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sdi/package.xml b/Doc/Sdi/package.xml index 055805cb38dfeed490eb1a6fd262c0033cf0a928..9442a407374b02ec6b08b81d171ac7aa63e2dac4 100644 --- a/Doc/Sdi/package.xml +++ b/Doc/Sdi/package.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiPackage" +<chapter version="5.1" xml:id="sdiPackage" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sdi/samba.xml b/Doc/Sdi/samba.xml index 7a13390124fe12b26cbe03f75f0489acfccea176..5a77e46940fc12098b77b26c7ec21a7bf106fe53 100644 --- a/Doc/Sdi/samba.xml +++ b/Doc/Sdi/samba.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiSamba" xmlns="http://docbook.org/ns/docbook" +<chapter version="5.1" xml:id="sdiSamba" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/Doc/Sdi/surveillance.xml b/Doc/Sdi/surveillance.xml index 948349f1b2d31076d7ba3cadfb0598d90fcd6df5..1325bdc40c31f28237b6c6a7f6062076aa178348 100644 --- a/Doc/Sdi/surveillance.xml +++ b/Doc/Sdi/surveillance.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiSystemSurveillance" +<chapter version="5.1" xml:id="sdiSystemSurveillance" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/Sdi/unixIntro.xml b/Doc/Sdi/unixIntro.xml index 2950d027e9d3f578e38154ee585c35a9cdbaa3a9..0f73c3caeb45e5ecf50fb70ff0c477cb31159497 100644 --- a/Doc/Sdi/unixIntro.xml +++ b/Doc/Sdi/unixIntro.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.0" xml:id="sdiUnixIntro" +<chapter version="5.1" xml:id="sdiUnixIntro" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" diff --git a/Doc/lectures.xml b/Doc/lectures.xml index 368da039e3f63ef3ddd994da6bf8fe9932afda29..0c4e5b48c63ed6a78209a1e98c83f05af3adf3c5 100644 --- a/Doc/lectures.xml +++ b/Doc/lectures.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<book version="5.0" xmlns="http://docbook.org/ns/docbook" +<book version="5.1" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" diff --git a/P/Sd1/Array/StringArray2Html/.gitignore b/P/Sd1/Array/StringArray2Html/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4e247eee2103b4d4a35eba38166587fee1391f0e --- /dev/null +++ b/P/Sd1/Array/StringArray2Html/.gitignore @@ -0,0 +1,4 @@ +/.settings +/target +/.classpath +/.project diff --git a/P/Sd1/Array/StringArray2Html/pom.xml b/P/Sd1/Array/StringArray2Html/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..05dfce39fce22f113abd36fc34625943752ea565 --- /dev/null +++ b/P/Sd1/Array/StringArray2Html/pom.xml @@ -0,0 +1,22 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>de.hdm-stuttgart.mi</groupId> + <artifactId>lecturenotes-pom</artifactId> + <version>1.0</version> + <relativePath>../../../pom.xml</relativePath> + </parent> + + <groupId>de.hdm-stuttgart.de.sd1</groupId> + <artifactId>stringarray2html</artifactId> + <version>1.0</version> + + <packaging>jar</packaging> + + <name>Stringarray2html</name> + <url>http://www.mi.hdm-stuttgart.de/freedocs</url> + +</project> diff --git a/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Driver.java b/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Driver.java new file mode 100644 index 0000000000000000000000000000000000000000..9e66d676a844a66979aef22a19983505d0e90d7c --- /dev/null +++ b/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Driver.java @@ -0,0 +1,16 @@ +package de.hdm_stuttgart.mi.sd1.stringarray2html; + +public class Driver { + + public static void main(String[] args) { + + final String[] countries = { + "England" + ,"France" + ,"Germany" + }; + + System.out.println(Stringarray2Html.strings2html(countries)); + } + +} diff --git a/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Stringarray2Html.java b/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Stringarray2Html.java new file mode 100644 index 0000000000000000000000000000000000000000..1926526986ffe51955138c1c5f742744653fd5bc --- /dev/null +++ b/P/Sd1/Array/StringArray2Html/src/main/java/de/hdm_stuttgart/mi/sd1/stringarray2html/Stringarray2Html.java @@ -0,0 +1,46 @@ +package de.hdm_stuttgart.mi.sd1.stringarray2html; + +/** + * Converting array values to HTML. + * + */ +public class Stringarray2Html { + + /** + * Create an unordered <ul> ... </ul> html list from a given array of strings + * and provide a <li> ... </li> item for each array string. + * + * Thus an array like e.g. {"England", "France", "Germany"} is to be transformed to: + * + * <pre><ul> + <li>England</li> + <li>France</li> + <li>Germany</li> +</ul></pre> + * + * + * @param strings + * The list of values to be embedded into an unordered HTML list or null + * + * @return + * The HTML unordered list containing one element per array value. In case the input array is void + * or null an empty string "" will be returned. + */ + static public String strings2html(final String [] strings) { + + if (null == strings || 0 == strings.length) { + return ""; + } else { + + final StringBuffer ret = new StringBuffer(); + + ret.append("<ul>\n"); + + for (final String s: strings) { + ret.append(" <li>").append(s).append("</li>\n"); + } + ret.append("</ul>"); + return ret.toString(); + } + } +} \ No newline at end of file diff --git a/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java b/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d0f2933f6433b8060224b6c811aa4aa4c277c9e3 --- /dev/null +++ b/P/Sd1/Array/StringArray2Html/src/test/java/de/hdm_stuttgart/mi/sd1/stringarray2html_test/StringArrayTest.java @@ -0,0 +1,31 @@ +package de.hdm_stuttgart.mi.sd1.stringarray2html_test; + +import org.junit.Assert; +import org.junit.Test; + +import de.hdm_stuttgart.mi.sd1.stringarray2html.Stringarray2Html; + +@SuppressWarnings("javadoc") +public class StringArrayTest { + + @Test + public void testnull() { + Assert.assertEquals("", Stringarray2Html.strings2html(null)); + + } + @Test + public void testVoid() { + Assert.assertEquals("", Stringarray2Html.strings2html(new String[]{})); + + } + @Test + public void testTwo() { + Assert.assertEquals("<ul>\n" + + " <li>one</li>\n" + + " <li>two</li>\n" + + "</ul>", + Stringarray2Html.strings2html(new String[]{"one", "two"})); + + } + +} diff --git a/P/pom.xml b/P/pom.xml index b708ea3ba960cb93bd2538b4ed72b19d15d6dfb7..36b588233aa764b87f2e7c54a6da28356ba5ae96 100644 --- a/P/pom.xml +++ b/P/pom.xml @@ -85,6 +85,7 @@ <module>Sd1/rounding</module> + <module>Sd1/Array/StringArray2Html</module> <module>Sd1/StringLengthSort/Solution</module> <module>Sd1/Wc/wc</module> <module>Sd1/Wc/readFile</module>