#157 - removed published from dstu1 bundle, as it should only be present for bundleEntry
This commit is contained in:
parent
41c215efe2
commit
de1effbf52
|
@ -293,6 +293,7 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
return myLinkSelf;
|
||||
}
|
||||
|
||||
/*
|
||||
public InstantDt getPublished() {
|
||||
InstantDt retVal = (InstantDt) getResourceMetadata().get(ResourceMetadataKeyEnum.PUBLISHED);
|
||||
if (retVal == null) {
|
||||
|
@ -301,6 +302,7 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
}
|
||||
return retVal;
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Retrieves a resource from a bundle given its logical ID.
|
||||
|
@ -394,9 +396,11 @@ public class Bundle extends BaseBundle /* implements IElement */{
|
|||
myCategories = theCategories;
|
||||
}
|
||||
|
||||
/*
|
||||
public void setPublished(InstantDt thePublished) {
|
||||
getResourceMetadata().put(ResourceMetadataKeyEnum.PUBLISHED, thePublished);
|
||||
}
|
||||
/*
|
||||
|
||||
public void setType(BoundCodeDt<BundleTypeEnum> theType) {
|
||||
myType = theType;
|
||||
|
|
|
@ -192,7 +192,6 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
writeTagWithTextNode(eventWriter, "title", theBundle.getTitle());
|
||||
writeTagWithTextNode(eventWriter, "id", theBundle.getBundleId());
|
||||
writeOptionalTagWithTextNode(eventWriter, "updated", theBundle.getUpdated());
|
||||
writeOptionalTagWithTextNode(eventWriter, "published", theBundle.getPublished());
|
||||
|
||||
boolean linkStarted = false;
|
||||
linkStarted = writeAtomLinkInDstu1Format(eventWriter, "self", theBundle.getLinkSelf(), linkStarted);
|
||||
|
|
|
@ -680,8 +680,6 @@ class ParserState<T> {
|
|||
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
|
||||
if ("entry".equals(theLocalPart) && verifyNamespace(XmlParser.ATOM_NS, theNamespaceURI)) {
|
||||
push(new AtomEntryState(myInstance, myResourceType));
|
||||
} else if (theLocalPart.equals("published")) {
|
||||
push(new AtomPrimitiveState(myInstance.getPublished()));
|
||||
} else if (theLocalPart.equals("title")) {
|
||||
push(new AtomPrimitiveState(myInstance.getTitle()));
|
||||
} else if ("id".equals(theLocalPart)) {
|
||||
|
|
|
@ -266,7 +266,6 @@ public class XmlParser extends BaseParser implements IParser {
|
|||
}
|
||||
|
||||
writeOptionalTagWithTextNode(eventWriter, "updated", theBundle.getUpdated());
|
||||
writeOptionalTagWithTextNode(eventWriter, "published", theBundle.getPublished());
|
||||
|
||||
if (StringUtils.isNotBlank(theBundle.getAuthorName().getValue())) {
|
||||
eventWriter.writeStartElement("author");
|
||||
|
|
|
@ -200,8 +200,6 @@ public class Dstu1BundleFactory implements IVersionSpecificBundleFactory {
|
|||
addResourcesToBundle(resourceList, theBundleType, theServerBase, theServer.getBundleInclusionRule(), theIncludes);
|
||||
addRootPropertiesToBundle(null, theServerBase, theCompleteUrl, theResult.size(), theBundleType);
|
||||
|
||||
myBundle.setPublished(theResult.getPublished());
|
||||
|
||||
if (theServer.getPagingProvider() != null) {
|
||||
int limit;
|
||||
limit = theLimit != null ? theLimit : theServer.getPagingProvider().getDefaultPageSize();
|
||||
|
@ -229,10 +227,6 @@ public class Dstu1BundleFactory implements IVersionSpecificBundleFactory {
|
|||
myBundle.getBundleId().setValue(UUID.randomUUID().toString());
|
||||
}
|
||||
|
||||
if (myBundle.getPublished().isEmpty()) {
|
||||
myBundle.getPublished().setToCurrentTimeInLocalTimeZone();
|
||||
}
|
||||
|
||||
if (myBundle.getLinkBase().isEmpty()) {
|
||||
myBundle.getLinkBase().setValue(theServerBase);
|
||||
}
|
||||
|
@ -266,7 +260,6 @@ public class Dstu1BundleFactory implements IVersionSpecificBundleFactory {
|
|||
|
||||
myBundle.getAuthorName().setValue(theAuthor);
|
||||
myBundle.getBundleId().setValue(UUID.randomUUID().toString());
|
||||
myBundle.getPublished().setToCurrentTimeInLocalTimeZone();
|
||||
myBundle.getLinkBase().setValue(theServerBase);
|
||||
myBundle.getLinkSelf().setValue(theCompleteUrl);
|
||||
myBundle.getType().setValueAsEnum(theBundleType);
|
||||
|
|
|
@ -1219,7 +1219,6 @@ public class JsonParserTest {
|
|||
Bundle b = new Bundle();
|
||||
|
||||
InstantDt pub = InstantDt.withCurrentTime();
|
||||
b.setPublished(pub);
|
||||
Thread.sleep(2);
|
||||
|
||||
Patient p1 = new Patient();
|
||||
|
@ -1245,7 +1244,6 @@ public class JsonParserTest {
|
|||
ourLog.info(bundleString);
|
||||
|
||||
List<String> strings = new ArrayList<String>();
|
||||
strings.addAll(Arrays.asList("\"published\":\"" + pub.getValueAsString() + "\""));
|
||||
strings.addAll(Arrays.asList("\"id\":\"1\""));
|
||||
strings.addAll(Arrays.asList("this is the summary"));
|
||||
strings.addAll(Arrays.asList("\"id\":\"2\"", "\"rel\":\"alternate\"", "\"href\":\"http://foo/bar\""));
|
||||
|
|
|
@ -314,7 +314,6 @@ public class XmlParserTest {
|
|||
b.getCategories().addTag("http://hl7.org/fhir/tag", "http://hl7.org/fhir/tag/message", "Message");
|
||||
|
||||
InstantDt pub = InstantDt.withCurrentTime();
|
||||
b.setPublished(pub);
|
||||
Thread.sleep(2);
|
||||
|
||||
Patient p1 = new Patient();
|
||||
|
@ -340,7 +339,6 @@ public class XmlParserTest {
|
|||
ourLog.info(bundleString);
|
||||
|
||||
List<String> strings = new ArrayList<String>();
|
||||
strings.addAll(Arrays.asList("<published>", pub.getValueAsString(), "</published>"));
|
||||
strings.add("<category term=\"http://hl7.org/fhir/tag/message\" label=\"Message\" scheme=\"http://hl7.org/fhir/tag\"/>");
|
||||
strings.addAll(Arrays.asList("<entry>", "<id>1</id>", "</Patient>", "<summary type=\"xhtml\">", "<div", "</entry>"));
|
||||
strings.addAll(Arrays.asList("<entry>", "<id>2</id>", "<link rel=\"alternate\" href=\"http://foo/bar\"/>", "<link rel=\"search\" href=\"http://foo/bar/search\"/>", "</entry>"));
|
||||
|
@ -380,7 +378,6 @@ public class XmlParserTest {
|
|||
b.getCategories().addTag("http://hl7.org/fhir/tag", "http://hl7.org/fhir/tag/message", "Message");
|
||||
|
||||
InstantDt pub = InstantDt.withCurrentTime();
|
||||
b.setPublished(pub);
|
||||
Thread.sleep(2);
|
||||
|
||||
Patient p1 = new Patient();
|
||||
|
@ -406,7 +403,6 @@ public class XmlParserTest {
|
|||
ourLog.info(bundleString);
|
||||
|
||||
List<String> strings = new ArrayList<String>();
|
||||
strings.addAll(Arrays.asList("<published>", pub.getValueAsString(), "</published>"));
|
||||
strings.add("<category term=\"http://hl7.org/fhir/tag/message\" label=\"Message\" scheme=\"http://hl7.org/fhir/tag\"/>");
|
||||
strings.addAll(Arrays.asList("<entry>", "<id>1</id>", "</Patient>", "<summary type=\"xhtml\">", "<div", "</entry>"));
|
||||
strings.addAll(Arrays.asList("<entry>", "<id>2</id>", "<link rel=\"alternate\" href=\"http://foo/bar\"/>", "<link rel=\"search\" href=\"http://foo/bar/search\"/>", "</entry>"));
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<link rel="self" href="http://localhost:8888/fhir/context/Patient?_pretty=true&_include=Patient.managingOrganization&_pretty=true"/>
|
||||
<link rel="fhir-base" href="http://localhost:8888/fhir/context"/>
|
||||
<os:totalResults xmlns:os="http://a9.com/-/spec/opensearch/1.1/">2</os:totalResults>
|
||||
<published>2014-06-22T21:37:05-04:00</published>
|
||||
<author>
|
||||
<name>HAPI FHIR Server</name>
|
||||
</author>
|
||||
|
|
Loading…
Reference in New Issue