Remove unneccesary log lines and clean up some documentation
This commit is contained in:
parent
3b2930f8e9
commit
6e47951220
|
@ -55,7 +55,7 @@ public interface IParserErrorHandler {
|
||||||
void incorrectJsonType(IParseLocation theLocation, String theElementName, ValueType theExpectedValueType, ScalarType theExpectedScalarType, ValueType theFoundValueType, ScalarType theFoundScalarType);
|
void incorrectJsonType(IParseLocation theLocation, String theElementName, ValueType theExpectedValueType, ScalarType theExpectedScalarType, ValueType theFoundValueType, ScalarType theFoundScalarType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The parser detected an atttribute value that was invalid (such as: empty "" values are not permitted)
|
* The parser detected an attribute value that was invalid (such as: empty "" values are not permitted)
|
||||||
*
|
*
|
||||||
* @param theLocation
|
* @param theLocation
|
||||||
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
|
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
|
||||||
|
@ -70,7 +70,7 @@ public interface IParserErrorHandler {
|
||||||
*
|
*
|
||||||
* @param theLocation
|
* @param theLocation
|
||||||
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
|
* The location in the document. Note that this may be <code>null</code> as the ParseLocation feature is experimental. Use with caution, as the API may change.
|
||||||
* @param theReference The actual invalid reference (e.g. "#3")
|
* @param theElementName The missing element name
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
void missingRequiredElement(IParseLocation theLocation, String theElementName);
|
void missingRequiredElement(IParseLocation theLocation, String theElementName);
|
||||||
|
@ -123,7 +123,7 @@ public interface IParserErrorHandler {
|
||||||
* type which will currently always be set to null. This interface is included here so that
|
* type which will currently always be set to null. This interface is included here so that
|
||||||
* locations can be added to the API in a future release without changing the API.
|
* locations can be added to the API in a future release without changing the API.
|
||||||
*/
|
*/
|
||||||
public interface IParseLocation {
|
interface IParseLocation {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the parent element (the element containing the element currently being parsed)
|
* Returns the name of the parent element (the element containing the element currently being parsed)
|
||||||
|
|
|
@ -1033,7 +1033,7 @@ public class JsonParser extends BaseParser implements IJsonLikeParser {
|
||||||
} else {
|
} else {
|
||||||
parentElementName = "extension";
|
parentElementName = "extension";
|
||||||
}
|
}
|
||||||
getErrorHandler().missingRequiredElement(new ParseLocation(parentElementName), "url");
|
getErrorHandler().missingRequiredElement(new ParseLocation().setParentElementName(parentElementName), "url");
|
||||||
url = null;
|
url = null;
|
||||||
} else {
|
} else {
|
||||||
url = getExtensionUrl(jsonElement.getAsString());
|
url = getExtensionUrl(jsonElement.getAsString());
|
||||||
|
|
|
@ -29,9 +29,8 @@ class ParseLocation implements IParseLocation {
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
public ParseLocation(String theParentElementName) {
|
public ParseLocation() {
|
||||||
super();
|
super();
|
||||||
myParentElementName = theParentElementName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -39,4 +38,9 @@ class ParseLocation implements IParseLocation {
|
||||||
return myParentElementName;
|
return myParentElementName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ParseLocation setParentElementName(String theParentElementName) {
|
||||||
|
myParentElementName = theParentElementName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,7 +806,7 @@ class ParserState<T> {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<IBase> securityLabels = (List<IBase>) myMap.get(ResourceMetadataKeyEnum.SECURITY_LABELS);
|
List<IBase> securityLabels = (List<IBase>) myMap.get(ResourceMetadataKeyEnum.SECURITY_LABELS);
|
||||||
if (securityLabels == null) {
|
if (securityLabels == null) {
|
||||||
securityLabels = new ArrayList<IBase>();
|
securityLabels = new ArrayList<>();
|
||||||
myMap.put(ResourceMetadataKeyEnum.SECURITY_LABELS, securityLabels);
|
myMap.put(ResourceMetadataKeyEnum.SECURITY_LABELS, securityLabels);
|
||||||
}
|
}
|
||||||
IBase securityLabel = myContext.getVersion().newCodingDt();
|
IBase securityLabel = myContext.getVersion().newCodingDt();
|
||||||
|
|
|
@ -7,6 +7,7 @@ import ca.uhn.fhir.model.dstu2.resource.Bundle.Entry;
|
||||||
import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
|
import ca.uhn.fhir.model.dstu2.resource.StructureDefinition;
|
||||||
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
|
import ca.uhn.fhir.model.dstu2.resource.ValueSet;
|
||||||
import ca.uhn.fhir.rest.client.api.IGenericClient;
|
import ca.uhn.fhir.rest.client.api.IGenericClient;
|
||||||
|
import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||||
import org.apache.commons.cli.CommandLine;
|
import org.apache.commons.cli.CommandLine;
|
||||||
import org.apache.commons.cli.Option;
|
import org.apache.commons.cli.Option;
|
||||||
|
@ -163,7 +164,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
ValueSet next = (ValueSet) i.getResource();
|
ValueSet next = (ValueSet) i.getResource();
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -182,7 +183,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
ValueSet next = (ValueSet) i.getResource();
|
ValueSet next = (ValueSet) i.getResource();
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -200,7 +201,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
ValueSet next = (ValueSet) i.getResource();
|
ValueSet next = (ValueSet) i.getResource();
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +226,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
}
|
}
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading StructureDefinition {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading StructureDefinition {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
try {
|
try {
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -268,12 +269,14 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
|
|
||||||
int bytes = ctx.newXmlParser().encodeResourceToString(next).length();
|
int bytes = ctx.newXmlParser().encodeResourceToString(next).length();
|
||||||
|
|
||||||
ourLog.info("Uploading ValueSet {}/{} : {} ({} bytes}", new Object[]{count, total, next.getIdElement().getValue(), bytes});
|
ourLog.info("Uploading ValueSet {}/{} : {} ({} bytes}", new Object[] {count, total, next.getIdElement().getValue(), bytes});
|
||||||
try {
|
try {
|
||||||
IIdType id = client.update().resource(next).execute().getId();
|
IIdType id = client.update().resource(next).execute().getId();
|
||||||
ourLog.info(" - Got ID: {}", id.getValue());
|
ourLog.info(" - Got ID: {}", id.getValue());
|
||||||
} catch (UnprocessableEntityException e) {
|
} catch (UnprocessableEntityException e) {
|
||||||
ourLog.warn("UnprocessableEntityException: " + e.toString());
|
ourLog.warn("UnprocessableEntityException: " + e.toString());
|
||||||
|
} catch (BaseServerResponseException e) {
|
||||||
|
ourLog.warn("Server responded HTTP " + e.getStatusCode() + ": " + e.toString());
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +296,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
org.hl7.fhir.dstu3.model.Resource next = i.getResource();
|
org.hl7.fhir.dstu3.model.Resource next = i.getResource();
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
try {
|
try {
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -318,7 +321,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
}
|
}
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +367,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
|
|
||||||
int bytes = theCtx.newXmlParser().encodeResourceToString(next).length();
|
int bytes = theCtx.newXmlParser().encodeResourceToString(next).length();
|
||||||
|
|
||||||
ourLog.info("Uploading ValueSet {}/{} : {} ({} bytes}", new Object[]{count, total, next.getIdElement().getValue(), bytes});
|
ourLog.info("Uploading ValueSet {}/{} : {} ({} bytes}", new Object[] {count, total, next.getIdElement().getValue(), bytes});
|
||||||
try {
|
try {
|
||||||
IIdType id = client.update().resource(next).execute().getId();
|
IIdType id = client.update().resource(next).execute().getId();
|
||||||
ourLog.info(" - Got ID: {}", id.getValue());
|
ourLog.info(" - Got ID: {}", id.getValue());
|
||||||
|
@ -388,7 +391,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
org.hl7.fhir.r4.model.Resource next = i.getResource();
|
org.hl7.fhir.r4.model.Resource next = i.getResource();
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v3-codesystems ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -410,7 +413,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
}
|
}
|
||||||
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
next.setId(next.getIdElement().toUnqualifiedVersionless());
|
||||||
|
|
||||||
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[]{count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading v2-tables ValueSet {}/{} : {}", new Object[] {count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -470,7 +473,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ourLog.info("Uploading {} StructureDefinition {}/{} : {}", new Object[]{name, count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading {} StructureDefinition {}/{} : {}", new Object[] {name, count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
@ -518,7 +521,7 @@ public class ValidationDataUploader extends BaseCommand {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ourLog.info("Uploading {} StructureDefinition {}/{} : {}", new Object[]{name, count, total, next.getIdElement().getValue()});
|
ourLog.info("Uploading {} StructureDefinition {}/{} : {}", new Object[] {name, count, total, next.getIdElement().getValue()});
|
||||||
client.update().resource(next).execute();
|
client.update().resource(next).execute();
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
|
@ -154,6 +154,10 @@
|
||||||
Deleting a resource from the testpage overlay resulted in an error page after
|
Deleting a resource from the testpage overlay resulted in an error page after
|
||||||
clicking "delete", even though the delete succeeded.
|
clicking "delete", even though the delete succeeded.
|
||||||
</action>
|
</action>
|
||||||
|
<action type="remove">
|
||||||
|
A number of info level log lines have been reduced to debug level in the JPA server, in
|
||||||
|
order to reduce contention during heavy loads.
|
||||||
|
</action>
|
||||||
</release>
|
</release>
|
||||||
<release version="3.2.0" date="2018-01-13">
|
<release version="3.2.0" date="2018-01-13">
|
||||||
<action type="add">
|
<action type="add">
|
||||||
|
|
Loading…
Reference in New Issue