# HG changeset patch # User František Kučera # Date 1270499408 -7200 # Node ID 0967d5e3b4704036d642ba3e550d758219eef737 # Parent 59ba044de1643f4fad185921eebd68f1a1388109 generování XML vycpávkového článku diff -r 59ba044de164 -r 0967d5e3b470 java/nekurak.net-rest/nbproject/build-impl.xml --- a/java/nekurak.net-rest/nbproject/build-impl.xml Mon Apr 05 22:21:01 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/build-impl.xml Mon Apr 05 22:30:08 2010 +0200 @@ -391,8 +391,16 @@ - - + + + + + + + + + + @@ -528,10 +536,13 @@ + - + + + @@ -827,7 +838,9 @@ CLEANUP SECTION --> - + + + diff -r 59ba044de164 -r 0967d5e3b470 java/nekurak.net-rest/nbproject/genfiles.properties --- a/java/nekurak.net-rest/nbproject/genfiles.properties Mon Apr 05 22:21:01 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/genfiles.properties Mon Apr 05 22:30:08 2010 +0200 @@ -1,10 +1,10 @@ -build.xml.data.CRC32=27a024ad +build.xml.data.CRC32=35b9fabc build.xml.script.CRC32=fb1b7f84 build.xml.stylesheet.CRC32=c0ebde35@1.21.2.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=27a024ad -nbproject/build-impl.xml.script.CRC32=f658df40 +nbproject/build-impl.xml.data.CRC32=35b9fabc +nbproject/build-impl.xml.script.CRC32=41eb3ef9 nbproject/build-impl.xml.stylesheet.CRC32=b139b33b@1.21.2.1 nbproject/rest-build.xml.data.CRC32=d32e8880 nbproject/rest-build.xml.script.CRC32=23da2c77 diff -r 59ba044de164 -r 0967d5e3b470 java/nekurak.net-rest/nbproject/project.properties --- a/java/nekurak.net-rest/nbproject/project.properties Mon Apr 05 22:21:01 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/project.properties Mon Apr 05 22:30:08 2010 +0200 @@ -26,7 +26,8 @@ j2ee.platform=1.6-web j2ee.server.type=gfv3ee6 jar.compress=false -javac.classpath= +javac.classpath=\ + ${reference.nekurak_net-lib.jar} # Space-separated list of extra javac options javac.compilerargs= javac.debug=true @@ -54,6 +55,8 @@ lib.dir=${web.docbase.dir}/WEB-INF/lib persistence.xml.dir=${conf.dir} platform.active=default_platform +project.nekurak_net-lib=../nekurak.net-lib +reference.nekurak_net-lib.jar=${project.nekurak_net-lib}/dist/nekurak.net-lib.jar resource.dir=setup rest.config.type=dd rest.support.on=true diff -r 59ba044de164 -r 0967d5e3b470 java/nekurak.net-rest/nbproject/project.xml --- a/java/nekurak.net-rest/nbproject/project.xml Mon Apr 05 22:21:01 2010 +0200 +++ b/java/nekurak.net-rest/nbproject/project.xml Mon Apr 05 22:30:08 2010 +0200 @@ -10,7 +10,12 @@ nekurak.net-rest 1.6.5 - + + + ${reference.nekurak_net-lib.jar} + WEB-INF/lib + + @@ -19,5 +24,15 @@ + + + nekurak_net-lib + jar + + jar + clean + jar + + diff -r 59ba044de164 -r 0967d5e3b470 java/nekurak.net-rest/src/java/cz/frantovo/nekurak/rest/ClankyREST.java --- a/java/nekurak.net-rest/src/java/cz/frantovo/nekurak/rest/ClankyREST.java Mon Apr 05 22:21:01 2010 +0200 +++ b/java/nekurak.net-rest/src/java/cz/frantovo/nekurak/rest/ClankyREST.java Mon Apr 05 22:30:08 2010 +0200 @@ -1,5 +1,7 @@ package cz.frantovo.nekurak.rest; +import cz.frantovo.nekurak.dto.Clanek; +import cz.frantovo.nekurak.xml.ClanekXML; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; @@ -25,10 +27,13 @@ /** Získáme konkrétní článek */ @GET @Path("/{id}") - @Produces("text/plain") - //@Produces(MIME_XML) - public String ziskej(@PathParam("id") int id) { - return "jeden článek: " + id; + @Produces(MIME_XML) + public ClanekXML ziskej(@PathParam("id") int id) { + Clanek c = new Clanek(); + c.setId(id); + c.setNadpis("Nadpis článku"); + c.setText("nějaký pěkný text"); + return new ClanekXML(c); } /**