Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdht-dev] Comments on properties on inner classes

 There might be an issue with comments on properties of inner classes;  

here is the code snippet from org.openhealthtools.mdht.uml.cda.core.util.CDAModelUtil.appendPropertyList(Element, Property, boolean, String[], StringBuilder, String, String[], Map<String, List<Constraint>>, List<Constraint>, Map<Constraint, List<Constraint>>)

line 1223

 boolean order = ccm.trim().endsWith(ol[1]);
boolean currentlyItem = false;
if (order) {
int olIndex = ccm.lastIndexOf(ol[1]);
ccm = ccm.substring(0, olIndex);
currentlyItem = ccm.trim().endsWith(li[1]);
}
sb.append(li[0] + prefix + ccm);
StringBuilder propertyComments = new StringBuilder();
currentlyItem &= appendPropertyComments(propertyComments, property, markup);
if (currentlyItem) {
sb.append(li[0]).append(propertyComments).append(li[1]);
}

Does anyone remember the reason we have this limitation on comments (versus just adding them) 
 
In the case that is not adding - ccm is equal to

<b>SHALL</b> contain zero or one [0..1] <tt><b>@nullFlavor</b></tt>

changing the if statement to 

if (currentlyItem) {
sb.append(li[0]).append(propertyComments).append(li[1]);
else {
sb.append(propertyComments);
}

works on my small example

i end up with 

<li>This subject <b>SHALL</b> contain zero or one [0..1] <tt><b>@nullFlavor</b></tt><p><lines><i>3333333333</i></lines></p></li>

Thanks

Sean

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Back to the top