Skip to content

Commit

Permalink
Fix #36 - Allow removal of extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesagnew committed Apr 28, 2015
1 parent 0d71be2 commit b68ce95
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 24 deletions.
Expand Up @@ -91,7 +91,7 @@ public List<ExtensionDt> getUndeclaredExtensions() {
if (myUndeclaredExtensions == null) {
myUndeclaredExtensions = new ArrayList<ExtensionDt>();
}
return Collections.unmodifiableList(myUndeclaredExtensions);
return (myUndeclaredExtensions);
}

@Override
Expand All @@ -111,7 +111,7 @@ public List<ExtensionDt> getUndeclaredModifierExtensions() {
if (myUndeclaredModifierExtensions == null) {
myUndeclaredModifierExtensions = new ArrayList<ExtensionDt>();
}
return Collections.unmodifiableList(myUndeclaredModifierExtensions);
return (myUndeclaredModifierExtensions);
}

/**
Expand Down
Expand Up @@ -27,22 +27,28 @@
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();

Expand All @@ -65,13 +71,17 @@ 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);

/**
* 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);

Expand Down
37 changes: 19 additions & 18 deletions hapi-fhir-testpage-overlay/src/main/webapp/css/tester.css
Expand Up @@ -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
Expand Down Expand Up @@ -144,23 +144,24 @@ PRE.resultBodyPre {
background-color: transparent;
overflow: visible;
/*white-space: normal;*/
white-space: pre-wrap;
}

/*
* Global add-ons
*/

.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;
}

/*
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions src/changes/changes.xml
Expand Up @@ -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">
Expand Down

0 comments on commit b68ce95

Please sign in to comment.