/** * Create an instance of {@link Comments } * */ public Comments createComments() { return new Comments(); }
/** * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. * * @param parent * The parent object in the object tree. * @param unmarshaller * The unmarshaller that generated the instance. */ public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { setParent(parent); }
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
public void addNewComment(String author, String text) { // XMLGregorianCalendar xmlCal = new XMLGregorianCalendarImpl(); // You'll need to fix this! // CommentRangeEnd cRangeEnde = wmlObjectFactory.createCommentRangeEnd(); // CommentRangeStart cRangeStart = wmlObjectFactory // .createCommentRangeStart(); Comments comment = wmlObjectFactory.createComments(); // Comments.Comment myCom = wm org.docx4j.wml.Comments.Comment c = Context.getWmlObjectFactory().createCommentsComment(); System.out.println("test"); // comment.setParent(cmPart); c.setAuthor(author); // c.setDate(xmlCal); cmPart.getJaxbElement().getComment().add(c); System.out.println("test ende"); }
/** * Create an instance of {@link Comments } * */ public Comments createComments() { return new Comments(); }
/** * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. * * @param parent * The parent object in the object tree. * @param unmarshaller * The unmarshaller that generated the instance. */ public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { setParent(parent); }
private static void collectComments(final Map<BigInteger, CommentWrapper> comments, WordprocessingMLPackage document) { try { CommentsPart commentsPart = (CommentsPart) document.getParts() .get(new PartName("/word/comments.xml")); if (commentsPart != null) { for (Comments.Comment comment : commentsPart.getContents().getComment()) { CommentWrapper commentWrapper = comments.get(comment.getId()); if (commentWrapper != null) { commentWrapper.setComment(comment); } } } } catch (Docx4JException e) { throw new IllegalStateException(e); } }
for (int i = 0; i < jsonArray.length(); i++) { JSONObject entry = jsonArray.getJSONObject(i); JSONObject contentObject = entry.getJSONObject("content"); String content = contentObject.getString("$t"); JSONObject publishedObject = entry.getJSONObject("published"); String published = publishedObject.getString("$t"); JSONArray authorArray = entry.getJSONArray("author"); JSONObject authorObject = authorArray.getJSONObject(0); JSONObject nameObject = authorObject.getJSONObject("name"); String name = nameObject.getString("$t"); comments.add(new Comments(name, content, published)); }
.get(new PartName("/word/comments.xml")); Comments comments = commentsPart.getContents(); for (Comments.Comment comment : comments.getComment()) { if (comment.getId().equals(id)) { return comment;
@Override public void onResponse(JSONObject response) { try { JSONArray jsonArray = response.getJSONArray("poi"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); Comments current = new Comments(); current.image = "drawable://" + R.drawable.juandirection_placeholder; current.title = jsonObject.getString("title"); current.comment = jsonObject.getString("comment"); current.date = jsonObject.getString("date"); current.rating = Integer.parseInt(jsonObject.getString("rating")); commentsData.add(current); } // **you may call function and pass the list value to update your ui component. you will get the real size of list here.** } catch (JSONException e) { e.printStackTrace(); } }
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
}, }); var comments = new Comments();
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
}, }); var comments = new Comments(); var commentView = new CommentView({ collection: comments
.get(new PartName("/word/comments.xml")); Comments comments = commentsPart.getContents(); for (Comments.Comment comment : comments.getComment()) { if (comment.getId().equals(id)) { return comment;