Doc cleanup
This commit is contained in:
parent
dd9f80ecb1
commit
75f5b47762
|
@ -126,9 +126,9 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
private boolean myPrettyPrint;
|
private boolean myPrettyPrint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not use this constructor, the recommended way to obtain a new instance of the JSON parser is to invoke
|
* Do not use this constructor, the recommended way to obtain a new instance of the JSON parser is to invoke {@link FhirContext#newJsonParser()}.
|
||||||
* {@link FhirContext#newJsonParser()}.
|
*
|
||||||
* @param theParserErrorHandler
|
* @param theParserErrorHandler
|
||||||
*/
|
*/
|
||||||
public JsonParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler) {
|
public JsonParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler) {
|
||||||
super(theContext, theParserErrorHandler);
|
super(theContext, theParserErrorHandler);
|
||||||
|
@ -433,10 +433,8 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
case CONTAINED_RESOURCE_LIST:
|
case CONTAINED_RESOURCE_LIST:
|
||||||
case CONTAINED_RESOURCES: {
|
case CONTAINED_RESOURCES: {
|
||||||
/*
|
/*
|
||||||
* Disabled per #103 ContainedDt value = (ContainedDt) theNextValue; for (IResource next :
|
* Disabled per #103 ContainedDt value = (ContainedDt) theNextValue; for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) {
|
||||||
* value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { continue; }
|
* continue; } encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true, fixContainedResourceId(next.getId().getValue())); }
|
||||||
* encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true,
|
|
||||||
* fixContainedResourceId(next.getId().getValue())); }
|
|
||||||
*/
|
*/
|
||||||
List<IBaseResource> containedResources = getContainedResources().getContainedResources();
|
List<IBaseResource> containedResources = getContainedResources().getContainedResources();
|
||||||
if (containedResources.size() > 0) {
|
if (containedResources.size() > 0) {
|
||||||
|
@ -513,7 +511,7 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<? extends IBase> values = nextChild.getAccessor().getValues(theNextValue);
|
List<? extends IBase> values = nextChild.getAccessor().getValues(theNextValue);
|
||||||
if (values == null || values.isEmpty()) {
|
if (values == null || values.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -545,7 +543,7 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
boolean primitive = childDef.getChildType() == ChildTypeEnum.PRIMITIVE_DATATYPE;
|
boolean primitive = childDef.getChildType() == ChildTypeEnum.PRIMITIVE_DATATYPE;
|
||||||
|
|
||||||
if ((childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES||childDef.getChildType()==ChildTypeEnum.CONTAINED_RESOURCE_LIST) && theContainedResource) {
|
if ((childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES || childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCE_LIST) && theContainedResource) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,7 +668,7 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
} else if (theResource instanceof IAnyResource) {
|
} else if (theResource instanceof IAnyResource) {
|
||||||
IAnyResource res = (IAnyResource) theResource;
|
IAnyResource res = (IAnyResource) theResource;
|
||||||
if (/*theContainedResource && */ StringUtils.isNotBlank(res.getIdElement().getIdPart())) {
|
if (/* theContainedResource && */StringUtils.isNotBlank(res.getIdElement().getIdPart())) {
|
||||||
resourceId = res.getIdElement().getIdPart();
|
resourceId = res.getIdElement().getIdPart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -678,11 +676,12 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
if (isOmitResourceId() && !theContainedResource) {
|
if (isOmitResourceId() && !theContainedResource) {
|
||||||
resourceId = null;
|
resourceId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
encodeResourceToJsonStreamWriter(theResDef, theResource, theEventWriter, theObjectNameOrNull, theContainedResource, resourceId);
|
encodeResourceToJsonStreamWriter(theResDef, theResource, theEventWriter, theObjectNameOrNull, theContainedResource, resourceId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void encodeResourceToJsonStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, String theObjectNameOrNull, boolean theContainedResource, String theResourceId) throws IOException {
|
private void encodeResourceToJsonStreamWriter(RuntimeResourceDefinition theResDef, IBaseResource theResource, JsonGenerator theEventWriter, String theObjectNameOrNull,
|
||||||
|
boolean theContainedResource, String theResourceId) throws IOException {
|
||||||
if (!theContainedResource) {
|
if (!theContainedResource) {
|
||||||
super.containResourcesForEncoding(theResource);
|
super.containResourcesForEncoding(theResource);
|
||||||
}
|
}
|
||||||
|
@ -807,10 +806,10 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is useful only for the two cases where extensions are encoded as direct children (e.g. not in some object
|
* This is useful only for the two cases where extensions are encoded as direct children (e.g. not in some object called _name): resource extensions, and extension extensions
|
||||||
* called _name): resource extensions, and extension extensions
|
|
||||||
*/
|
*/
|
||||||
private void extractAndWriteExtensionsAsDirectChild(IBase theElement, JsonGenerator theEventWriter, BaseRuntimeElementDefinition<?> theElementDef, RuntimeResourceDefinition theResDef, IBaseResource theResource, String theParentExtensionUrl) throws IOException {
|
private void extractAndWriteExtensionsAsDirectChild(IBase theElement, JsonGenerator theEventWriter, BaseRuntimeElementDefinition<?> theElementDef, RuntimeResourceDefinition theResDef,
|
||||||
|
IBaseResource theResource, String theParentExtensionUrl) throws IOException {
|
||||||
List<HeldExtension> extensions = new ArrayList<HeldExtension>(0);
|
List<HeldExtension> extensions = new ArrayList<HeldExtension>(0);
|
||||||
List<HeldExtension> modifierExtensions = new ArrayList<HeldExtension>(0);
|
List<HeldExtension> modifierExtensions = new ArrayList<HeldExtension>(0);
|
||||||
|
|
||||||
|
@ -944,7 +943,8 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
object = reader.readObject();
|
object = reader.readObject();
|
||||||
} catch (JsonParsingException e) {
|
} catch (JsonParsingException e) {
|
||||||
if (e.getMessage().startsWith("Unexpected char 39")) {
|
if (e.getMessage().startsWith("Unexpected char 39")) {
|
||||||
throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage() + " - This may indicate that single quotes are being used as JSON escapes where double quotes are required", e);
|
throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage()
|
||||||
|
+ " - This may indicate that single quotes are being used as JSON escapes where double quotes are required", e);
|
||||||
}
|
}
|
||||||
throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage(), e);
|
throw new DataFormatException("Failed to parse JSON encoded FHIR content: " + e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
@ -1205,21 +1205,21 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
try {
|
try {
|
||||||
JsonReader reader = Json.createReader(theReader);
|
JsonReader reader = Json.createReader(theReader);
|
||||||
JsonObject object = reader.readObject();
|
JsonObject object = reader.readObject();
|
||||||
|
|
||||||
JsonValue resourceTypeObj = object.get("resourceType");
|
JsonValue resourceTypeObj = object.get("resourceType");
|
||||||
assertObjectOfType(resourceTypeObj, JsonValue.ValueType.STRING, "resourceType");
|
assertObjectOfType(resourceTypeObj, JsonValue.ValueType.STRING, "resourceType");
|
||||||
String resourceType = ((JsonString) resourceTypeObj).getString();
|
String resourceType = ((JsonString) resourceTypeObj).getString();
|
||||||
|
|
||||||
ParserState<? extends IBaseResource> state = ParserState.getPreResourceInstance(theResourceType, myContext, true, getErrorHandler());
|
ParserState<? extends IBaseResource> state = ParserState.getPreResourceInstance(theResourceType, myContext, true, getErrorHandler());
|
||||||
state.enteringNewElement(null, resourceType);
|
state.enteringNewElement(null, resourceType);
|
||||||
|
|
||||||
parseChildren(object, state);
|
parseChildren(object, state);
|
||||||
|
|
||||||
state.endingElement();
|
state.endingElement();
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T retVal = (T) state.getObject();
|
T retVal = (T) state.getObject();
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
} catch (JsonParsingException e) {
|
} catch (JsonParsingException e) {
|
||||||
throw new DataFormatException("Failed to parse JSON: " + e.getMessage(), e);
|
throw new DataFormatException("Failed to parse JSON: " + e.getMessage(), e);
|
||||||
|
@ -1308,7 +1308,8 @@ public class JsonParser extends BaseParser implements IParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeExtensionsAsDirectChild(IBaseResource theResource, JsonGenerator theEventWriter, RuntimeResourceDefinition resDef, List<HeldExtension> extensions, List<HeldExtension> modifierExtensions, String theParentExtensionUrl) throws IOException {
|
private void writeExtensionsAsDirectChild(IBaseResource theResource, JsonGenerator theEventWriter, RuntimeResourceDefinition resDef, List<HeldExtension> extensions,
|
||||||
|
List<HeldExtension> modifierExtensions, String theParentExtensionUrl) throws IOException {
|
||||||
if (extensions.isEmpty() == false) {
|
if (extensions.isEmpty() == false) {
|
||||||
theEventWriter.writeStartArray("extension");
|
theEventWriter.writeStartArray("extension");
|
||||||
for (HeldExtension next : extensions) {
|
for (HeldExtension next : extensions) {
|
||||||
|
|
|
@ -212,7 +212,7 @@ class ParserState<T> {
|
||||||
myState.xmlEvent(theNextEvent);
|
myState.xmlEvent(theNextEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ParserState<Bundle> getPreAtomInstance(FhirContext theContext, Class<? extends IBaseResource> theResourceType, boolean theJsonMode, IParserErrorHandler theErrorHandler)
|
static ParserState<Bundle> getPreAtomInstance(FhirContext theContext, Class<? extends IBaseResource> theResourceType, boolean theJsonMode, IParserErrorHandler theErrorHandler)
|
||||||
throws DataFormatException {
|
throws DataFormatException {
|
||||||
ParserState<Bundle> retVal = new ParserState<Bundle>(theContext, theJsonMode, theErrorHandler);
|
ParserState<Bundle> retVal = new ParserState<Bundle>(theContext, theJsonMode, theErrorHandler);
|
||||||
if (theContext.getVersion().getVersion() == FhirVersionEnum.DSTU1) {
|
if (theContext.getVersion().getVersion() == FhirVersionEnum.DSTU1) {
|
||||||
|
@ -227,7 +227,7 @@ class ParserState<T> {
|
||||||
* @param theResourceType
|
* @param theResourceType
|
||||||
* May be null
|
* May be null
|
||||||
*/
|
*/
|
||||||
public static <T extends IBaseResource> ParserState<T> getPreResourceInstance(Class<T> theResourceType, FhirContext theContext, boolean theJsonMode, IParserErrorHandler theErrorHandler)
|
static <T extends IBaseResource> ParserState<T> getPreResourceInstance(Class<T> theResourceType, FhirContext theContext, boolean theJsonMode, IParserErrorHandler theErrorHandler)
|
||||||
throws DataFormatException {
|
throws DataFormatException {
|
||||||
ParserState<T> retVal = new ParserState<T>(theContext, theJsonMode, theErrorHandler);
|
ParserState<T> retVal = new ParserState<T>(theContext, theJsonMode, theErrorHandler);
|
||||||
if (theResourceType == null) {
|
if (theResourceType == null) {
|
||||||
|
@ -246,13 +246,13 @@ class ParserState<T> {
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ParserState<TagList> getPreTagListInstance(FhirContext theContext, boolean theJsonMode, IParserErrorHandler theErrorHandler) {
|
static ParserState<TagList> getPreTagListInstance(FhirContext theContext, boolean theJsonMode, IParserErrorHandler theErrorHandler) {
|
||||||
ParserState<TagList> retVal = new ParserState<TagList>(theContext, theJsonMode, theErrorHandler);
|
ParserState<TagList> retVal = new ParserState<TagList>(theContext, theJsonMode, theErrorHandler);
|
||||||
retVal.push(retVal.new PreTagListState());
|
retVal.push(retVal.new PreTagListState());
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AtomAuthorState extends BaseState {
|
private class AtomAuthorState extends BaseState {
|
||||||
|
|
||||||
private BaseBundle myInstance;
|
private BaseBundle myInstance;
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AtomDeletedEntryByState extends BaseState {
|
private class AtomDeletedEntryByState extends BaseState {
|
||||||
|
|
||||||
private BundleEntry myEntry;
|
private BundleEntry myEntry;
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AtomDeletedEntryState extends AtomEntryState {
|
private class AtomDeletedEntryState extends AtomEntryState {
|
||||||
|
|
||||||
public AtomDeletedEntryState(Bundle theInstance, Class<? extends IBaseResource> theResourceType) {
|
public AtomDeletedEntryState(Bundle theInstance, Class<? extends IBaseResource> theResourceType) {
|
||||||
super(theInstance, theResourceType);
|
super(theInstance, theResourceType);
|
||||||
|
@ -450,7 +450,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AtomEntryState extends BaseState {
|
private class AtomEntryState extends BaseState {
|
||||||
|
|
||||||
private boolean myDeleted;
|
private boolean myDeleted;
|
||||||
private BundleEntry myEntry;
|
private BundleEntry myEntry;
|
||||||
|
@ -995,7 +995,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BundleEntrySearchState extends BaseState {
|
private class BundleEntrySearchState extends BaseState {
|
||||||
|
|
||||||
private BundleEntry myEntry;
|
private BundleEntry myEntry;
|
||||||
|
|
||||||
|
@ -1022,7 +1022,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BundleEntryState extends BaseState {
|
private class BundleEntryState extends BaseState {
|
||||||
|
|
||||||
private BundleEntry myEntry;
|
private BundleEntry myEntry;
|
||||||
private Class<? extends IBaseResource> myResourceType;
|
private Class<? extends IBaseResource> myResourceType;
|
||||||
|
@ -1120,7 +1120,7 @@ class ParserState<T> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BundleEntryTransactionState extends BaseState {
|
private class BundleEntryTransactionState extends BaseState {
|
||||||
|
|
||||||
private BundleEntry myEntry;
|
private BundleEntry myEntry;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public @interface OperationParam {
|
||||||
/**
|
/**
|
||||||
* Value for {@link OperationParam#max()} indicating no maximum
|
* Value for {@link OperationParam#max()} indicating no maximum
|
||||||
*/
|
*/
|
||||||
int MAX_UNLIMITED = -1;
|
final int MAX_UNLIMITED = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the parameter
|
* The name of the parameter
|
||||||
|
|
|
@ -71,7 +71,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
private String myLastResponseBody;
|
private String myLastResponseBody;
|
||||||
private Boolean myPrettyPrint = false;
|
private Boolean myPrettyPrint = false;
|
||||||
private final String myUrlBase;
|
private final String myUrlBase;
|
||||||
|
|
||||||
BaseClient(HttpClient theClient, String theUrlBase, RestfulClientFactory theFactory) {
|
BaseClient(HttpClient theClient, String theUrlBase, RestfulClientFactory theFactory) {
|
||||||
super();
|
super();
|
||||||
myClient = theClient;
|
myClient = theClient;
|
||||||
|
@ -95,6 +95,10 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void forceConformanceCheck() {
|
||||||
|
myFactory.validateServerBase(myUrlBase, myClient, this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the encoding that will be used on requests. Default is <code>null</code>, which means the client will not explicitly request an encoding. (This is standard behaviour according to the
|
* Returns the encoding that will be used on requests. Default is <code>null</code>, which means the client will not explicitly request an encoding. (This is standard behaviour according to the
|
||||||
* FHIR specification)
|
* FHIR specification)
|
||||||
|
@ -111,6 +115,10 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
return myClient;
|
return myClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<IClientInterceptor> getInterceptors() {
|
||||||
|
return Collections.unmodifiableList(myInterceptors);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
* For now, this is a part of the internal API of HAPI - Use with caution as this method may change!
|
||||||
*/
|
*/
|
||||||
|
@ -144,7 +152,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
public String getUrlBase() {
|
public String getUrlBase() {
|
||||||
return myUrlBase;
|
return myUrlBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) {
|
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) {
|
||||||
return invokeClient(theContext, binding, clientInvocation, false);
|
return invokeClient(theContext, binding, clientInvocation, false);
|
||||||
}
|
}
|
||||||
|
@ -153,39 +161,35 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
return invokeClient(theContext, binding, clientInvocation, null, null, theLogRequestAndResponse);
|
return invokeClient(theContext, binding, clientInvocation, null, null, theLogRequestAndResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
void forceConformanceCheck() {
|
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, EncodingEnum theEncoding, Boolean thePrettyPrint,
|
||||||
myFactory.validateServerBase(myUrlBase, myClient, this);
|
boolean theLogRequestAndResponse) {
|
||||||
}
|
|
||||||
|
|
||||||
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, EncodingEnum theEncoding, Boolean thePrettyPrint, boolean theLogRequestAndResponse) {
|
|
||||||
|
|
||||||
if (!myDontValidateConformance) {
|
if (!myDontValidateConformance) {
|
||||||
myFactory.validateServerBaseIfConfiguredToDoSo(myUrlBase, myClient, this);
|
myFactory.validateServerBaseIfConfiguredToDoSo(myUrlBase, myClient, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: handle non 2xx status codes by throwing the correct exception,
|
// TODO: handle non 2xx status codes by throwing the correct exception,
|
||||||
// and ensure it's passed upwards
|
// and ensure it's passed upwards
|
||||||
HttpRequestBase httpRequest;
|
HttpRequestBase httpRequest;
|
||||||
HttpResponse response;
|
HttpResponse response;
|
||||||
try {
|
try {
|
||||||
Map<String, List<String>> params = createExtraParams();
|
Map<String, List<String>> params = createExtraParams();
|
||||||
|
|
||||||
if (theEncoding == EncodingEnum.XML) {
|
if (theEncoding == EncodingEnum.XML) {
|
||||||
params.put(Constants.PARAM_FORMAT, Collections.singletonList("xml"));
|
params.put(Constants.PARAM_FORMAT, Collections.singletonList("xml"));
|
||||||
} else if (theEncoding == EncodingEnum.JSON) {
|
} else if (theEncoding == EncodingEnum.JSON) {
|
||||||
params.put(Constants.PARAM_FORMAT, Collections.singletonList("json"));
|
params.put(Constants.PARAM_FORMAT, Collections.singletonList("json"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thePrettyPrint == Boolean.TRUE) {
|
if (thePrettyPrint == Boolean.TRUE) {
|
||||||
params.put(Constants.PARAM_PRETTY, Collections.singletonList(Constants.PARAM_PRETTY_VALUE_TRUE));
|
params.put(Constants.PARAM_PRETTY, Collections.singletonList(Constants.PARAM_PRETTY_VALUE_TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EncodingEnum encoding = getEncoding();
|
EncodingEnum encoding = getEncoding();
|
||||||
if (theEncoding != null) {
|
if (theEncoding != null) {
|
||||||
encoding=theEncoding;
|
encoding = theEncoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
httpRequest = clientInvocation.asHttpRequest(myUrlBase, params, encoding, thePrettyPrint);
|
httpRequest = clientInvocation.asHttpRequest(myUrlBase, params, encoding, thePrettyPrint);
|
||||||
|
|
||||||
if (theLogRequestAndResponse) {
|
if (theLogRequestAndResponse) {
|
||||||
|
@ -223,7 +227,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
ContentType ct = ContentType.get(response.getEntity());
|
ContentType ct = ContentType.get(response.getEntity());
|
||||||
mimeType = ct != null ? ct.getMimeType() : null;
|
mimeType = ct != null ? ct.getMimeType() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, List<String>> headers = new HashMap<String, List<String>>();
|
Map<String, List<String>> headers = new HashMap<String, List<String>>();
|
||||||
if (response.getAllHeaders() != null) {
|
if (response.getAllHeaders() != null) {
|
||||||
for (Header next : response.getAllHeaders()) {
|
for (Header next : response.getAllHeaders()) {
|
||||||
|
@ -250,7 +254,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
String message = "HTTP " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase();
|
String message = "HTTP " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase();
|
||||||
BaseOperationOutcome oo=null;
|
BaseOperationOutcome oo = null;
|
||||||
if (Constants.CT_TEXT.equals(mimeType)) {
|
if (Constants.CT_TEXT.equals(mimeType)) {
|
||||||
message = message + ": " + body;
|
message = message + ": " + body;
|
||||||
} else {
|
} else {
|
||||||
|
@ -259,8 +263,8 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
IParser p = enc.newParser(theContext);
|
IParser p = enc.newParser(theContext);
|
||||||
try {
|
try {
|
||||||
// TODO: handle if something other than OO comes back
|
// TODO: handle if something other than OO comes back
|
||||||
oo = (BaseOperationOutcome) p.parseResource( body);
|
oo = (BaseOperationOutcome) p.parseResource(body);
|
||||||
if (oo.getIssueFirstRep().getDetailsElement().isEmpty()==false) {
|
if (oo.getIssueFirstRep().getDetailsElement().isEmpty() == false) {
|
||||||
message = message + ": " + oo.getIssueFirstRep().getDetailsElement().getValue();
|
message = message + ": " + oo.getIssueFirstRep().getDetailsElement().getValue();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -273,7 +277,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
|
|
||||||
BaseServerResponseException exception = BaseServerResponseException.newInstance(response.getStatusLine().getStatusCode(), message);
|
BaseServerResponseException exception = BaseServerResponseException.newInstance(response.getStatusLine().getStatusCode(), message);
|
||||||
exception.setOperationOutcome(oo);
|
exception.setOperationOutcome(oo);
|
||||||
|
|
||||||
if (body != null) {
|
if (body != null) {
|
||||||
exception.setResponseBody(body);
|
exception.setResponseBody(body);
|
||||||
}
|
}
|
||||||
|
@ -368,27 +372,27 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
ourLog.trace("FHIR response:\n{}\n{}", response, responseString);
|
ourLog.trace("FHIR response:\n{}\n{}", response, responseString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerInterceptor(IClientInterceptor theInterceptor) {
|
public void registerInterceptor(IClientInterceptor theInterceptor) {
|
||||||
Validate.notNull(theInterceptor, "Interceptor can not be null");
|
Validate.notNull(theInterceptor, "Interceptor can not be null");
|
||||||
myInterceptors.add(theInterceptor);
|
myInterceptors.add(theInterceptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is an internal part of the HAPI API and may change, use with caution. If you
|
* This method is an internal part of the HAPI API and may change, use with caution. If you want to disable the loading of conformance statements, use
|
||||||
* want to disable the loading of conformance statements, use {@link IRestfulClientFactory#setServerValidationModeEnum(ServerValidationModeEnum)}
|
* {@link IRestfulClientFactory#setServerValidationModeEnum(ServerValidationModeEnum)}
|
||||||
*/
|
*/
|
||||||
public void setDontValidateConformance(boolean theDontValidateConformance) {
|
public void setDontValidateConformance(boolean theDontValidateConformance) {
|
||||||
myDontValidateConformance = theDontValidateConformance;
|
myDontValidateConformance = theDontValidateConformance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the encoding that will be used on requests. Default is <code>null</code>, which means the client will not explicitly request an encoding. (This is perfectly acceptable behaviour according to the FHIR
|
* Sets the encoding that will be used on requests. Default is <code>null</code>, which means the client will not explicitly request an encoding. (This is perfectly acceptable behaviour according
|
||||||
* specification. In this case, the server will choose which encoding to return, and the client can handle either XML or JSON)
|
* to the FHIR specification. In this case, the server will choose which encoding to return, and the client can handle either XML or JSON)
|
||||||
*/
|
*/
|
||||||
public void setEncoding(EncodingEnum theEncoding) {
|
public void setEncoding(EncodingEnum theEncoding) {
|
||||||
myEncoding = theEncoding;
|
myEncoding = theEncoding;
|
||||||
// return this;
|
// return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -418,7 +422,7 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
*/
|
*/
|
||||||
public void setPrettyPrint(Boolean thePrettyPrint) {
|
public void setPrettyPrint(Boolean thePrettyPrint) {
|
||||||
myPrettyPrint = thePrettyPrint;
|
myPrettyPrint = thePrettyPrint;
|
||||||
// return this;
|
// return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unregisterInterceptor(IClientInterceptor theInterceptor) {
|
public void unregisterInterceptor(IClientInterceptor theInterceptor) {
|
||||||
|
@ -447,8 +451,4 @@ public abstract class BaseClient implements IRestfulClient {
|
||||||
return reader;
|
return reader;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IClientInterceptor> getInterceptors() {
|
|
||||||
return Collections.unmodifiableList(myInterceptors);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.rest.param;
|
package ca.uhn.fhir.rest.param;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -49,8 +33,7 @@ import ca.uhn.fhir.model.primitive.CodeDt;
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
import ca.uhn.fhir.model.primitive.StringDt;
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
import ca.uhn.fhir.model.primitive.UriDt;
|
||||||
|
|
||||||
public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype {
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -67,64 +50,44 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
setCode(theCode);
|
setCode(theCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
|
@Child(name = "system", type = UriDt.class, order = 0, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Identity of the terminology system", formalDefinition = "The identification of the code system that defines the meaning of the symbol in the code.")
|
||||||
shortDefinition="Identity of the terminology system",
|
|
||||||
formalDefinition="The identification of the code system that defines the meaning of the symbol in the code."
|
|
||||||
)
|
|
||||||
private UriDt mySystem;
|
private UriDt mySystem;
|
||||||
|
|
||||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
@Child(name = "version", type = StringDt.class, order = 1, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Version of the system - if relevant", formalDefinition = "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged")
|
||||||
shortDefinition="Version of the system - if relevant",
|
|
||||||
formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged"
|
|
||||||
)
|
|
||||||
private StringDt myVersion;
|
private StringDt myVersion;
|
||||||
|
|
||||||
@Child(name="code", type=CodeDt.class, order=2, min=0, max=1)
|
@Child(name = "code", type = CodeDt.class, order = 2, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Symbol in syntax defined by the system", formalDefinition = "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)")
|
||||||
shortDefinition="Symbol in syntax defined by the system",
|
|
||||||
formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)"
|
|
||||||
)
|
|
||||||
private CodeDt myCode;
|
private CodeDt myCode;
|
||||||
|
|
||||||
@Child(name="display", type=StringDt.class, order=3, min=0, max=1)
|
@Child(name = "display", type = StringDt.class, order = 3, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Representation defined by the system", formalDefinition = "A representation of the meaning of the code in the system, following the rules of the system.")
|
||||||
shortDefinition="Representation defined by the system",
|
|
||||||
formalDefinition="A representation of the meaning of the code in the system, following the rules of the system."
|
|
||||||
)
|
|
||||||
private StringDt myDisplay;
|
private StringDt myDisplay;
|
||||||
|
|
||||||
@Child(name="primary", type=BooleanDt.class, order=4, min=0, max=1)
|
@Child(name = "primary", type = BooleanDt.class, order = 4, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "If this code was chosen directly by the user", formalDefinition = "Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)")
|
||||||
shortDefinition="If this code was chosen directly by the user",
|
|
||||||
formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)"
|
|
||||||
)
|
|
||||||
private BooleanDt myPrimary;
|
private BooleanDt myPrimary;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary);
|
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mySystem, myVersion, myCode, myDisplay, myPrimary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myDisplay, myPrimary);
|
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, mySystem, myVersion, myCode, myDisplay, myPrimary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>system</b> (Identity of the terminology system).
|
* Gets the value(s) for <b>system</b> (Identity of the terminology system). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public UriDt getSystemElement() {
|
public UriDt getSystemElement() {
|
||||||
if (mySystem == null) {
|
if (mySystem == null) {
|
||||||
mySystem = new UriDt();
|
mySystem = new UriDt();
|
||||||
}
|
}
|
||||||
|
@ -134,41 +97,36 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>system</b> (Identity of the terminology system)
|
* Sets the value(s) for <b>system</b> (Identity of the terminology system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setSystem(UriDt theValue) {
|
public InternalCodingDt setSystem(UriDt theValue) {
|
||||||
mySystem = theValue;
|
mySystem = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>system</b> (Identity of the terminology system)
|
* Sets the value for <b>system</b> (Identity of the terminology system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setSystem( String theUri) {
|
public InternalCodingDt setSystem(String theUri) {
|
||||||
mySystem = new UriDt(theUri);
|
mySystem = new UriDt(theUri);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>version</b> (Version of the system - if relevant).
|
* Gets the value(s) for <b>version</b> (Version of the system - if relevant). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes
|
||||||
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
* is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public StringDt getVersion() {
|
public StringDt getVersion() {
|
||||||
if (myVersion == null) {
|
if (myVersion == null) {
|
||||||
myVersion = new StringDt();
|
myVersion = new StringDt();
|
||||||
}
|
}
|
||||||
|
@ -178,41 +136,37 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>version</b> (Version of the system - if relevant)
|
* Sets the value(s) for <b>version</b> (Version of the system - if relevant)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes
|
||||||
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
* is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setVersion(StringDt theValue) {
|
public InternalCodingDt setVersion(StringDt theValue) {
|
||||||
myVersion = theValue;
|
myVersion = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>version</b> (Version of the system - if relevant)
|
* Sets the value for <b>version</b> (Version of the system - if relevant)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes
|
||||||
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
* is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setVersion( String theString) {
|
public InternalCodingDt setVersion(String theString) {
|
||||||
myVersion = new StringDt(theString);
|
myVersion = new StringDt(theString);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>code</b> (Symbol in syntax defined by the system).
|
* Gets the value(s) for <b>code</b> (Symbol in syntax defined by the system). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
||||||
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public CodeDt getCodeElement() {
|
public CodeDt getCodeElement() {
|
||||||
if (myCode == null) {
|
if (myCode == null) {
|
||||||
myCode = new CodeDt();
|
myCode = new CodeDt();
|
||||||
}
|
}
|
||||||
|
@ -222,41 +176,35 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>code</b> (Symbol in syntax defined by the system)
|
* Sets the value(s) for <b>code</b> (Symbol in syntax defined by the system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
||||||
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setCode(CodeDt theValue) {
|
public InternalCodingDt setCode(CodeDt theValue) {
|
||||||
myCode = theValue;
|
myCode = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>code</b> (Symbol in syntax defined by the system)
|
* Sets the value for <b>code</b> (Symbol in syntax defined by the system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
||||||
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setCode( String theCode) {
|
public InternalCodingDt setCode(String theCode) {
|
||||||
myCode = new CodeDt(theCode);
|
myCode = new CodeDt(theCode);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>display</b> (Representation defined by the system).
|
* Gets the value(s) for <b>display</b> (Representation defined by the system). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public StringDt getDisplay() {
|
public StringDt getDisplay() {
|
||||||
if (myDisplay == null) {
|
if (myDisplay == null) {
|
||||||
myDisplay = new StringDt();
|
myDisplay = new StringDt();
|
||||||
}
|
}
|
||||||
|
@ -266,41 +214,35 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>display</b> (Representation defined by the system)
|
* Sets the value(s) for <b>display</b> (Representation defined by the system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setDisplay(StringDt theValue) {
|
public InternalCodingDt setDisplay(StringDt theValue) {
|
||||||
myDisplay = theValue;
|
myDisplay = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>display</b> (Representation defined by the system)
|
* Sets the value for <b>display</b> (Representation defined by the system)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setDisplay( String theString) {
|
public InternalCodingDt setDisplay(String theString) {
|
||||||
myDisplay = new StringDt(theString);
|
myDisplay = new StringDt(theString);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>primary</b> (If this code was chosen directly by the user).
|
* Gets the value(s) for <b>primary</b> (If this code was chosen directly by the user). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public BooleanDt getPrimary() {
|
public BooleanDt getPrimary() {
|
||||||
if (myPrimary == null) {
|
if (myPrimary == null) {
|
||||||
myPrimary = new BooleanDt();
|
myPrimary = new BooleanDt();
|
||||||
}
|
}
|
||||||
|
@ -310,56 +252,38 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>primary</b> (If this code was chosen directly by the user)
|
* Sets the value(s) for <b>primary</b> (If this code was chosen directly by the user)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setPrimary(BooleanDt theValue) {
|
public InternalCodingDt setPrimary(BooleanDt theValue) {
|
||||||
myPrimary = theValue;
|
myPrimary = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>primary</b> (If this code was chosen directly by the user)
|
* Sets the value for <b>primary</b> (If this code was chosen directly by the user)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
||||||
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalCodingDt setPrimary( boolean theBoolean) {
|
public InternalCodingDt setPrimary(boolean theBoolean) {
|
||||||
myPrimary = new BooleanDt(theBoolean);
|
myPrimary = new BooleanDt(theBoolean);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>valueSet</b> (Set this coding was chosen from).
|
* Gets the value(s) for <b>valueSet</b> (Set this coding was chosen from). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The set of possible coded values this coding was chosen from or constrained by
|
||||||
* The set of possible coded values this coding was chosen from or constrained by
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public BaseResourceReferenceDt getValueSet() {
|
public BaseResourceReferenceDt getValueSet() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value(s) for <b>valueSet</b> (Set this coding was chosen from)
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* <b>Definition:</b>
|
|
||||||
* The set of possible coded values this coding was chosen from or constrained by
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
public InternalCodingDt setValueSet(BaseResourceReferenceDt theValue) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringDt getDisplayElement() {
|
public StringDt getDisplayElement() {
|
||||||
return getDisplay();
|
return getDisplay();
|
||||||
|
@ -375,7 +299,4 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package ca.uhn.fhir.rest.param;
|
package ca.uhn.fhir.rest.param;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -51,9 +35,10 @@ import ca.uhn.fhir.model.primitive.DecimalDt;
|
||||||
import ca.uhn.fhir.model.primitive.StringDt;
|
import ca.uhn.fhir.model.primitive.StringDt;
|
||||||
import ca.uhn.fhir.model.primitive.UriDt;
|
import ca.uhn.fhir.model.primitive.UriDt;
|
||||||
|
|
||||||
class InternalQuantityDt
|
/**
|
||||||
extends BaseQuantityDt implements ICompositeDatatype
|
* Base class for QuantityDt of any version
|
||||||
{
|
*/
|
||||||
|
class InternalQuantityDt extends BaseQuantityDt implements ICompositeDatatype {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
@ -66,7 +51,7 @@ class InternalQuantityDt
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@SimpleSetter
|
@SimpleSetter
|
||||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
|
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theValue") double theValue) {
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,10 +59,10 @@ class InternalQuantityDt
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@SimpleSetter
|
@SimpleSetter
|
||||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
|
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theValue") long theValue) {
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -104,7 +89,8 @@ class InternalQuantityDt
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@SimpleSetter
|
@SimpleSetter
|
||||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
|
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue,
|
||||||
|
@SimpleSetter.Parameter(name = "theSystem") String theSystem, @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
setComparator(theComparator);
|
setComparator(theComparator);
|
||||||
setSystem(theSystem);
|
setSystem(theSystem);
|
||||||
|
@ -115,71 +101,52 @@ class InternalQuantityDt
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
@SimpleSetter
|
@SimpleSetter
|
||||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
|
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue,
|
||||||
|
@SimpleSetter.Parameter(name = "theSystem") String theSystem, @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
|
||||||
setValue(theValue);
|
setValue(theValue);
|
||||||
setComparator(theComparator);
|
setComparator(theComparator);
|
||||||
setSystem(theSystem);
|
setSystem(theSystem);
|
||||||
setUnits(theUnits);
|
setUnits(theUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Child(name = "value", type = DecimalDt.class, order = 0, min = 0, max = 1)
|
||||||
@Child(name="value", type=DecimalDt.class, order=0, min=0, max=1)
|
@Description(shortDefinition = "Numerical value (with implicit precision)", formalDefinition = "The value of the measured amount. The value includes an implicit precision in the presentation of the value")
|
||||||
@Description(
|
|
||||||
shortDefinition="Numerical value (with implicit precision)",
|
|
||||||
formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value"
|
|
||||||
)
|
|
||||||
private DecimalDt myValue;
|
private DecimalDt myValue;
|
||||||
|
|
||||||
@Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1)
|
@Child(name = "comparator", type = CodeDt.class, order = 1, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "< | <= | >= | > - how to understand the value", formalDefinition = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value")
|
||||||
shortDefinition="< | <= | >= | > - how to understand the value",
|
|
||||||
formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value"
|
|
||||||
)
|
|
||||||
private BoundCodeDt<QuantityCompararatorEnum> myComparator;
|
private BoundCodeDt<QuantityCompararatorEnum> myComparator;
|
||||||
|
|
||||||
@Child(name="units", type=StringDt.class, order=2, min=0, max=1)
|
@Child(name = "units", type = StringDt.class, order = 2, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Unit representation", formalDefinition = "A human-readable form of the units")
|
||||||
shortDefinition="Unit representation",
|
|
||||||
formalDefinition="A human-readable form of the units"
|
|
||||||
)
|
|
||||||
private StringDt myUnits;
|
private StringDt myUnits;
|
||||||
|
|
||||||
@Child(name="system", type=UriDt.class, order=3, min=0, max=1)
|
@Child(name = "system", type = UriDt.class, order = 3, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "System that defines coded unit form", formalDefinition = "The identification of the system that provides the coded form of the unit")
|
||||||
shortDefinition="System that defines coded unit form",
|
|
||||||
formalDefinition="The identification of the system that provides the coded form of the unit"
|
|
||||||
)
|
|
||||||
private UriDt mySystem;
|
private UriDt mySystem;
|
||||||
|
|
||||||
@Child(name="code", type=CodeDt.class, order=4, min=0, max=1)
|
@Child(name = "code", type = CodeDt.class, order = 4, min = 0, max = 1)
|
||||||
@Description(
|
@Description(shortDefinition = "Coded form of the unit", formalDefinition = "A computer processable form of the units in some unit representation system")
|
||||||
shortDefinition="Coded form of the unit",
|
|
||||||
formalDefinition="A computer processable form of the units in some unit representation system"
|
|
||||||
)
|
|
||||||
private CodeDt myCode;
|
private CodeDt myCode;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode);
|
return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(myValue, myComparator, myUnits, mySystem, myCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||||
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
|
return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>value</b> (Numerical value (with implicit precision)).
|
* Gets the value(s) for <b>value</b> (Numerical value (with implicit precision)). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public DecimalDt getValueElement() {
|
public DecimalDt getValueElement() {
|
||||||
if (myValue == null) {
|
if (myValue == null) {
|
||||||
myValue = new DecimalDt();
|
myValue = new DecimalDt();
|
||||||
}
|
}
|
||||||
|
@ -189,67 +156,60 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>value</b> (Numerical value (with implicit precision))
|
* Sets the value(s) for <b>value</b> (Numerical value (with implicit precision))
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setValue(DecimalDt theValue) {
|
public InternalQuantityDt setValue(DecimalDt theValue) {
|
||||||
myValue = theValue;
|
myValue = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setValue( long theValue) {
|
public InternalQuantityDt setValue(long theValue) {
|
||||||
myValue = new DecimalDt(theValue);
|
myValue = new DecimalDt(theValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setValue( double theValue) {
|
public InternalQuantityDt setValue(double theValue) {
|
||||||
myValue = new DecimalDt(theValue);
|
myValue = new DecimalDt(theValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setValue( java.math.BigDecimal theValue) {
|
public InternalQuantityDt setValue(java.math.BigDecimal theValue) {
|
||||||
myValue = new DecimalDt(theValue);
|
myValue = new DecimalDt(theValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value).
|
* Gets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
|
||||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
* \"<\" , then the real value is < stated value
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public BoundCodeDt<QuantityCompararatorEnum> getComparatorElement() {
|
public BoundCodeDt<QuantityCompararatorEnum> getComparatorElement() {
|
||||||
if (myComparator == null) {
|
if (myComparator == null) {
|
||||||
myComparator = new BoundCodeDt<QuantityCompararatorEnum>(QuantityCompararatorEnum.VALUESET_BINDER);
|
myComparator = new BoundCodeDt<QuantityCompararatorEnum>(QuantityCompararatorEnum.VALUESET_BINDER);
|
||||||
}
|
}
|
||||||
|
@ -259,10 +219,10 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
|
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
|
||||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
* \"<\" , then the real value is < stated value
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setComparator(BoundCodeDt<QuantityCompararatorEnum> theValue) {
|
public InternalQuantityDt setComparator(BoundCodeDt<QuantityCompararatorEnum> theValue) {
|
||||||
myComparator = theValue;
|
myComparator = theValue;
|
||||||
|
@ -272,28 +232,24 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
|
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
|
||||||
* How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
|
* \"<\" , then the real value is < stated value
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setComparator(QuantityCompararatorEnum theValue) {
|
public InternalQuantityDt setComparator(QuantityCompararatorEnum theValue) {
|
||||||
getComparatorElement().setValueAsEnum(theValue);
|
getComparatorElement().setValueAsEnum(theValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>units</b> (Unit representation).
|
* Gets the value(s) for <b>units</b> (Unit representation). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A human-readable form of the units
|
||||||
* A human-readable form of the units
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public StringDt getUnitsElement() {
|
public StringDt getUnitsElement() {
|
||||||
if (myUnits == null) {
|
if (myUnits == null) {
|
||||||
myUnits = new StringDt();
|
myUnits = new StringDt();
|
||||||
}
|
}
|
||||||
|
@ -303,41 +259,35 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>units</b> (Unit representation)
|
* Sets the value(s) for <b>units</b> (Unit representation)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A human-readable form of the units
|
||||||
* A human-readable form of the units
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setUnits(StringDt theValue) {
|
public InternalQuantityDt setUnits(StringDt theValue) {
|
||||||
myUnits = theValue;
|
myUnits = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>units</b> (Unit representation)
|
* Sets the value for <b>units</b> (Unit representation)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A human-readable form of the units
|
||||||
* A human-readable form of the units
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setUnits( String theString) {
|
public InternalQuantityDt setUnits(String theString) {
|
||||||
myUnits = new StringDt(theString);
|
myUnits = new StringDt(theString);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>system</b> (System that defines coded unit form).
|
* Gets the value(s) for <b>system</b> (System that defines coded unit form). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||||
* The identification of the system that provides the coded form of the unit
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public UriDt getSystemElement() {
|
public UriDt getSystemElement() {
|
||||||
if (mySystem == null) {
|
if (mySystem == null) {
|
||||||
mySystem = new UriDt();
|
mySystem = new UriDt();
|
||||||
}
|
}
|
||||||
|
@ -347,41 +297,35 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>system</b> (System that defines coded unit form)
|
* Sets the value(s) for <b>system</b> (System that defines coded unit form)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||||
* The identification of the system that provides the coded form of the unit
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setSystem(UriDt theValue) {
|
public InternalQuantityDt setSystem(UriDt theValue) {
|
||||||
mySystem = theValue;
|
mySystem = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>system</b> (System that defines coded unit form)
|
* Sets the value for <b>system</b> (System that defines coded unit form)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||||
* The identification of the system that provides the coded form of the unit
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setSystem( String theUri) {
|
public InternalQuantityDt setSystem(String theUri) {
|
||||||
mySystem = new UriDt(theUri);
|
mySystem = new UriDt(theUri);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the value(s) for <b>code</b> (Coded form of the unit).
|
* Gets the value(s) for <b>code</b> (Coded form of the unit). creating it if it does not exist. Will not return <code>null</code>.
|
||||||
* creating it if it does
|
|
||||||
* not exist. Will not return <code>null</code>.
|
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||||
* A computer processable form of the units in some unit representation system
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public CodeDt getCodeElement() {
|
public CodeDt getCodeElement() {
|
||||||
if (myCode == null) {
|
if (myCode == null) {
|
||||||
myCode = new CodeDt();
|
myCode = new CodeDt();
|
||||||
}
|
}
|
||||||
|
@ -391,27 +335,25 @@ class InternalQuantityDt
|
||||||
/**
|
/**
|
||||||
* Sets the value(s) for <b>code</b> (Coded form of the unit)
|
* Sets the value(s) for <b>code</b> (Coded form of the unit)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||||
* A computer processable form of the units in some unit representation system
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setCode(CodeDt theValue) {
|
public InternalQuantityDt setCode(CodeDt theValue) {
|
||||||
myCode = theValue;
|
myCode = theValue;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value for <b>code</b> (Coded form of the unit)
|
* Sets the value for <b>code</b> (Coded form of the unit)
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Definition:</b>
|
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||||
* A computer processable form of the units in some unit representation system
|
* </p>
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public InternalQuantityDt setCode( String theCode) {
|
public InternalQuantityDt setCode(String theCode) {
|
||||||
myCode = new CodeDt(theCode);
|
myCode = new CodeDt(theCode);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -424,7 +366,4 @@ class InternalQuantityDt
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,31 +31,30 @@ import ca.uhn.fhir.util.ResourceReferenceInfo;
|
||||||
* Controls how bundles decide whether referenced resources should be included
|
* Controls how bundles decide whether referenced resources should be included
|
||||||
*/
|
*/
|
||||||
public enum BundleInclusionRule {
|
public enum BundleInclusionRule {
|
||||||
/**
|
|
||||||
* Decision is based on whether the resource's Include is in the IncludeSet (e.g. DiagnosticReport.result). Note that
|
/**
|
||||||
* the resource has to be populated to be included.
|
* Decision is based on whether the resource's Include is in the IncludeSet (e.g. DiagnosticReport.result). Note that the resource has to be populated to be included.
|
||||||
*
|
*
|
||||||
* This is the default behavior
|
* This is the default behavior
|
||||||
*/
|
*/
|
||||||
BASED_ON_INCLUDES {
|
BASED_ON_INCLUDES {
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
||||||
return theReferenceInfo.matchesIncludeSet(theIncludes);
|
return theReferenceInfo.matchesIncludeSet(theIncludes);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decision is based on whether the resource reference is set to a populated resource (in which case its included) or just
|
* Decision is based on whether the resource reference is set to a populated resource (in which case its included) or just an id (in which case it's not included)
|
||||||
* an id (in which case it's not included)
|
*
|
||||||
*
|
* This is the original HAPI behavior
|
||||||
* This is the original HAPI behavior
|
*/
|
||||||
*/
|
BASED_ON_RESOURCE_PRESENCE {
|
||||||
BASED_ON_RESOURCE_PRESENCE {
|
@Override
|
||||||
@Override
|
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
||||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
|
|
||||||
public abstract boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes);
|
public abstract boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,207 +3,180 @@
|
||||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||||
|
|
||||||
<!--
|
<module name="Checker">
|
||||||
|
<property name="charset" value="UTF-8"/>
|
||||||
|
|
||||||
Checkstyle configuration that checks the Google coding conventions from:
|
<property name="severity" value="warning"/>
|
||||||
|
|
||||||
- Google Java Style
|
|
||||||
https://google-styleguide.googlecode.com/svn-history/r130/trunk/javaguide.html
|
|
||||||
|
|
||||||
Checkstyle is very configurable. Be sure to read the documentation at
|
|
||||||
http://checkstyle.sf.net (or in your downloaded distribution).
|
|
||||||
|
|
||||||
Most Checks are configurable, be sure to consult the documentation.
|
<!--<property name="fileExtensions" value="java, properties, xml"/> -->
|
||||||
|
|
||||||
To completely disable a check, just comment it out or delete it from the file.
|
<module name="TreeWalker">
|
||||||
|
<property name="tabWidth" value="3"/>
|
||||||
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
|
<module name="OuterTypeFilename"/>
|
||||||
|
<module name="IllegalTokenText">
|
||||||
-->
|
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||||
|
<property name="format"
|
||||||
<module name = "Checker">
|
value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||||
<property name="charset" value="UTF-8"/>
|
<property name="message"
|
||||||
|
value="Avoid using corresponding octal or Unicode escape."/>
|
||||||
<property name="severity" value="warning"/>
|
</module>
|
||||||
|
<module name="AvoidEscapedUnicodeCharacters">
|
||||||
<!--<property name="fileExtensions" value="java, properties, xml"/>-->
|
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||||
|
<property name="allowByTailComment" value="true"/>
|
||||||
<module name="TreeWalker">
|
<property name="allowNonPrintableEscapes" value="true"/>
|
||||||
<property name="tabWidth" value="3"/>
|
</module>
|
||||||
<module name="OuterTypeFilename"/>
|
<module name="LineLength">
|
||||||
<module name="IllegalTokenText">
|
<property name="max" value="300"/>
|
||||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
<property name="ignorePattern"
|
||||||
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||||
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
|
</module>
|
||||||
</module>
|
<!--<module name="AvoidStarImport"/> -->
|
||||||
<module name="AvoidEscapedUnicodeCharacters">
|
<module name="OneTopLevelClass"/>
|
||||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
<module name="NoLineWrap"/>
|
||||||
<property name="allowByTailComment" value="true"/>
|
<module name="EmptyBlock">
|
||||||
<property name="allowNonPrintableEscapes" value="true"/>
|
<property name="option" value="TEXT"/>
|
||||||
</module>
|
<property name="tokens"
|
||||||
<module name="LineLength">
|
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||||
<property name="max" value="300"/>
|
</module>
|
||||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
<module name="NeedBraces"/>
|
||||||
</module>
|
<module name="LeftCurly">
|
||||||
<!--<module name="AvoidStarImport"/>-->
|
<property name="maxLineLength" value="300"/>
|
||||||
<module name="OneTopLevelClass"/>
|
</module>
|
||||||
<module name="NoLineWrap"/>
|
<module name="RightCurly"/>
|
||||||
<module name="EmptyBlock">
|
<module name="RightCurly">
|
||||||
<property name="option" value="TEXT"/>
|
<property name="option" value="alone"/>
|
||||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
<property name="tokens"
|
||||||
</module>
|
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||||
<module name="NeedBraces"/>
|
</module>
|
||||||
<module name="LeftCurly">
|
<!-- <module name="WhitespaceAround"> <property name="allowEmptyConstructors"
|
||||||
<property name="maxLineLength" value="300"/>
|
value="true"/> <property name="allowEmptyMethods" value="true"/> <property
|
||||||
</module>
|
name="allowEmptyTypes" value="true"/> <property name="allowEmptyLoops" value="true"/>
|
||||||
<module name="RightCurly"/>
|
<message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed
|
||||||
<module name="RightCurly">
|
by whitespace. Empty blocks may only be represented as '{}' when not part
|
||||||
<property name="option" value="alone"/>
|
of a multi-block statement (4.1.3)"/> <message key="ws.notPreceded" value="WhitespaceAround:
|
||||||
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
''{0}'' is not preceded with whitespace."/> </module> -->
|
||||||
</module>
|
<module name="OneStatementPerLine"/>
|
||||||
<!--
|
<module name="MultipleVariableDeclarations"/>
|
||||||
<module name="WhitespaceAround">
|
<module name="ArrayTypeStyle"/>
|
||||||
<property name="allowEmptyConstructors" value="true"/>
|
<!-- <module name="MissingSwitchDefault"/> -->
|
||||||
<property name="allowEmptyMethods" value="true"/>
|
<module name="FallThrough"/>
|
||||||
<property name="allowEmptyTypes" value="true"/>
|
<module name="UpperEll"/>
|
||||||
<property name="allowEmptyLoops" value="true"/>
|
<module name="ModifierOrder"/>
|
||||||
<message key="ws.notFollowed"
|
<module name="EmptyLineSeparator">
|
||||||
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||||
<message key="ws.notPreceded"
|
</module>
|
||||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
<module name="SeparatorWrap">
|
||||||
</module>
|
<property name="tokens" value="DOT"/>
|
||||||
-->
|
<property name="option" value="nl"/>
|
||||||
<module name="OneStatementPerLine"/>
|
</module>
|
||||||
<module name="MultipleVariableDeclarations"/>
|
<module name="SeparatorWrap">
|
||||||
<module name="ArrayTypeStyle"/>
|
<property name="tokens" value="COMMA"/>
|
||||||
<!--
|
<property name="option" value="EOL"/>
|
||||||
<module name="MissingSwitchDefault"/>
|
</module>
|
||||||
-->
|
<module name="PackageName">
|
||||||
<module name="FallThrough"/>
|
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||||
<module name="UpperEll"/>
|
<message key="name.invalidPattern"
|
||||||
<module name="ModifierOrder"/>
|
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||||
<module name="EmptyLineSeparator">
|
</module>
|
||||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
<module name="TypeName">
|
||||||
</module>
|
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||||
<module name="SeparatorWrap">
|
</module>
|
||||||
<property name="tokens" value="DOT"/>
|
<module name="MemberName">
|
||||||
<property name="option" value="nl"/>
|
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||||
</module>
|
<message key="name.invalidPattern"
|
||||||
<module name="SeparatorWrap">
|
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||||
<property name="tokens" value="COMMA"/>
|
</module>
|
||||||
<property name="option" value="EOL"/>
|
<module name="ParameterName">
|
||||||
</module>
|
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||||
<module name="PackageName">
|
<message key="name.invalidPattern"
|
||||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||||
<message key="name.invalidPattern"
|
</module>
|
||||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
<module name="LocalVariableName">
|
||||||
</module>
|
<property name="tokens" value="VARIABLE_DEF"/>
|
||||||
<module name="TypeName">
|
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||||
<message key="name.invalidPattern"
|
<message key="name.invalidPattern"
|
||||||
value="Type name ''{0}'' must match pattern ''{1}''."/>
|
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="MemberName">
|
<module name="ClassTypeParameterName">
|
||||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||||
<message key="name.invalidPattern"
|
<message key="name.invalidPattern"
|
||||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="ParameterName">
|
<module name="MethodTypeParameterName">
|
||||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||||
<message key="name.invalidPattern"
|
<message key="name.invalidPattern"
|
||||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="LocalVariableName">
|
<module name="NoFinalizer"/>
|
||||||
<property name="tokens" value="VARIABLE_DEF"/>
|
<module name="GenericWhitespace">
|
||||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
<message key="ws.followed"
|
||||||
<message key="name.invalidPattern"
|
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
<message key="ws.preceded"
|
||||||
</module>
|
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||||
<module name="ClassTypeParameterName">
|
<message key="ws.illegalFollow"
|
||||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||||
<message key="name.invalidPattern"
|
<message key="ws.notPreceded"
|
||||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="MethodTypeParameterName">
|
<module name="UncommentedMain"/>
|
||||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
<module name="Indentation">
|
||||||
<message key="name.invalidPattern"
|
<property name="basicOffset" value="3"/>
|
||||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
<property name="braceAdjustment" value="0"/>
|
||||||
</module>
|
<property name="caseIndent" value="0"/>
|
||||||
<module name="NoFinalizer"/>
|
<property name="throwsIndent" value="6"/>
|
||||||
<module name="GenericWhitespace">
|
<property name="lineWrappingIndentation" value="6"/>
|
||||||
<message key="ws.followed"
|
<property name="arrayInitIndent" value="3"/>
|
||||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
</module>
|
||||||
<message key="ws.preceded"
|
<module name="AbbreviationAsWordInName">
|
||||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
<property name="ignoreFinal" value="false"/>
|
||||||
<message key="ws.illegalFollow"
|
<property name="allowedAbbreviationLength" value="1"/>
|
||||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
</module>
|
||||||
<message key="ws.notPreceded"
|
<module name="OverloadMethodsDeclarationOrder"/>
|
||||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
<module name="VariableDeclarationUsageDistance"/>
|
||||||
</module>
|
<!-- <module name="CustomImportOrder"> <property name="specialImportsRegExp"
|
||||||
<module name="UncommentedMain"/>
|
value="com.google"/> <property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||||
<module name="Indentation">
|
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
||||||
<property name="basicOffset" value="3"/>
|
</module> -->
|
||||||
<property name="braceAdjustment" value="0"/>
|
<module name="MethodParamPad"/>
|
||||||
<property name="caseIndent" value="0"/>
|
<module name="OperatorWrap">
|
||||||
<property name="throwsIndent" value="6"/>
|
<property name="option" value="NL"/>
|
||||||
<property name="lineWrappingIndentation" value="6"/>
|
<property name="tokens"
|
||||||
<property name="arrayInitIndent" value="3"/>
|
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
||||||
</module>
|
</module>
|
||||||
<module name="AbbreviationAsWordInName">
|
<module name="AnnotationLocation">
|
||||||
<property name="ignoreFinal" value="false"/>
|
<property name="tokens"
|
||||||
<property name="allowedAbbreviationLength" value="1"/>
|
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||||
</module>
|
</module>
|
||||||
<module name="OverloadMethodsDeclarationOrder"/>
|
<module name="AnnotationLocation">
|
||||||
<module name="VariableDeclarationUsageDistance"/>
|
<property name="tokens" value="VARIABLE_DEF"/>
|
||||||
<!--
|
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||||
<module name="CustomImportOrder">
|
</module>
|
||||||
<property name="specialImportsRegExp" value="com.google"/>
|
<module name="NonEmptyAtclauseDescription"/>
|
||||||
<property name="sortImportsInGroupAlphabetically" value="true"/>
|
<module name="JavadocTagContinuationIndentation"/>
|
||||||
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
<module name="SummaryJavadocCheck">
|
||||||
</module>
|
<property name="forbiddenSummaryFragments"
|
||||||
-->
|
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||||
<module name="MethodParamPad"/>
|
</module>
|
||||||
<module name="OperatorWrap">
|
<module name="AtclauseOrder">
|
||||||
<property name="option" value="NL"/>
|
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||||
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR "/>
|
<property name="target"
|
||||||
</module>
|
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||||
<module name="AnnotationLocation">
|
</module>
|
||||||
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
<!-- <module name="JavadocMethod"> <module name="JavadocParagraph"/> <property
|
||||||
</module>
|
name="scope" value="public"/> <property name="allowMissingParamTags" value="true"/>
|
||||||
<module name="AnnotationLocation">
|
<property name="allowMissingThrowsTags" value="true"/> <property name="allowMissingReturnTag"
|
||||||
<property name="tokens" value="VARIABLE_DEF"/>
|
value="true"/> <property name="minLineCount" value="2"/> <property name="allowedAnnotations"
|
||||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
value="Override, Test"/> <property name="allowThrowsTagsForSubclasses" value="true"/>
|
||||||
</module>
|
</module> -->
|
||||||
<module name="NonEmptyAtclauseDescription"/>
|
<module name="MethodName">
|
||||||
<module name="JavadocTagContinuationIndentation"/>
|
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||||
<module name="SummaryJavadocCheck">
|
<message key="name.invalidPattern"
|
||||||
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||||
</module>
|
</module>
|
||||||
<module name="AtclauseOrder">
|
<module name="SingleLineJavadoc"/>
|
||||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
<!--<property name="ignoreInlineTags" value="false"/> -->
|
||||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
<!--<module name="EmptyCatchBlock"> <property name="exceptionVariableName"
|
||||||
</module>
|
value="expected"/> </module> -->
|
||||||
<!--
|
</module>
|
||||||
<module name="JavadocMethod">
|
|
||||||
<module name="JavadocParagraph"/>
|
|
||||||
<property name="scope" value="public"/>
|
|
||||||
<property name="allowMissingParamTags" value="true"/>
|
|
||||||
<property name="allowMissingThrowsTags" value="true"/>
|
|
||||||
<property name="allowMissingReturnTag" value="true"/>
|
|
||||||
<property name="minLineCount" value="2"/>
|
|
||||||
<property name="allowedAnnotations" value="Override, Test"/>
|
|
||||||
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
|
||||||
</module>
|
|
||||||
-->
|
|
||||||
<module name="MethodName">
|
|
||||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
|
||||||
<message key="name.invalidPattern"
|
|
||||||
value="Method name ''{0}'' must match pattern ''{1}''."/>
|
|
||||||
</module>
|
|
||||||
<module name="SingleLineJavadoc"/>
|
|
||||||
<!--<property name="ignoreInlineTags" value="false"/>-->
|
|
||||||
<!--<module name="EmptyCatchBlock">
|
|
||||||
<property name="exceptionVariableName" value="expected"/>
|
|
||||||
</module>-->
|
|
||||||
</module>
|
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue