diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Stroke.java b/src/main/java/org/ntlab/acanthus_server/entities/Stroke.java index 6e1fecf..b659ccf 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Stroke.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Stroke.java @@ -26,8 +26,14 @@ } //座標のリストを返す - public SortedSet getPositions() { - return this.positions; + public List getPositions() { + + List positions = new ArrayList(); + for (Position p: positions) { + positions.add(p); + } + + return positions; } // StrokesRestからstrokesのsizeをもらってstrokeNoに入れる diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java index 0276096..c426591 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java @@ -197,7 +197,7 @@ @Path("/{aid}/pageMap/{pid}/layers/{layerNo}/strokes/{strokeNo}/positions") @GET @Produces(MediaType.APPLICATION_JSON) - public SortedSet getPositions(@PathParam("aid") Integer aid, @PathParam("pid") Integer pid, + public List getPositions(@PathParam("aid") Integer aid, @PathParam("pid") Integer pid, @PathParam("layerNo") Integer layerNo, @PathParam("strokeNo") Integer strokeNo) { var pages = gallery.getAnimationByAid(aid).getPages(); var strokes = new ArrayList();