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;
|
||||
|
||||
/**
|
||||
* Do not use this constructor, the recommended way to obtain a new instance of the JSON parser is to invoke
|
||||
* {@link FhirContext#newJsonParser()}.
|
||||
* @param theParserErrorHandler
|
||||
* Do not use this constructor, the recommended way to obtain a new instance of the JSON parser is to invoke {@link FhirContext#newJsonParser()}.
|
||||
*
|
||||
* @param theParserErrorHandler
|
||||
*/
|
||||
public JsonParser(FhirContext theContext, IParserErrorHandler theParserErrorHandler) {
|
||||
super(theContext, theParserErrorHandler);
|
||||
|
@ -433,10 +433,8 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
case CONTAINED_RESOURCE_LIST:
|
||||
case CONTAINED_RESOURCES: {
|
||||
/*
|
||||
* Disabled per #103 ContainedDt value = (ContainedDt) theNextValue; for (IResource next :
|
||||
* value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) { continue; }
|
||||
* encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true,
|
||||
* fixContainedResourceId(next.getId().getValue())); }
|
||||
* Disabled per #103 ContainedDt value = (ContainedDt) theNextValue; for (IResource next : value.getContainedResources()) { if (getContainedResources().getResourceId(next) != null) {
|
||||
* continue; } encodeResourceToJsonStreamWriter(theResDef, next, theWriter, null, true, fixContainedResourceId(next.getId().getValue())); }
|
||||
*/
|
||||
List<IBaseResource> containedResources = getContainedResources().getContainedResources();
|
||||
if (containedResources.size() > 0) {
|
||||
|
@ -513,7 +511,7 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
List<? extends IBase> values = nextChild.getAccessor().getValues(theNextValue);
|
||||
if (values == null || values.isEmpty()) {
|
||||
continue;
|
||||
|
@ -545,7 +543,7 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -670,7 +668,7 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
}
|
||||
} else if (theResource instanceof IAnyResource) {
|
||||
IAnyResource res = (IAnyResource) theResource;
|
||||
if (/*theContainedResource && */ StringUtils.isNotBlank(res.getIdElement().getIdPart())) {
|
||||
if (/* theContainedResource && */StringUtils.isNotBlank(res.getIdElement().getIdPart())) {
|
||||
resourceId = res.getIdElement().getIdPart();
|
||||
}
|
||||
}
|
||||
|
@ -678,11 +676,12 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
if (isOmitResourceId() && !theContainedResource) {
|
||||
resourceId = null;
|
||||
}
|
||||
|
||||
|
||||
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) {
|
||||
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
|
||||
* called _name): resource extensions, and extension extensions
|
||||
* 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
|
||||
*/
|
||||
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> modifierExtensions = new ArrayList<HeldExtension>(0);
|
||||
|
||||
|
@ -944,7 +943,8 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
object = reader.readObject();
|
||||
} catch (JsonParsingException e) {
|
||||
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);
|
||||
}
|
||||
|
@ -1205,21 +1205,21 @@ public class JsonParser extends BaseParser implements IParser {
|
|||
try {
|
||||
JsonReader reader = Json.createReader(theReader);
|
||||
JsonObject object = reader.readObject();
|
||||
|
||||
|
||||
JsonValue resourceTypeObj = object.get("resourceType");
|
||||
assertObjectOfType(resourceTypeObj, JsonValue.ValueType.STRING, "resourceType");
|
||||
String resourceType = ((JsonString) resourceTypeObj).getString();
|
||||
|
||||
|
||||
ParserState<? extends IBaseResource> state = ParserState.getPreResourceInstance(theResourceType, myContext, true, getErrorHandler());
|
||||
state.enteringNewElement(null, resourceType);
|
||||
|
||||
|
||||
parseChildren(object, state);
|
||||
|
||||
|
||||
state.endingElement();
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
T retVal = (T) state.getObject();
|
||||
|
||||
|
||||
return retVal;
|
||||
} catch (JsonParsingException 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) {
|
||||
theEventWriter.writeStartArray("extension");
|
||||
for (HeldExtension next : extensions) {
|
||||
|
|
|
@ -212,7 +212,7 @@ class ParserState<T> {
|
|||
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 {
|
||||
ParserState<Bundle> retVal = new ParserState<Bundle>(theContext, theJsonMode, theErrorHandler);
|
||||
if (theContext.getVersion().getVersion() == FhirVersionEnum.DSTU1) {
|
||||
|
@ -227,7 +227,7 @@ class ParserState<T> {
|
|||
* @param theResourceType
|
||||
* 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 {
|
||||
ParserState<T> retVal = new ParserState<T>(theContext, theJsonMode, theErrorHandler);
|
||||
if (theResourceType == null) {
|
||||
|
@ -246,13 +246,13 @@ class ParserState<T> {
|
|||
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);
|
||||
retVal.push(retVal.new PreTagListState());
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public class AtomAuthorState extends BaseState {
|
||||
private class AtomAuthorState extends BaseState {
|
||||
|
||||
private BaseBundle myInstance;
|
||||
|
||||
|
@ -355,7 +355,7 @@ class ParserState<T> {
|
|||
|
||||
}
|
||||
|
||||
public class AtomDeletedEntryByState extends BaseState {
|
||||
private class AtomDeletedEntryByState extends BaseState {
|
||||
|
||||
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) {
|
||||
super(theInstance, theResourceType);
|
||||
|
@ -450,7 +450,7 @@ class ParserState<T> {
|
|||
|
||||
}
|
||||
|
||||
public class AtomEntryState extends BaseState {
|
||||
private class AtomEntryState extends BaseState {
|
||||
|
||||
private boolean myDeleted;
|
||||
private BundleEntry myEntry;
|
||||
|
@ -995,7 +995,7 @@ class ParserState<T> {
|
|||
|
||||
}
|
||||
|
||||
public class BundleEntrySearchState extends BaseState {
|
||||
private class BundleEntrySearchState extends BaseState {
|
||||
|
||||
private BundleEntry myEntry;
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ class ParserState<T> {
|
|||
|
||||
}
|
||||
|
||||
public class BundleEntryState extends BaseState {
|
||||
private class BundleEntryState extends BaseState {
|
||||
|
||||
private BundleEntry myEntry;
|
||||
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;
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public @interface OperationParam {
|
|||
/**
|
||||
* Value for {@link OperationParam#max()} indicating no maximum
|
||||
*/
|
||||
int MAX_UNLIMITED = -1;
|
||||
final int MAX_UNLIMITED = -1;
|
||||
|
||||
/**
|
||||
* The name of the parameter
|
||||
|
|
|
@ -71,7 +71,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
private String myLastResponseBody;
|
||||
private Boolean myPrettyPrint = false;
|
||||
private final String myUrlBase;
|
||||
|
||||
|
||||
BaseClient(HttpClient theClient, String theUrlBase, RestfulClientFactory theFactory) {
|
||||
super();
|
||||
myClient = theClient;
|
||||
|
@ -95,6 +95,10 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
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
|
||||
* FHIR specification)
|
||||
|
@ -111,6 +115,10 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
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!
|
||||
*/
|
||||
|
@ -144,7 +152,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
public String getUrlBase() {
|
||||
return myUrlBase;
|
||||
}
|
||||
|
||||
|
||||
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation) {
|
||||
return invokeClient(theContext, binding, clientInvocation, false);
|
||||
}
|
||||
|
@ -153,39 +161,35 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
return invokeClient(theContext, binding, clientInvocation, null, null, theLogRequestAndResponse);
|
||||
}
|
||||
|
||||
void forceConformanceCheck() {
|
||||
myFactory.validateServerBase(myUrlBase, myClient, this);
|
||||
}
|
||||
|
||||
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, EncodingEnum theEncoding, Boolean thePrettyPrint, boolean theLogRequestAndResponse) {
|
||||
<T> T invokeClient(FhirContext theContext, IClientResponseHandler<T> binding, BaseHttpClientInvocation clientInvocation, EncodingEnum theEncoding, Boolean thePrettyPrint,
|
||||
boolean theLogRequestAndResponse) {
|
||||
|
||||
if (!myDontValidateConformance) {
|
||||
myFactory.validateServerBaseIfConfiguredToDoSo(myUrlBase, myClient, this);
|
||||
}
|
||||
|
||||
|
||||
// TODO: handle non 2xx status codes by throwing the correct exception,
|
||||
// and ensure it's passed upwards
|
||||
HttpRequestBase httpRequest;
|
||||
HttpResponse response;
|
||||
try {
|
||||
Map<String, List<String>> params = createExtraParams();
|
||||
|
||||
|
||||
if (theEncoding == EncodingEnum.XML) {
|
||||
params.put(Constants.PARAM_FORMAT, Collections.singletonList("xml"));
|
||||
} else if (theEncoding == EncodingEnum.JSON) {
|
||||
params.put(Constants.PARAM_FORMAT, Collections.singletonList("json"));
|
||||
}
|
||||
|
||||
|
||||
if (thePrettyPrint == Boolean.TRUE) {
|
||||
params.put(Constants.PARAM_PRETTY, Collections.singletonList(Constants.PARAM_PRETTY_VALUE_TRUE));
|
||||
}
|
||||
|
||||
|
||||
EncodingEnum encoding = getEncoding();
|
||||
if (theEncoding != null) {
|
||||
encoding=theEncoding;
|
||||
encoding = theEncoding;
|
||||
}
|
||||
|
||||
|
||||
httpRequest = clientInvocation.asHttpRequest(myUrlBase, params, encoding, thePrettyPrint);
|
||||
|
||||
if (theLogRequestAndResponse) {
|
||||
|
@ -223,7 +227,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
ContentType ct = ContentType.get(response.getEntity());
|
||||
mimeType = ct != null ? ct.getMimeType() : null;
|
||||
}
|
||||
|
||||
|
||||
Map<String, List<String>> headers = new HashMap<String, List<String>>();
|
||||
if (response.getAllHeaders() != null) {
|
||||
for (Header next : response.getAllHeaders()) {
|
||||
|
@ -250,7 +254,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
}
|
||||
|
||||
String message = "HTTP " + response.getStatusLine().getStatusCode() + " " + response.getStatusLine().getReasonPhrase();
|
||||
BaseOperationOutcome oo=null;
|
||||
BaseOperationOutcome oo = null;
|
||||
if (Constants.CT_TEXT.equals(mimeType)) {
|
||||
message = message + ": " + body;
|
||||
} else {
|
||||
|
@ -259,8 +263,8 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
IParser p = enc.newParser(theContext);
|
||||
try {
|
||||
// TODO: handle if something other than OO comes back
|
||||
oo = (BaseOperationOutcome) p.parseResource( body);
|
||||
if (oo.getIssueFirstRep().getDetailsElement().isEmpty()==false) {
|
||||
oo = (BaseOperationOutcome) p.parseResource(body);
|
||||
if (oo.getIssueFirstRep().getDetailsElement().isEmpty() == false) {
|
||||
message = message + ": " + oo.getIssueFirstRep().getDetailsElement().getValue();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -273,7 +277,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
|
||||
BaseServerResponseException exception = BaseServerResponseException.newInstance(response.getStatusLine().getStatusCode(), message);
|
||||
exception.setOperationOutcome(oo);
|
||||
|
||||
|
||||
if (body != null) {
|
||||
exception.setResponseBody(body);
|
||||
}
|
||||
|
@ -368,27 +372,27 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
ourLog.trace("FHIR response:\n{}\n{}", response, responseString);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void registerInterceptor(IClientInterceptor theInterceptor) {
|
||||
Validate.notNull(theInterceptor, "Interceptor can not be null");
|
||||
myInterceptors.add(theInterceptor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {@link IRestfulClientFactory#setServerValidationModeEnum(ServerValidationModeEnum)}
|
||||
* 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
|
||||
* {@link IRestfulClientFactory#setServerValidationModeEnum(ServerValidationModeEnum)}
|
||||
*/
|
||||
public void setDontValidateConformance(boolean 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
|
||||
* specification. In this case, the server will choose which encoding to return, and the client can handle either XML or JSON)
|
||||
* 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 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) {
|
||||
myEncoding = theEncoding;
|
||||
// return this;
|
||||
// return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -418,7 +422,7 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
*/
|
||||
public void setPrettyPrint(Boolean thePrettyPrint) {
|
||||
myPrettyPrint = thePrettyPrint;
|
||||
// return this;
|
||||
// return this;
|
||||
}
|
||||
|
||||
public void unregisterInterceptor(IClientInterceptor theInterceptor) {
|
||||
|
@ -447,8 +451,4 @@ public abstract class BaseClient implements IRestfulClient {
|
|||
return reader;
|
||||
}
|
||||
|
||||
public List<IClientInterceptor> getInterceptors() {
|
||||
return Collections.unmodifiableList(myInterceptors);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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.UriDt;
|
||||
|
||||
public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
||||
{
|
||||
public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -67,64 +50,44 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
|||
setCode(theCode);
|
||||
}
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Identity of the terminology system",
|
||||
formalDefinition="The identification of the code system that defines the meaning of the symbol in the code."
|
||||
)
|
||||
@Child(name = "system", type = UriDt.class, order = 0, min = 0, max = 1)
|
||||
@Description(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;
|
||||
|
||||
@Child(name="version", type=StringDt.class, order=1, min=0, max=1)
|
||||
@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"
|
||||
)
|
||||
|
||||
@Child(name = "version", type = StringDt.class, order = 1, min = 0, max = 1)
|
||||
@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")
|
||||
private StringDt myVersion;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=2, min=0, max=1)
|
||||
@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)"
|
||||
)
|
||||
|
||||
@Child(name = "code", type = CodeDt.class, order = 2, min = 0, max = 1)
|
||||
@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)")
|
||||
private CodeDt myCode;
|
||||
|
||||
@Child(name="display", type=StringDt.class, order=3, min=0, max=1)
|
||||
@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."
|
||||
)
|
||||
|
||||
@Child(name = "display", type = StringDt.class, order = 3, min = 0, max = 1)
|
||||
@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.")
|
||||
private StringDt myDisplay;
|
||||
|
||||
@Child(name="primary", type=BooleanDt.class, order=4, min=0, max=1)
|
||||
@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)"
|
||||
)
|
||||
|
||||
@Child(name = "primary", type = BooleanDt.class, order = 4, min = 0, max = 1)
|
||||
@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)")
|
||||
private BooleanDt myPrimary;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
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
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
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).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public UriDt getSystemElement() {
|
||||
public UriDt getSystemElement() {
|
||||
if (mySystem == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setSystem(UriDt theValue) {
|
||||
mySystem = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>system</b> (Identity of the terminology system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the code system that defines the meaning of the symbol in the code.
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setSystem( String theUri) {
|
||||
mySystem = new UriDt(theUri);
|
||||
return this;
|
||||
public InternalCodingDt setSystem(String theUri) {
|
||||
mySystem = new UriDt(theUri);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <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 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>
|
||||
* <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
|
||||
* 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>
|
||||
*/
|
||||
public StringDt getVersion() {
|
||||
public StringDt getVersion() {
|
||||
if (myVersion == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <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 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>
|
||||
* <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
|
||||
* 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>
|
||||
*/
|
||||
public InternalCodingDt setVersion(StringDt theValue) {
|
||||
myVersion = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>version</b> (Version of the system - if relevant)
|
||||
*
|
||||
* <p>
|
||||
* <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 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>
|
||||
* <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
|
||||
* 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>
|
||||
*/
|
||||
public InternalCodingDt setVersion( String theString) {
|
||||
myVersion = new StringDt(theString);
|
||||
return this;
|
||||
public InternalCodingDt setVersion(String theString) {
|
||||
myVersion = new StringDt(theString);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public CodeDt getCodeElement() {
|
||||
public CodeDt getCodeElement() {
|
||||
if (myCode == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setCode(CodeDt theValue) {
|
||||
myCode = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Symbol in syntax defined by the system)
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
return this;
|
||||
public InternalCodingDt setCode(String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getDisplay() {
|
||||
public StringDt getDisplay() {
|
||||
if (myDisplay == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setDisplay(StringDt theValue) {
|
||||
myDisplay = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>display</b> (Representation defined by the system)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A representation of the meaning of the code in the system, following the rules of the system.
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setDisplay( String theString) {
|
||||
myDisplay = new StringDt(theString);
|
||||
return this;
|
||||
public InternalCodingDt setDisplay(String theString) {
|
||||
myDisplay = new StringDt(theString);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public BooleanDt getPrimary() {
|
||||
public BooleanDt getPrimary() {
|
||||
if (myPrimary == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setPrimary(BooleanDt theValue) {
|
||||
myPrimary = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>primary</b> (If this code was chosen directly by the user)
|
||||
*
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
* <p>
|
||||
* <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)
|
||||
* </p>
|
||||
*/
|
||||
public InternalCodingDt setPrimary( boolean theBoolean) {
|
||||
myPrimary = new BooleanDt(theBoolean);
|
||||
return this;
|
||||
public InternalCodingDt setPrimary(boolean theBoolean) {
|
||||
myPrimary = new BooleanDt(theBoolean);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The set of possible coded values this coding was chosen from or constrained by
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The set of possible coded values this coding was chosen from or constrained by
|
||||
* </p>
|
||||
*/
|
||||
public BaseResourceReferenceDt getValueSet() {
|
||||
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
|
||||
public StringDt getDisplayElement() {
|
||||
return getDisplay();
|
||||
|
@ -375,7 +299,4 @@ public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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.UriDt;
|
||||
|
||||
class InternalQuantityDt
|
||||
extends BaseQuantityDt implements ICompositeDatatype
|
||||
{
|
||||
/**
|
||||
* Base class for QuantityDt of any version
|
||||
*/
|
||||
class InternalQuantityDt extends BaseQuantityDt implements ICompositeDatatype {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -66,7 +51,7 @@ class InternalQuantityDt
|
|||
* Constructor
|
||||
*/
|
||||
@SimpleSetter
|
||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
|
||||
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theValue") double theValue) {
|
||||
setValue(theValue);
|
||||
}
|
||||
|
||||
|
@ -74,10 +59,10 @@ class InternalQuantityDt
|
|||
* Constructor
|
||||
*/
|
||||
@SimpleSetter
|
||||
public InternalQuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
|
||||
public InternalQuantityDt(@SimpleSetter.Parameter(name = "theValue") long theValue) {
|
||||
setValue(theValue);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -104,7 +89,8 @@ class InternalQuantityDt
|
|||
* Constructor
|
||||
*/
|
||||
@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);
|
||||
setComparator(theComparator);
|
||||
setSystem(theSystem);
|
||||
|
@ -115,71 +101,52 @@ class InternalQuantityDt
|
|||
* Constructor
|
||||
*/
|
||||
@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);
|
||||
setComparator(theComparator);
|
||||
setSystem(theSystem);
|
||||
setUnits(theUnits);
|
||||
}
|
||||
|
||||
|
||||
@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"
|
||||
)
|
||||
@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")
|
||||
private DecimalDt myValue;
|
||||
|
||||
@Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1)
|
||||
@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"
|
||||
)
|
||||
|
||||
@Child(name = "comparator", type = CodeDt.class, order = 1, min = 0, max = 1)
|
||||
@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")
|
||||
private BoundCodeDt<QuantityCompararatorEnum> myComparator;
|
||||
|
||||
@Child(name="units", type=StringDt.class, order=2, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Unit representation",
|
||||
formalDefinition="A human-readable form of the units"
|
||||
)
|
||||
|
||||
@Child(name = "units", type = StringDt.class, order = 2, min = 0, max = 1)
|
||||
@Description(shortDefinition = "Unit representation", formalDefinition = "A human-readable form of the units")
|
||||
private StringDt myUnits;
|
||||
|
||||
@Child(name="system", type=UriDt.class, order=3, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="System that defines coded unit form",
|
||||
formalDefinition="The identification of the system that provides the coded form of the unit"
|
||||
)
|
||||
|
||||
@Child(name = "system", type = UriDt.class, order = 3, min = 0, max = 1)
|
||||
@Description(shortDefinition = "System that defines coded unit form", formalDefinition = "The identification of the system that provides the coded form of the unit")
|
||||
private UriDt mySystem;
|
||||
|
||||
@Child(name="code", type=CodeDt.class, order=4, min=0, max=1)
|
||||
@Description(
|
||||
shortDefinition="Coded form of the unit",
|
||||
formalDefinition="A computer processable form of the units in some unit representation system"
|
||||
)
|
||||
|
||||
@Child(name = "code", type = CodeDt.class, order = 4, min = 0, max = 1)
|
||||
@Description(shortDefinition = "Coded form of the unit", formalDefinition = "A computer processable form of the units in some unit representation system")
|
||||
private CodeDt myCode;
|
||||
|
||||
|
||||
@Override
|
||||
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
|
||||
public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
|
||||
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)).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public DecimalDt getValueElement() {
|
||||
public DecimalDt getValueElement() {
|
||||
if (myValue == null) {
|
||||
myValue = new DecimalDt();
|
||||
}
|
||||
|
@ -189,67 +156,60 @@ class InternalQuantityDt
|
|||
/**
|
||||
* Sets the value(s) for <b>value</b> (Numerical value (with implicit precision))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setValue(DecimalDt theValue) {
|
||||
myValue = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setValue( long theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
public InternalQuantityDt setValue(long theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setValue( double theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
public InternalQuantityDt setValue(double theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value for <b>value</b> (Numerical value (with implicit precision))
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The value of the measured amount. The value includes an implicit precision in the presentation of the value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setValue( java.math.BigDecimal theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
public InternalQuantityDt setValue(java.math.BigDecimal theValue) {
|
||||
myValue = new DecimalDt(theValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <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 \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
* <p>
|
||||
* <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
|
||||
* \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public BoundCodeDt<QuantityCompararatorEnum> getComparatorElement() {
|
||||
public BoundCodeDt<QuantityCompararatorEnum> getComparatorElement() {
|
||||
if (myComparator == null) {
|
||||
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)
|
||||
*
|
||||
* <p>
|
||||
* <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 \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
* <p>
|
||||
* <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
|
||||
* \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setComparator(BoundCodeDt<QuantityCompararatorEnum> theValue) {
|
||||
myComparator = theValue;
|
||||
|
@ -272,28 +232,24 @@ class InternalQuantityDt
|
|||
/**
|
||||
* Sets the value(s) for <b>comparator</b> (< | <= | >= | > - how to understand the value)
|
||||
*
|
||||
* <p>
|
||||
* <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 \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
* <p>
|
||||
* <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
|
||||
* \"<\" , then the real value is < stated value
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setComparator(QuantityCompararatorEnum theValue) {
|
||||
getComparatorElement().setValueAsEnum(theValue);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value(s) for <b>units</b> (Unit representation).
|
||||
* creating it if it does
|
||||
* not exist. Will not return <code>null</code>.
|
||||
* Gets the value(s) for <b>units</b> (Unit representation). creating it if it does not exist. Will not return <code>null</code>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A human-readable form of the units
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A human-readable form of the units
|
||||
* </p>
|
||||
*/
|
||||
public StringDt getUnitsElement() {
|
||||
public StringDt getUnitsElement() {
|
||||
if (myUnits == null) {
|
||||
myUnits = new StringDt();
|
||||
}
|
||||
|
@ -303,41 +259,35 @@ class InternalQuantityDt
|
|||
/**
|
||||
* Sets the value(s) for <b>units</b> (Unit representation)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A human-readable form of the units
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A human-readable form of the units
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setUnits(StringDt theValue) {
|
||||
myUnits = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>units</b> (Unit representation)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A human-readable form of the units
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A human-readable form of the units
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setUnits( String theString) {
|
||||
myUnits = new StringDt(theString);
|
||||
return this;
|
||||
public InternalQuantityDt setUnits(String theString) {
|
||||
myUnits = new StringDt(theString);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
*/
|
||||
public UriDt getSystemElement() {
|
||||
public UriDt getSystemElement() {
|
||||
if (mySystem == null) {
|
||||
mySystem = new UriDt();
|
||||
}
|
||||
|
@ -347,41 +297,35 @@ class InternalQuantityDt
|
|||
/**
|
||||
* Sets the value(s) for <b>system</b> (System that defines coded unit form)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setSystem(UriDt theValue) {
|
||||
mySystem = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>system</b> (System that defines coded unit form)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> The identification of the system that provides the coded form of the unit
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setSystem( String theUri) {
|
||||
mySystem = new UriDt(theUri);
|
||||
return this;
|
||||
public InternalQuantityDt setSystem(String theUri) {
|
||||
mySystem = new UriDt(theUri);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
* 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>.
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
*/
|
||||
public CodeDt getCodeElement() {
|
||||
public CodeDt getCodeElement() {
|
||||
if (myCode == null) {
|
||||
myCode = new CodeDt();
|
||||
}
|
||||
|
@ -391,27 +335,25 @@ class InternalQuantityDt
|
|||
/**
|
||||
* Sets the value(s) for <b>code</b> (Coded form of the unit)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setCode(CodeDt theValue) {
|
||||
myCode = theValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sets the value for <b>code</b> (Coded form of the unit)
|
||||
*
|
||||
* <p>
|
||||
* <b>Definition:</b>
|
||||
* A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
* <p>
|
||||
* <b>Definition:</b> A computer processable form of the units in some unit representation system
|
||||
* </p>
|
||||
*/
|
||||
public InternalQuantityDt setCode( String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
return this;
|
||||
public InternalQuantityDt setCode(String theCode) {
|
||||
myCode = new CodeDt(theCode);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -424,7 +366,4 @@ class InternalQuantityDt
|
|||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -31,31 +31,30 @@ import ca.uhn.fhir.util.ResourceReferenceInfo;
|
|||
* Controls how bundles decide whether referenced resources should be included
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* This is the default behavior
|
||||
*/
|
||||
BASED_ON_INCLUDES {
|
||||
@Override
|
||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
||||
return theReferenceInfo.matchesIncludeSet(theIncludes);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
BASED_ON_INCLUDES {
|
||||
@Override
|
||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> 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
|
||||
* an id (in which case it's not included)
|
||||
*
|
||||
* This is the original HAPI behavior
|
||||
*/
|
||||
BASED_ON_RESOURCE_PRESENCE {
|
||||
@Override
|
||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
* This is the original HAPI behavior
|
||||
*/
|
||||
BASED_ON_RESOURCE_PRESENCE {
|
||||
@Override
|
||||
public boolean shouldIncludeReferencedResource(ResourceReferenceInfo theReferenceInfo, Set<Include> theIncludes) {
|
||||
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"
|
||||
"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:
|
||||
|
||||
- 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).
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
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.
|
||||
|
||||
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
|
||||
|
||||
-->
|
||||
|
||||
<module name = "Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
<!--<property name="fileExtensions" value="java, properties, xml"/>-->
|
||||
|
||||
<module name="TreeWalker">
|
||||
<property name="tabWidth" value="3"/>
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<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)"/>
|
||||
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
|
||||
</module>
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<property name="max" value="300"/>
|
||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
</module>
|
||||
<!--<module name="AvoidStarImport"/>-->
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly">
|
||||
<property name="maxLineLength" value="300"/>
|
||||
</module>
|
||||
<module name="RightCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||
</module>
|
||||
<!--
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notFollowed"
|
||||
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)"/>
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
-->
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<!--
|
||||
<module name="MissingSwitchDefault"/>
|
||||
-->
|
||||
<module name="FallThrough"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="tokens" value="COMMA"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern"
|
||||
value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.followed"
|
||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded"
|
||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow"
|
||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="UncommentedMain"/>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="3"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="0"/>
|
||||
<property name="throwsIndent" value="6"/>
|
||||
<property name="lineWrappingIndentation" value="6"/>
|
||||
<property name="arrayInitIndent" value="3"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<!--
|
||||
<module name="CustomImportOrder">
|
||||
<property name="specialImportsRegExp" value="com.google"/>
|
||||
<property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
||||
</module>
|
||||
-->
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<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 "/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadocCheck">
|
||||
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</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 name="TreeWalker">
|
||||
<property name="tabWidth" value="3"/>
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<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)"/>
|
||||
<property name="message"
|
||||
value="Avoid using corresponding octal or Unicode escape."/>
|
||||
</module>
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<module name="LineLength">
|
||||
<property name="max" value="300"/>
|
||||
<property name="ignorePattern"
|
||||
value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
</module>
|
||||
<!--<module name="AvoidStarImport"/> -->
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens"
|
||||
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly">
|
||||
<property name="maxLineLength" value="300"/>
|
||||
</module>
|
||||
<module name="RightCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
|
||||
</module>
|
||||
<!-- <module name="WhitespaceAround"> <property name="allowEmptyConstructors"
|
||||
value="true"/> <property name="allowEmptyMethods" value="true"/> <property
|
||||
name="allowEmptyTypes" value="true"/> <property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notFollowed" 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)"/> <message key="ws.notPreceded" value="WhitespaceAround:
|
||||
''{0}'' is not preceded with whitespace."/> </module> -->
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<!-- <module name="MissingSwitchDefault"/> -->
|
||||
<module name="FallThrough"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="tokens" value="COMMA"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.followed"
|
||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded"
|
||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow"
|
||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="UncommentedMain"/>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="3"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="0"/>
|
||||
<property name="throwsIndent" value="6"/>
|
||||
<property name="lineWrappingIndentation" value="6"/>
|
||||
<property name="arrayInitIndent" value="3"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<!-- <module name="CustomImportOrder"> <property name="specialImportsRegExp"
|
||||
value="com.google"/> <property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE###STANDARD_JAVA_PACKAGE"/>
|
||||
</module> -->
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<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 "/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadocCheck">
|
||||
<property name="forbiddenSummaryFragments"
|
||||
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue