Fix #36 - Allow removal of extensions

This commit is contained in:
James Agnew 2015-04-28 13:58:22 -04:00
parent 0d71be25dd
commit b68ce95b3f
4 changed files with 39 additions and 24 deletions

View File

@ -91,7 +91,7 @@ public abstract class BaseElement implements IElement, ISupportsUndeclaredExtens
if (myUndeclaredExtensions == null) {
myUndeclaredExtensions = new ArrayList<ExtensionDt>();
}
return Collections.unmodifiableList(myUndeclaredExtensions);
return (myUndeclaredExtensions);
}
@Override
@ -111,7 +111,7 @@ public abstract class BaseElement implements IElement, ISupportsUndeclaredExtens
if (myUndeclaredModifierExtensions == null) {
myUndeclaredModifierExtensions = new ArrayList<ExtensionDt>();
}
return Collections.unmodifiableList(myUndeclaredModifierExtensions);
return (myUndeclaredModifierExtensions);
}
/**

View File

@ -27,22 +27,28 @@ import org.hl7.fhir.instance.model.api.IBaseDatatype;
public interface ISupportsUndeclaredExtensions extends IElement {
/**
* Returns a list containing all undeclared non-modifier extensions
* Returns a list containing all undeclared non-modifier extensions. The returned list
* is mutable, so it may be modified (e.g. to add or remove an extension).
*/
List<ExtensionDt> getUndeclaredExtensions();
/**
* Returns a list containing all undeclared extensions (modifier and non-modifier) by extension URL
* Returns an <b>immutable</b> list containing all undeclared extensions (modifier and non-modifier) by extension URL
*
* @see #getUndeclaredExtensions() To return a mutable list which may be used to remove extensions
*/
List<ExtensionDt> getUndeclaredExtensionsByUrl(String theUrl);
/**
* Returns an <b>immutable</b> list containing all extensions (modifier and non-modifier)
* Returns an <b>immutable</b> list containing all extensions (modifier and non-modifier).
*
* @see #getUndeclaredExtensions() To return a mutable list which may be used to remove extensions
*/
List<ExtensionDt> getAllUndeclaredExtensions();
/**
* Returns a list containing all undeclared modifier extensions
* Returns a list containing all undeclared modifier extensions. The returned list
* is mutable, so it may be modified (e.g. to add or remove an extension).
*/
List<ExtensionDt> getUndeclaredModifierExtensions();
@ -65,6 +71,8 @@ public interface ISupportsUndeclaredExtensions extends IElement {
/**
* Adds an extension to this object
*
* @see #getUndeclaredExtensions() To return a mutable list which may be used to remove extensions
*/
ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IBaseDatatype theValue);
@ -72,6 +80,8 @@ public interface ISupportsUndeclaredExtensions extends IElement {
* Adds an extension to this object. This method is intended for use when
* an extension is being added which will contain child extensions, as opposed to
* a datatype.
*
* @see #getUndeclaredExtensions() To return a mutable list which may be used to remove extensions
*/
ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl);

View File

@ -11,8 +11,8 @@ fieldset[disabled].btn {
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
overflow-x: hidden;
padding-top: 50px;
overflow-x: hidden;
}
.clientCodeBox
@ -144,6 +144,7 @@ PRE.resultBodyPre {
background-color: transparent;
overflow: visible;
/*white-space: normal;*/
white-space: pre-wrap;
}
/*
@ -151,16 +152,16 @@ PRE.resultBodyPre {
*/
.sub-header {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
body .syntaxhighlighter .line {
white-space: pre-wrap !important; /* make code wrap */
white-space: pre-wrap !important; /* make code wrap */
}
.syntaxhighlight {
white-space: pre-wrap;
white-space: pre-wrap;
}
/*
@ -216,14 +217,14 @@ body .syntaxhighlighter .line {
padding: 20px;
}
@media (min-width: 768px) {
.main {
padding-top: 10px;
padding-right: 10px;
padding-left: 10px;
}
.main {
padding-top: 10px;
padding-right: 10px;
padding-left: 10px;
}
}
.main .page-header {
margin-top: 0;
margin-top: 0;
}
.navBarButtonLabel {
@ -235,18 +236,18 @@ body .syntaxhighlighter .line {
*/
.placeholders {
margin-bottom: 30px;
text-align: center;
margin-bottom: 30px;
text-align: center;
}
.placeholders h4 {
margin-bottom: 0;
margin-bottom: 0;
}
.placeholder {
margin-bottom: 20px;
margin-bottom: 20px;
}
.placeholder img {
display: inline-block;
border-radius: 50%;
display: inline-block;
border-radius: 50%;
}
DIV.queryParameter {

View File

@ -164,6 +164,10 @@
enter partial dates, or dates without times, or even test out invalid date
options.
</action>
<action type="fix" issue="36">
Make BaseElement#getUndeclaredExtensions() and BaseElement#getUndeclaredExtensions() return
a mutable list so that it is possible to delete extensions from a resource instance.
</action>
</release>
<release version="0.9" date="2015-Mar-14">
<action type="add">