id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
22,500 | jamesagnew/hapi-fhir | hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/Template.java | Template.toStringAST | public String toStringAST() {
StringBuilder builder = new StringBuilder();
walk(root, builder);
return builder.toString();
} | java | public String toStringAST() {
StringBuilder builder = new StringBuilder();
walk(root, builder);
return builder.toString();
} | [
"public",
"String",
"toStringAST",
"(",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"walk",
"(",
"root",
",",
"builder",
")",
";",
"return",
"builder",
".",
"toString",
"(",
")",
";",
"}"
] | Returns a string representation of the AST of the parsed
input source.
@return a string representation of the AST of the parsed
input source. | [
"Returns",
"a",
"string",
"representation",
"of",
"the",
"AST",
"of",
"the",
"parsed",
"input",
"source",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/Template.java#L187-L194 |
22,501 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java | DaoSearchParamSynchronizer.tryToReuseIndexEntities | private <T extends BaseResourceIndex> void tryToReuseIndexEntities(List<T> theIndexesToRemove, List<T> theIndexesToAdd) {
for (int addIndex = 0; addIndex < theIndexesToAdd.size(); addIndex++) {
// If there are no more rows to remove, there's nothing we can reuse
if (theIndexesToRemove.isEmpty()) {
break;
... | java | private <T extends BaseResourceIndex> void tryToReuseIndexEntities(List<T> theIndexesToRemove, List<T> theIndexesToAdd) {
for (int addIndex = 0; addIndex < theIndexesToAdd.size(); addIndex++) {
// If there are no more rows to remove, there's nothing we can reuse
if (theIndexesToRemove.isEmpty()) {
break;
... | [
"private",
"<",
"T",
"extends",
"BaseResourceIndex",
">",
"void",
"tryToReuseIndexEntities",
"(",
"List",
"<",
"T",
">",
"theIndexesToRemove",
",",
"List",
"<",
"T",
">",
"theIndexesToAdd",
")",
"{",
"for",
"(",
"int",
"addIndex",
"=",
"0",
";",
"addIndex",
... | The logic here is that often times when we update a resource we are dropping
one index row and adding another. This method tries to reuse rows that would otherwise
have been deleted by updating them with the contents of rows that would have
otherwise been added. In other words, we're trying to replace
"one delete + one... | [
"The",
"logic",
"here",
"is",
"that",
"often",
"times",
"when",
"we",
"update",
"a",
"resource",
"we",
"are",
"dropping",
"one",
"index",
"row",
"and",
"adding",
"another",
".",
"This",
"method",
"tries",
"to",
"reuse",
"rows",
"that",
"would",
"otherwise"... | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/DaoSearchParamSynchronizer.java#L83-L100 |
22,502 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java | JaxRsMethodBindings.getMapForOperation | private ConcurrentHashMap<String, BaseMethodBinding<?>> getMapForOperation(RestOperationTypeEnum operationType) {
ConcurrentHashMap<String, BaseMethodBinding<?>> result = operationBindings.get(operationType);
if(result == null) {
operationBindings.putIfAbsent(operationType, new ConcurrentHashMap<String, BaseMeth... | java | private ConcurrentHashMap<String, BaseMethodBinding<?>> getMapForOperation(RestOperationTypeEnum operationType) {
ConcurrentHashMap<String, BaseMethodBinding<?>> result = operationBindings.get(operationType);
if(result == null) {
operationBindings.putIfAbsent(operationType, new ConcurrentHashMap<String, BaseMeth... | [
"private",
"ConcurrentHashMap",
"<",
"String",
",",
"BaseMethodBinding",
"<",
"?",
">",
">",
"getMapForOperation",
"(",
"RestOperationTypeEnum",
"operationType",
")",
"{",
"ConcurrentHashMap",
"<",
"String",
",",
"BaseMethodBinding",
"<",
"?",
">",
">",
"result",
... | Get the map for the given operation type. If no map exists for this operation type, create a new hashmap for this
operation type and add it to the operation bindings.
@param operationType the operation type.
@return the map defined in the operation bindings | [
"Get",
"the",
"map",
"for",
"the",
"given",
"operation",
"type",
".",
"If",
"no",
"map",
"exists",
"for",
"this",
"operation",
"type",
"create",
"a",
"new",
"hashmap",
"for",
"this",
"operation",
"type",
"and",
"add",
"it",
"to",
"the",
"operation",
"bin... | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java#L101-L109 |
22,503 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java | JaxRsMethodBindings.getBinding | public BaseMethodBinding<?> getBinding(RestOperationTypeEnum operationType, String theBindingKey) {
String bindingKey = StringUtils.defaultIfBlank(theBindingKey, DEFAULT_METHOD_KEY);
ConcurrentHashMap<String, BaseMethodBinding<?>> map = getMapForOperation(operationType);
if(map == null || !map.contain... | java | public BaseMethodBinding<?> getBinding(RestOperationTypeEnum operationType, String theBindingKey) {
String bindingKey = StringUtils.defaultIfBlank(theBindingKey, DEFAULT_METHOD_KEY);
ConcurrentHashMap<String, BaseMethodBinding<?>> map = getMapForOperation(operationType);
if(map == null || !map.contain... | [
"public",
"BaseMethodBinding",
"<",
"?",
">",
"getBinding",
"(",
"RestOperationTypeEnum",
"operationType",
",",
"String",
"theBindingKey",
")",
"{",
"String",
"bindingKey",
"=",
"StringUtils",
".",
"defaultIfBlank",
"(",
"theBindingKey",
",",
"DEFAULT_METHOD_KEY",
")"... | Get the binding
@param operationType the type of operation
@param theBindingKey the binding key
@return the binding defined
@throws NotImplementedOperationException cannot be found | [
"Get",
"the",
"binding"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java#L119-L127 |
22,504 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java | JaxRsMethodBindings.getMethodBindings | public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) {
if(!getClassBindings().containsKey(theProviderClass)) {
JaxRsMethodBindings foundBindings = new JaxRsMethodBindings(theProvider, theProviderClass);
getClassBindings()... | java | public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) {
if(!getClassBindings().containsKey(theProviderClass)) {
JaxRsMethodBindings foundBindings = new JaxRsMethodBindings(theProvider, theProviderClass);
getClassBindings()... | [
"public",
"static",
"JaxRsMethodBindings",
"getMethodBindings",
"(",
"AbstractJaxRsProvider",
"theProvider",
",",
"Class",
"<",
"?",
"extends",
"AbstractJaxRsProvider",
">",
"theProviderClass",
")",
"{",
"if",
"(",
"!",
"getClassBindings",
"(",
")",
".",
"containsKey"... | Get the method bindings for the given class. If this class is not yet contained in the classBindings, they will be added for this class
@param theProvider the implementation class
@param theProviderClass the provider class
@return the methodBindings for this class | [
"Get",
"the",
"method",
"bindings",
"for",
"the",
"given",
"class",
".",
"If",
"this",
"class",
"is",
"not",
"yet",
"contained",
"in",
"the",
"classBindings",
"they",
"will",
"be",
"added",
"for",
"this",
"class"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java#L136-L142 |
22,505 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java | ArbitrarySqlTask.addExecuteOnlyIfColumnExists | public void addExecuteOnlyIfColumnExists(String theTableName, String theColumnName) {
myConditionalOnExistenceOf.add(new TableAndColumn(theTableName, theColumnName));
} | java | public void addExecuteOnlyIfColumnExists(String theTableName, String theColumnName) {
myConditionalOnExistenceOf.add(new TableAndColumn(theTableName, theColumnName));
} | [
"public",
"void",
"addExecuteOnlyIfColumnExists",
"(",
"String",
"theTableName",
",",
"String",
"theColumnName",
")",
"{",
"myConditionalOnExistenceOf",
".",
"add",
"(",
"new",
"TableAndColumn",
"(",
"theTableName",
",",
"theColumnName",
")",
")",
";",
"}"
] | This task will only execute if the following column exists | [
"This",
"task",
"will",
"only",
"execute",
"if",
"the",
"following",
"column",
"exists"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/taskdef/ArbitrarySqlTask.java#L98-L100 |
22,506 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java | Inflector.pluralize | public String pluralize( Object word ) {
if (word == null) return null;
String wordStr = word.toString().trim();
if (wordStr.length() == 0) return wordStr;
if (isUncountable(wordStr)) return wordStr;
for (Rule rule : this.plurals) {
String result = rule.apply(wo... | java | public String pluralize( Object word ) {
if (word == null) return null;
String wordStr = word.toString().trim();
if (wordStr.length() == 0) return wordStr;
if (isUncountable(wordStr)) return wordStr;
for (Rule rule : this.plurals) {
String result = rule.apply(wo... | [
"public",
"String",
"pluralize",
"(",
"Object",
"word",
")",
"{",
"if",
"(",
"word",
"==",
"null",
")",
"return",
"null",
";",
"String",
"wordStr",
"=",
"word",
".",
"toString",
"(",
")",
".",
"trim",
"(",
")",
";",
"if",
"(",
"wordStr",
".",
"leng... | Returns the plural form of the word in the string.
Examples:
<pre>
inflector.pluralize("post") #=> "posts"
inflector.pluralize("octopus") #=> "octopi"
inflector.pluralize("sheep") #=> "sheep"
inflector.pluralize... | [
"Returns",
"the",
"plural",
"form",
"of",
"the",
"word",
"in",
"the",
"string",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java#L174-L184 |
22,507 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java | Inflector.singularize | public String singularize( Object word ) {
if (word == null) return null;
String wordStr = word.toString().trim();
if (wordStr.length() == 0) return wordStr;
if (isUncountable(wordStr)) return wordStr;
for (Rule rule : this.singulars) {
String result = rule.appl... | java | public String singularize( Object word ) {
if (word == null) return null;
String wordStr = word.toString().trim();
if (wordStr.length() == 0) return wordStr;
if (isUncountable(wordStr)) return wordStr;
for (Rule rule : this.singulars) {
String result = rule.appl... | [
"public",
"String",
"singularize",
"(",
"Object",
"word",
")",
"{",
"if",
"(",
"word",
"==",
"null",
")",
"return",
"null",
";",
"String",
"wordStr",
"=",
"word",
".",
"toString",
"(",
")",
".",
"trim",
"(",
")",
";",
"if",
"(",
"wordStr",
".",
"le... | Returns the singular form of the word in the string.
Examples:
<pre>
inflector.singularize("posts") #=> "post"
inflector.singularize("octopi") #=> "octopus"
inflector.singularize("sheep") #=> "sheep"
inflector.sing... | [
"Returns",
"the",
"singular",
"form",
"of",
"the",
"word",
"in",
"the",
"string",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java#L218-L228 |
22,508 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java | Inflector.capitalize | public String capitalize( String words ) {
if (words == null) return null;
String result = words.trim();
if (result.length() == 0) return "";
if (result.length() == 1) return result.toUpperCase();
return "" + Character.toUpperCase(result.charAt(0)) + result.substring(1).toLo... | java | public String capitalize( String words ) {
if (words == null) return null;
String result = words.trim();
if (result.length() == 0) return "";
if (result.length() == 1) return result.toUpperCase();
return "" + Character.toUpperCase(result.charAt(0)) + result.substring(1).toLo... | [
"public",
"String",
"capitalize",
"(",
"String",
"words",
")",
"{",
"if",
"(",
"words",
"==",
"null",
")",
"return",
"null",
";",
"String",
"result",
"=",
"words",
".",
"trim",
"(",
")",
";",
"if",
"(",
"result",
".",
"length",
"(",
")",
"==",
"0",... | Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase.
@param words the word to be capitalized
@return the string with the first character capitalized and the remaining characters lowercased | [
"Returns",
"a",
"copy",
"of",
"the",
"input",
"with",
"the",
"first",
"character",
"converted",
"to",
"uppercase",
"and",
"the",
"remainder",
"to",
"lowercase",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/Inflector.java#L375-L381 |
22,509 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.outgoingResponse | @Override
public boolean outgoingResponse(RequestDetails theRequestDetails, Bundle theResponseObject, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws AuthenticationException {
if (myClientParamsOptional && myDataStore == null) {
// auditing is not required or configured, so do... | java | @Override
public boolean outgoingResponse(RequestDetails theRequestDetails, Bundle theResponseObject, HttpServletRequest theServletRequest, HttpServletResponse theServletResponse) throws AuthenticationException {
if (myClientParamsOptional && myDataStore == null) {
// auditing is not required or configured, so do... | [
"@",
"Override",
"public",
"boolean",
"outgoingResponse",
"(",
"RequestDetails",
"theRequestDetails",
",",
"Bundle",
"theResponseObject",
",",
"HttpServletRequest",
"theServletRequest",
",",
"HttpServletResponse",
"theServletResponse",
")",
"throws",
"AuthenticationException",
... | Intercept the outgoing response to perform auditing of the request data if the bundle contains auditable
resources. | [
"Intercept",
"the",
"outgoing",
"response",
"to",
"perform",
"auditing",
"of",
"the",
"request",
"data",
"if",
"the",
"bundle",
"contains",
"auditable",
"resources",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L116-L164 |
22,510 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.getEventInfo | protected Event getEventInfo(RequestDetails theRequestDetails) {
Event event = new Event();
event.setAction(mapResourceTypeToSecurityEventAction(theRequestDetails.getRestOperationType()));
event.setDateTimeWithMillisPrecision(new Date());
event.setOutcome(SecurityEventOutcomeEnum.SUCCESS); // we audit successfu... | java | protected Event getEventInfo(RequestDetails theRequestDetails) {
Event event = new Event();
event.setAction(mapResourceTypeToSecurityEventAction(theRequestDetails.getRestOperationType()));
event.setDateTimeWithMillisPrecision(new Date());
event.setOutcome(SecurityEventOutcomeEnum.SUCCESS); // we audit successfu... | [
"protected",
"Event",
"getEventInfo",
"(",
"RequestDetails",
"theRequestDetails",
")",
"{",
"Event",
"event",
"=",
"new",
"Event",
"(",
")",
";",
"event",
".",
"setAction",
"(",
"mapResourceTypeToSecurityEventAction",
"(",
"theRequestDetails",
".",
"getRestOperationTy... | Generates the Event segment of the SecurityEvent based on the incoming request details
@param theRequestDetails
the RequestDetails of the incoming request
@return an Event populated with the action, date, and outcome | [
"Generates",
"the",
"Event",
"segment",
"of",
"the",
"SecurityEvent",
"based",
"on",
"the",
"incoming",
"request",
"details"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L236-L245 |
22,511 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.getQueryFromRequestDetails | protected byte[] getQueryFromRequestDetails(RequestDetails theRequestDetails) {
byte[] query;
try {
query = theRequestDetails.getCompleteUrl().getBytes("UTF-8");
} catch (UnsupportedEncodingException e1) {
log.warn("Unable to encode URL to bytes in UTF-8, defaulting to platform default charset.", e1);
qu... | java | protected byte[] getQueryFromRequestDetails(RequestDetails theRequestDetails) {
byte[] query;
try {
query = theRequestDetails.getCompleteUrl().getBytes("UTF-8");
} catch (UnsupportedEncodingException e1) {
log.warn("Unable to encode URL to bytes in UTF-8, defaulting to platform default charset.", e1);
qu... | [
"protected",
"byte",
"[",
"]",
"getQueryFromRequestDetails",
"(",
"RequestDetails",
"theRequestDetails",
")",
"{",
"byte",
"[",
"]",
"query",
";",
"try",
"{",
"query",
"=",
"theRequestDetails",
".",
"getCompleteUrl",
"(",
")",
".",
"getBytes",
"(",
"\"UTF-8\"",
... | Return the query URL encoded to bytes to be set as the Object.query on the Security Event
@param theRequestDetails
the RequestDetails of the incoming request
@return the query URL of the request encoded to bytes | [
"Return",
"the",
"query",
"URL",
"encoded",
"to",
"bytes",
"to",
"be",
"set",
"as",
"the",
"Object",
".",
"query",
"on",
"the",
"Security",
"Event"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L254-L263 |
22,512 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.getObjectElement | protected ObjectElement getObjectElement(IResource resource, SecurityEventObjectLifecycleEnum lifecycle, byte[] query) throws InstantiationException, IllegalAccessException {
String resourceType = resource.getResourceName();
if (myAuditableResources.containsKey(resourceType)) {
log.debug("Found auditable resour... | java | protected ObjectElement getObjectElement(IResource resource, SecurityEventObjectLifecycleEnum lifecycle, byte[] query) throws InstantiationException, IllegalAccessException {
String resourceType = resource.getResourceName();
if (myAuditableResources.containsKey(resourceType)) {
log.debug("Found auditable resour... | [
"protected",
"ObjectElement",
"getObjectElement",
"(",
"IResource",
"resource",
",",
"SecurityEventObjectLifecycleEnum",
"lifecycle",
",",
"byte",
"[",
"]",
"query",
")",
"throws",
"InstantiationException",
",",
"IllegalAccessException",
"{",
"String",
"resourceType",
"="... | If the resource is considered an auditable resource containing PHI, create an ObjectElement, otherwise return null
@param resource
the resource to be audited
@param lifecycle
the SecurityEventObjectLifecycleEnum of the request
@param query
the byte encoded query string of the request
@return an ObjectElement populated... | [
"If",
"the",
"resource",
"is",
"considered",
"an",
"auditable",
"resource",
"containing",
"PHI",
"create",
"an",
"ObjectElement",
"otherwise",
"return",
"null"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L280-L321 |
22,513 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.makeObjectDetail | protected ObjectDetail makeObjectDetail(String type, String value) {
ObjectDetail detail = new ObjectDetail();
if (type != null)
detail.setType(type);
if (value != null)
detail.setValue(value.getBytes());
return detail;
} | java | protected ObjectDetail makeObjectDetail(String type, String value) {
ObjectDetail detail = new ObjectDetail();
if (type != null)
detail.setType(type);
if (value != null)
detail.setValue(value.getBytes());
return detail;
} | [
"protected",
"ObjectDetail",
"makeObjectDetail",
"(",
"String",
"type",
",",
"String",
"value",
")",
"{",
"ObjectDetail",
"detail",
"=",
"new",
"ObjectDetail",
"(",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"detail",
".",
"setType",
"(",
"type",
")",... | Helper method to create an ObjectDetail from a pair of Strings.
@param type
the type of the ObjectDetail
@param value
the value of the ObejctDetail to be encoded
@return an ObjectDetail of the given type and value | [
"Helper",
"method",
"to",
"create",
"an",
"ObjectDetail",
"from",
"a",
"pair",
"of",
"Strings",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L332-L339 |
22,514 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.getAccessType | protected List<CodingDt> getAccessType(HttpServletRequest theServletRequest) {
List<CodingDt> types = new ArrayList<CodingDt>();
if (theServletRequest.getHeader(Constants.HEADER_AUTHORIZATION) != null && theServletRequest.getHeader(Constants.HEADER_AUTHORIZATION).startsWith("OAuth")) {
types.add(new CodingDt(Sec... | java | protected List<CodingDt> getAccessType(HttpServletRequest theServletRequest) {
List<CodingDt> types = new ArrayList<CodingDt>();
if (theServletRequest.getHeader(Constants.HEADER_AUTHORIZATION) != null && theServletRequest.getHeader(Constants.HEADER_AUTHORIZATION).startsWith("OAuth")) {
types.add(new CodingDt(Sec... | [
"protected",
"List",
"<",
"CodingDt",
">",
"getAccessType",
"(",
"HttpServletRequest",
"theServletRequest",
")",
"{",
"List",
"<",
"CodingDt",
">",
"types",
"=",
"new",
"ArrayList",
"<",
"CodingDt",
">",
"(",
")",
";",
"if",
"(",
"theServletRequest",
".",
"g... | Return the access type for this request
@param theServletRequest
the incoming request
@return the SecurityEventSourceTypeEnum representing the type of request being made | [
"Return",
"the",
"access",
"type",
"for",
"this",
"request"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L427-L440 |
22,515 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.mapResourceTypeToSecurityEventAction | protected SecurityEventActionEnum mapResourceTypeToSecurityEventAction(ca.uhn.fhir.rest.api.RestOperationTypeEnum theRestfulOperationTypeEnum) {
if (theRestfulOperationTypeEnum == null)
return null;
switch (theRestfulOperationTypeEnum) {
case READ:
return SecurityEventActionEnum.READ_VIEW_PRINT;
case CREA... | java | protected SecurityEventActionEnum mapResourceTypeToSecurityEventAction(ca.uhn.fhir.rest.api.RestOperationTypeEnum theRestfulOperationTypeEnum) {
if (theRestfulOperationTypeEnum == null)
return null;
switch (theRestfulOperationTypeEnum) {
case READ:
return SecurityEventActionEnum.READ_VIEW_PRINT;
case CREA... | [
"protected",
"SecurityEventActionEnum",
"mapResourceTypeToSecurityEventAction",
"(",
"ca",
".",
"uhn",
".",
"fhir",
".",
"rest",
".",
"api",
".",
"RestOperationTypeEnum",
"theRestfulOperationTypeEnum",
")",
"{",
"if",
"(",
"theRestfulOperationTypeEnum",
"==",
"null",
")... | Returns the SecurityEventActionEnum corresponding to the specified RestfulOperationTypeEnum
@param theRestfulOperationTypeEnum
the type of operation (Read, Create, Delete, etc)
@return the corresponding SecurityEventActionEnum (Read/View/Print, Create, Delete, etc) | [
"Returns",
"the",
"SecurityEventActionEnum",
"corresponding",
"to",
"the",
"specified",
"RestfulOperationTypeEnum"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L449-L474 |
22,516 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.mapResourceTypeToSecurityLifecycle | protected SecurityEventObjectLifecycleEnum mapResourceTypeToSecurityLifecycle(ca.uhn.fhir.rest.api.RestOperationTypeEnum theRestfulOperationTypeEnum) {
if (theRestfulOperationTypeEnum == null)
return null;
switch (theRestfulOperationTypeEnum) {
case READ:
return SecurityEventObjectLifecycleEnum.ACCESS_OR_US... | java | protected SecurityEventObjectLifecycleEnum mapResourceTypeToSecurityLifecycle(ca.uhn.fhir.rest.api.RestOperationTypeEnum theRestfulOperationTypeEnum) {
if (theRestfulOperationTypeEnum == null)
return null;
switch (theRestfulOperationTypeEnum) {
case READ:
return SecurityEventObjectLifecycleEnum.ACCESS_OR_US... | [
"protected",
"SecurityEventObjectLifecycleEnum",
"mapResourceTypeToSecurityLifecycle",
"(",
"ca",
".",
"uhn",
".",
"fhir",
".",
"rest",
".",
"api",
".",
"RestOperationTypeEnum",
"theRestfulOperationTypeEnum",
")",
"{",
"if",
"(",
"theRestfulOperationTypeEnum",
"==",
"null... | Returns the SecurityEventObjectLifecycleEnum corresponding to the specified RestfulOperationTypeEnum
@param theRestfulOperationTypeEnum
the type of operation (Read, Create, Delete, etc)
@return the corresponding SecurityEventObjectLifecycleEnum (Access/Use, Origination/Creation, Logical Deletion,
etc) | [
"Returns",
"the",
"SecurityEventObjectLifecycleEnum",
"corresponding",
"to",
"the",
"specified",
"RestfulOperationTypeEnum"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L484-L509 |
22,517 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java | AuditingInterceptor.addAuditableResource | public void addAuditableResource(String resourceType, Class<? extends IResourceAuditor<? extends IResource>> auditableResource) {
if (myAuditableResources == null)
myAuditableResources = new HashMap<String, Class<? extends IResourceAuditor<? extends IResource>>>();
myAuditableResources.put(resourceType, auditabl... | java | public void addAuditableResource(String resourceType, Class<? extends IResourceAuditor<? extends IResource>> auditableResource) {
if (myAuditableResources == null)
myAuditableResources = new HashMap<String, Class<? extends IResourceAuditor<? extends IResource>>>();
myAuditableResources.put(resourceType, auditabl... | [
"public",
"void",
"addAuditableResource",
"(",
"String",
"resourceType",
",",
"Class",
"<",
"?",
"extends",
"IResourceAuditor",
"<",
"?",
"extends",
"IResource",
">",
">",
"auditableResource",
")",
"{",
"if",
"(",
"myAuditableResources",
"==",
"null",
")",
"myAu... | Add a type of auditable resource and its auditor to this AuditingInterceptor's resource map
@param resourceType
the type of resource to be audited (Patient, Encounter, etc)
@param auditableResource
an implementation of IResourceAuditor that can audit resources of the given type | [
"Add",
"a",
"type",
"of",
"auditable",
"resource",
"and",
"its",
"auditor",
"to",
"this",
"AuditingInterceptor",
"s",
"resource",
"map"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/rest/server/interceptor/AuditingInterceptor.java#L549-L553 |
22,518 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationResult.java | ValidationResult.toOperationOutcome | public IBaseOperationOutcome toOperationOutcome() {
IBaseOperationOutcome oo = (IBaseOperationOutcome) myCtx.getResourceDefinition("OperationOutcome").newInstance();
populateOperationOutcome(oo);
return oo;
} | java | public IBaseOperationOutcome toOperationOutcome() {
IBaseOperationOutcome oo = (IBaseOperationOutcome) myCtx.getResourceDefinition("OperationOutcome").newInstance();
populateOperationOutcome(oo);
return oo;
} | [
"public",
"IBaseOperationOutcome",
"toOperationOutcome",
"(",
")",
"{",
"IBaseOperationOutcome",
"oo",
"=",
"(",
"IBaseOperationOutcome",
")",
"myCtx",
".",
"getResourceDefinition",
"(",
"\"OperationOutcome\"",
")",
".",
"newInstance",
"(",
")",
";",
"populateOperationO... | Create an OperationOutcome resource which contains all of the messages found as a result of this validation | [
"Create",
"an",
"OperationOutcome",
"resource",
"which",
"contains",
"all",
"of",
"the",
"messages",
"found",
"as",
"a",
"result",
"of",
"this",
"validation"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationResult.java#L103-L107 |
22,519 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationResult.java | ValidationResult.populateOperationOutcome | public void populateOperationOutcome(IBaseOperationOutcome theOperationOutcome) {
for (SingleValidationMessage next : myMessages) {
String location;
if (isNotBlank(next.getLocationString())) {
location = next.getLocationString();
} else if (next.getLocationLine() != null || next.getLocationCol() != null)... | java | public void populateOperationOutcome(IBaseOperationOutcome theOperationOutcome) {
for (SingleValidationMessage next : myMessages) {
String location;
if (isNotBlank(next.getLocationString())) {
location = next.getLocationString();
} else if (next.getLocationLine() != null || next.getLocationCol() != null)... | [
"public",
"void",
"populateOperationOutcome",
"(",
"IBaseOperationOutcome",
"theOperationOutcome",
")",
"{",
"for",
"(",
"SingleValidationMessage",
"next",
":",
"myMessages",
")",
"{",
"String",
"location",
";",
"if",
"(",
"isNotBlank",
"(",
"next",
".",
"getLocatio... | Populate an operation outcome with the results of the validation | [
"Populate",
"an",
"operation",
"outcome",
"with",
"the",
"results",
"of",
"the",
"validation"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/ValidationResult.java#L112-L130 |
22,520 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java | FhirResourceDaoQuestionnaireResponseDstu2.initialize | @PostConstruct
public void initialize() {
try {
Class.forName("org.hl7.fhir.instance.model.QuestionnaireResponse");
myValidateResponses = true;
} catch (ClassNotFoundException e) {
myValidateResponses = Boolean.FALSE;
}
} | java | @PostConstruct
public void initialize() {
try {
Class.forName("org.hl7.fhir.instance.model.QuestionnaireResponse");
myValidateResponses = true;
} catch (ClassNotFoundException e) {
myValidateResponses = Boolean.FALSE;
}
} | [
"@",
"PostConstruct",
"public",
"void",
"initialize",
"(",
")",
"{",
"try",
"{",
"Class",
".",
"forName",
"(",
"\"org.hl7.fhir.instance.model.QuestionnaireResponse\"",
")",
";",
"myValidateResponses",
"=",
"true",
";",
"}",
"catch",
"(",
"ClassNotFoundException",
"e... | Initialize the bean | [
"Initialize",
"the",
"bean"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoQuestionnaireResponseDstu2.java#L61-L69 |
22,521 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/JsonParserBase.java | JsonParserBase.compose | public void compose(JsonCreator writer, Resource resource) throws IOException {
json = writer;
composeResource(resource);
} | java | public void compose(JsonCreator writer, Resource resource) throws IOException {
json = writer;
composeResource(resource);
} | [
"public",
"void",
"compose",
"(",
"JsonCreator",
"writer",
",",
"Resource",
"resource",
")",
"throws",
"IOException",
"{",
"json",
"=",
"writer",
";",
"composeResource",
"(",
"resource",
")",
";",
"}"
] | Compose a resource using a pre-existing JsonWriter
@throws IOException | [
"Compose",
"a",
"resource",
"using",
"a",
"pre",
"-",
"existing",
"JsonWriter"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/JsonParserBase.java#L131-L134 |
22,522 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java | XMLUtil.escapeXML | public static String escapeXML(String rawContent, String charset, boolean isNoLines) {
if (rawContent == null)
return "";
else {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < rawContent.length(); i++) {
char ch = rawContent.charAt(i);
if (ch == '\'')
sb.append("'");
... | java | public static String escapeXML(String rawContent, String charset, boolean isNoLines) {
if (rawContent == null)
return "";
else {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < rawContent.length(); i++) {
char ch = rawContent.charAt(i);
if (ch == '\'')
sb.append("'");
... | [
"public",
"static",
"String",
"escapeXML",
"(",
"String",
"rawContent",
",",
"String",
"charset",
",",
"boolean",
"isNoLines",
")",
"{",
"if",
"(",
"rawContent",
"==",
"null",
")",
"return",
"\"\"",
";",
"else",
"{",
"StringBuffer",
"sb",
"=",
"new",
"Stri... | Converts the raw characters to XML escape characters.
@param rawContent
@param charset Null when charset is not known, so we assume it's unicode
@param isNoLines
@return escape string | [
"Converts",
"the",
"raw",
"characters",
"to",
"XML",
"escape",
"characters",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/xml/XMLUtil.java#L265-L298 |
22,523 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java | Base.children | public List<Property> children() {
List<Property> result = new ArrayList<Property>();
listChildren(result);
return result;
} | java | public List<Property> children() {
List<Property> result = new ArrayList<Property>();
listChildren(result);
return result;
} | [
"public",
"List",
"<",
"Property",
">",
"children",
"(",
")",
"{",
"List",
"<",
"Property",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"Property",
">",
"(",
")",
";",
"listChildren",
"(",
"result",
")",
";",
"return",
"result",
";",
"}"
] | Supports iterating the children elements in some generic processor or browser
All defined children will be listed, even if they have no value on this instance
Note that the actual content of primitive or xhtml elements is not iterated explicitly.
To find these, the processing code must recognise the element as a primi... | [
"Supports",
"iterating",
"the",
"children",
"elements",
"in",
"some",
"generic",
"processor",
"or",
"browser",
"All",
"defined",
"children",
"will",
"be",
"listed",
"even",
"if",
"they",
"have",
"no",
"value",
"on",
"this",
"instance"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/Base.java#L149-L153 |
22,524 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java | FhirValidator.registerValidatorModule | public synchronized void registerValidatorModule(IValidatorModule theValidator) {
Validate.notNull(theValidator, "theValidator must not be null");
ArrayList<IValidatorModule> newValidators = new ArrayList<IValidatorModule>(myValidators.size() + 1);
newValidators.addAll(myValidators);
newValidators.add(theValida... | java | public synchronized void registerValidatorModule(IValidatorModule theValidator) {
Validate.notNull(theValidator, "theValidator must not be null");
ArrayList<IValidatorModule> newValidators = new ArrayList<IValidatorModule>(myValidators.size() + 1);
newValidators.addAll(myValidators);
newValidators.add(theValida... | [
"public",
"synchronized",
"void",
"registerValidatorModule",
"(",
"IValidatorModule",
"theValidator",
")",
"{",
"Validate",
".",
"notNull",
"(",
"theValidator",
",",
"\"theValidator must not be null\"",
")",
";",
"ArrayList",
"<",
"IValidatorModule",
">",
"newValidators",... | Add a new validator module to this validator. You may register as many modules as you like at any time.
@param theValidator
The validator module. Must not be null. | [
"Add",
"a",
"new",
"validator",
"module",
"to",
"this",
"validator",
".",
"You",
"may",
"register",
"as",
"many",
"modules",
"as",
"you",
"like",
"at",
"any",
"time",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java#L114-L121 |
22,525 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java | FhirValidator.unregisterValidatorModule | public synchronized void unregisterValidatorModule(IValidatorModule theValidator) {
Validate.notNull(theValidator, "theValidator must not be null");
ArrayList<IValidatorModule> newValidators = new ArrayList<IValidatorModule>(myValidators.size() + 1);
newValidators.addAll(myValidators);
newValidators.remove(theV... | java | public synchronized void unregisterValidatorModule(IValidatorModule theValidator) {
Validate.notNull(theValidator, "theValidator must not be null");
ArrayList<IValidatorModule> newValidators = new ArrayList<IValidatorModule>(myValidators.size() + 1);
newValidators.addAll(myValidators);
newValidators.remove(theV... | [
"public",
"synchronized",
"void",
"unregisterValidatorModule",
"(",
"IValidatorModule",
"theValidator",
")",
"{",
"Validate",
".",
"notNull",
"(",
"theValidator",
",",
"\"theValidator must not be null\"",
")",
";",
"ArrayList",
"<",
"IValidatorModule",
">",
"newValidators... | Removes a validator module from this validator. You may register as many modules as you like, and remove them at any time.
@param theValidator
The validator module. Must not be null. | [
"Removes",
"a",
"validator",
"module",
"from",
"this",
"validator",
".",
"You",
"may",
"register",
"as",
"many",
"modules",
"as",
"you",
"like",
"and",
"remove",
"them",
"at",
"any",
"time",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/validation/FhirValidator.java#L157-L164 |
22,526 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java | DaoSubscriptionMatcher.performSearch | private IBundleProvider performSearch(String theCriteria) {
IFhirResourceDao<?> subscriptionDao = myDaoRegistry.getSubscriptionDao();
RuntimeResourceDefinition responseResourceDef = subscriptionDao.validateCriteriaAndReturnResourceDefinition(theCriteria);
SearchParameterMap responseCriteriaUrl = myMatchUrlService... | java | private IBundleProvider performSearch(String theCriteria) {
IFhirResourceDao<?> subscriptionDao = myDaoRegistry.getSubscriptionDao();
RuntimeResourceDefinition responseResourceDef = subscriptionDao.validateCriteriaAndReturnResourceDefinition(theCriteria);
SearchParameterMap responseCriteriaUrl = myMatchUrlService... | [
"private",
"IBundleProvider",
"performSearch",
"(",
"String",
"theCriteria",
")",
"{",
"IFhirResourceDao",
"<",
"?",
">",
"subscriptionDao",
"=",
"myDaoRegistry",
".",
"getSubscriptionDao",
"(",
")",
";",
"RuntimeResourceDefinition",
"responseResourceDef",
"=",
"subscri... | Search based on a query criteria | [
"Search",
"based",
"on",
"a",
"query",
"criteria"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/subscription/dbmatcher/DaoSubscriptionMatcher.java#L74-L86 |
22,527 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProfilingWrapper.java | ProfilingWrapper.wrap | private ProfilingWrapper wrap(Base object) {
ProfilingWrapper res = new ProfilingWrapper(context, resource, object);
res.cache = cache;
res.engine = engine;
return res;
} | java | private ProfilingWrapper wrap(Base object) {
ProfilingWrapper res = new ProfilingWrapper(context, resource, object);
res.cache = cache;
res.engine = engine;
return res;
} | [
"private",
"ProfilingWrapper",
"wrap",
"(",
"Base",
"object",
")",
"{",
"ProfilingWrapper",
"res",
"=",
"new",
"ProfilingWrapper",
"(",
"context",
",",
"resource",
",",
"object",
")",
";",
"res",
".",
"cache",
"=",
"cache",
";",
"res",
".",
"engine",
"=",
... | This is a convenient called for
@param object
@return | [
"This",
"is",
"a",
"convenient",
"called",
"for"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/ProfilingWrapper.java#L50-L55 |
22,528 | jamesagnew/hapi-fhir | hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/validation/InstanceValidator.java | InstanceValidator.start | private void start(List<ValidationMessage> errors, WrapperElement resource, WrapperElement element, StructureDefinition profile, NodeStack stack) throws FHIRException {
// profile is valid, and matches the resource name
if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(),... | java | private void start(List<ValidationMessage> errors, WrapperElement resource, WrapperElement element, StructureDefinition profile, NodeStack stack) throws FHIRException {
// profile is valid, and matches the resource name
if (rule(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(),... | [
"private",
"void",
"start",
"(",
"List",
"<",
"ValidationMessage",
">",
"errors",
",",
"WrapperElement",
"resource",
",",
"WrapperElement",
"element",
",",
"StructureDefinition",
"profile",
",",
"NodeStack",
"stack",
")",
"throws",
"FHIRException",
"{",
"// profile ... | the instance validator had no issues against the base resource profile | [
"the",
"instance",
"validator",
"had",
"no",
"issues",
"against",
"the",
"base",
"resource",
"profile"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-validation/src/main/java/org/hl7/fhir/instance/validation/InstanceValidator.java#L1251-L1265 |
22,529 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.create | @POST
public Response create(final String resource)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.POST, RestOperationTypeEnum.CREATE).resource(resource));
} | java | @POST
public Response create(final String resource)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.POST, RestOperationTypeEnum.CREATE).resource(resource));
} | [
"@",
"POST",
"public",
"Response",
"create",
"(",
"final",
"String",
"resource",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getResourceRequest",
"(",
"RequestTypeEnum",
".",
"POST",
",",
"RestOperationTypeEnum",
".",
"CREATE",
")",
".",
"resou... | Create a new resource with a server assigned id
@param resource the body of the post method containing resource being created in a xml/json form
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#create">https://www.hl7. org/fhir/http.html#create</a> | [
"Create",
"a",
"new",
"resource",
"with",
"a",
"server",
"assigned",
"id"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L131-L135 |
22,530 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.conditionalUpdate | @PUT
public Response conditionalUpdate(final String resource)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.PUT, RestOperationTypeEnum.UPDATE).resource(resource));
} | java | @PUT
public Response conditionalUpdate(final String resource)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.PUT, RestOperationTypeEnum.UPDATE).resource(resource));
} | [
"@",
"PUT",
"public",
"Response",
"conditionalUpdate",
"(",
"final",
"String",
"resource",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getResourceRequest",
"(",
"RequestTypeEnum",
".",
"PUT",
",",
"RestOperationTypeEnum",
".",
"UPDATE",
")",
".",... | Update an existing resource based on the given condition
@param resource the body contents for the put method
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#update">https://www.hl7.org/fhir/http.html#update</a> | [
"Update",
"an",
"existing",
"resource",
"based",
"on",
"the",
"given",
"condition"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L168-L172 |
22,531 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.delete | @DELETE
public Response delete()
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.DELETE, RestOperationTypeEnum.DELETE));
} | java | @DELETE
public Response delete()
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.DELETE, RestOperationTypeEnum.DELETE));
} | [
"@",
"DELETE",
"public",
"Response",
"delete",
"(",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getResourceRequest",
"(",
"RequestTypeEnum",
".",
"DELETE",
",",
"RestOperationTypeEnum",
".",
"DELETE",
")",
")",
";",
"}"
] | Delete a resource based on the given condition
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#delete">https://www.hl7.org/fhir/http.html#delete</a> | [
"Delete",
"a",
"resource",
"based",
"on",
"the",
"given",
"condition"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L195-L199 |
22,532 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.delete | @DELETE
@Path("/{id}")
public Response delete(@PathParam("id") final String id)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.DELETE, RestOperationTypeEnum.DELETE).id(id));
} | java | @DELETE
@Path("/{id}")
public Response delete(@PathParam("id") final String id)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.DELETE, RestOperationTypeEnum.DELETE).id(id));
} | [
"@",
"DELETE",
"@",
"Path",
"(",
"\"/{id}\"",
")",
"public",
"Response",
"delete",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"final",
"String",
"id",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getResourceRequest",
"(",
"RequestTypeEnum",
... | Delete a resource
@param id the id of the resource to delete
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#delete">https://www.hl7.org/fhir/http.html#delete</a> | [
"Delete",
"a",
"resource"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L208-L213 |
22,533 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.find | @GET
@Path("/{id}")
public Response find(@PathParam("id") final String id)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.READ).id(id));
} | java | @GET
@Path("/{id}")
public Response find(@PathParam("id") final String id)
throws IOException {
return execute(getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.READ).id(id));
} | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{id}\"",
")",
"public",
"Response",
"find",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"final",
"String",
"id",
")",
"throws",
"IOException",
"{",
"return",
"execute",
"(",
"getResourceRequest",
"(",
"RequestTypeEnum",
".",
... | Read the current state of the resource
@param id the id of the resource to read
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#read">https://www.hl7.org/fhir/http.html#read</a> | [
"Read",
"the",
"current",
"state",
"of",
"the",
"resource"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L222-L227 |
22,534 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.customOperation | protected Response customOperation(final String resource, final RequestTypeEnum requestType, final String id,
final String operationName, final RestOperationTypeEnum operationType)
throws IOException {
final Builder request = getResourceRequest(requestType, operationType).resource(resour... | java | protected Response customOperation(final String resource, final RequestTypeEnum requestType, final String id,
final String operationName, final RestOperationTypeEnum operationType)
throws IOException {
final Builder request = getResourceRequest(requestType, operationType).resource(resour... | [
"protected",
"Response",
"customOperation",
"(",
"final",
"String",
"resource",
",",
"final",
"RequestTypeEnum",
"requestType",
",",
"final",
"String",
"id",
",",
"final",
"String",
"operationName",
",",
"final",
"RestOperationTypeEnum",
"operationType",
")",
"throws"... | Execute a custom operation
@param resource the resource to create
@param requestType the type of request
@param id the id of the resource on which to perform the operation
@param operationName the name of the operation to execute
@param operationType the rest operation type
@return the response
@see <a href="https://w... | [
"Execute",
"a",
"custom",
"operation"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L240-L245 |
22,535 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.findHistory | @GET
@Path("/{id}/_history/{version}")
public Response findHistory(@PathParam("id") final String id, @PathParam("version") final String version)
throws IOException {
final Builder theRequest = getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.VREAD).id(id).version(version);
... | java | @GET
@Path("/{id}/_history/{version}")
public Response findHistory(@PathParam("id") final String id, @PathParam("version") final String version)
throws IOException {
final Builder theRequest = getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.VREAD).id(id).version(version);
... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{id}/_history/{version}\"",
")",
"public",
"Response",
"findHistory",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"final",
"String",
"id",
",",
"@",
"PathParam",
"(",
"\"version\"",
")",
"final",
"String",
"version",
")",
"th... | Retrieve the update history for a particular resource
@param id the id of the resource
@param version the version of the resource
@return the response
@see <a href="https://www.hl7.org/fhir/http.html#history">https://www.hl7.org/fhir/http.html#history</a> | [
"Retrieve",
"the",
"update",
"history",
"for",
"a",
"particular",
"resource"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L255-L261 |
22,536 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.findCompartment | @GET
@Path("/{id}/{compartment}")
public Response findCompartment(@PathParam("id") final String id, @PathParam("compartment") final String compartment)
throws IOException {
final Builder theRequest = getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.SEARCH_TYPE).id(id).compartmen... | java | @GET
@Path("/{id}/{compartment}")
public Response findCompartment(@PathParam("id") final String id, @PathParam("compartment") final String compartment)
throws IOException {
final Builder theRequest = getResourceRequest(RequestTypeEnum.GET, RestOperationTypeEnum.SEARCH_TYPE).id(id).compartmen... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/{id}/{compartment}\"",
")",
"public",
"Response",
"findCompartment",
"(",
"@",
"PathParam",
"(",
"\"id\"",
")",
"final",
"String",
"id",
",",
"@",
"PathParam",
"(",
"\"compartment\"",
")",
"final",
"String",
"compartment",
")"... | Compartment Based Access
@param id the resource to which the compartment belongs
@param compartment the compartment
@return the repsonse
@see <a href="https://www.hl7.org/fhir/http.html#search">https://www.hl7.org/fhir/http.html#search</a>
@see <a href="https://www.hl7.org/fhir/compartments.html#compartment">https://w... | [
"Compartment",
"Based",
"Access"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L272-L279 |
22,537 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.execute | private Response execute(final Builder theRequestBuilder, final String methodKey)
throws IOException {
final JaxRsRequest theRequest = theRequestBuilder.build();
final BaseMethodBinding<?> method = getBinding(theRequest.getRestOperationType(), methodKey);
try {
return (Re... | java | private Response execute(final Builder theRequestBuilder, final String methodKey)
throws IOException {
final JaxRsRequest theRequest = theRequestBuilder.build();
final BaseMethodBinding<?> method = getBinding(theRequest.getRestOperationType(), methodKey);
try {
return (Re... | [
"private",
"Response",
"execute",
"(",
"final",
"Builder",
"theRequestBuilder",
",",
"final",
"String",
"methodKey",
")",
"throws",
"IOException",
"{",
"final",
"JaxRsRequest",
"theRequest",
"=",
"theRequestBuilder",
".",
"build",
"(",
")",
";",
"final",
"BaseMeth... | Execute the method described by the requestBuilder and methodKey
@param theRequestBuilder the requestBuilder that contains the information about the request
@param methodKey the key determining the method to be executed
@return the response | [
"Execute",
"the",
"method",
"described",
"by",
"the",
"requestBuilder",
"and",
"methodKey"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L294-L304 |
22,538 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.getBinding | protected BaseMethodBinding<?> getBinding(final RestOperationTypeEnum restOperation, final String theBindingKey) {
return getBindings().getBinding(restOperation, theBindingKey);
} | java | protected BaseMethodBinding<?> getBinding(final RestOperationTypeEnum restOperation, final String theBindingKey) {
return getBindings().getBinding(restOperation, theBindingKey);
} | [
"protected",
"BaseMethodBinding",
"<",
"?",
">",
"getBinding",
"(",
"final",
"RestOperationTypeEnum",
"restOperation",
",",
"final",
"String",
"theBindingKey",
")",
"{",
"return",
"getBindings",
"(",
")",
".",
"getBinding",
"(",
"restOperation",
",",
"theBindingKey"... | Return the method binding for the given rest operation
@param restOperation the rest operation to retrieve
@param theBindingKey the key determining the method to be executed (needed for e.g. custom operation)
@return | [
"Return",
"the",
"method",
"binding",
"for",
"the",
"given",
"rest",
"operation"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L324-L326 |
22,539 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java | AbstractJaxRsResourceProvider.getResourceRequest | private Builder getResourceRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
return getRequest(requestType, restOperation, getResourceType().getSimpleName());
} | java | private Builder getResourceRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
return getRequest(requestType, restOperation, getResourceType().getSimpleName());
} | [
"private",
"Builder",
"getResourceRequest",
"(",
"final",
"RequestTypeEnum",
"requestType",
",",
"final",
"RestOperationTypeEnum",
"restOperation",
")",
"{",
"return",
"getRequest",
"(",
"requestType",
",",
"restOperation",
",",
"getResourceType",
"(",
")",
".",
"getS... | Return the request builder based on the resource name for the server
@param requestType the type of the request
@param restOperation the rest operation type
@return the requestbuilder | [
"Return",
"the",
"request",
"builder",
"based",
"on",
"the",
"resource",
"name",
"for",
"the",
"server"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsResourceProvider.java#L371-L373 |
22,540 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java | Delimiters.reset | public void reset () {
fieldDelimiter = DEFAULT_DELIMITER_FIELD;
componentDelimiter = DEFAULT_DELIMITER_COMPONENT;
subComponentDelimiter = DEFAULT_DELIMITER_SUBCOMPONENT;
repetitionDelimiter = DEFAULT_DELIMITER_REPETITION;
escapeCharacter = DEFAULT_CHARACTER_ESCAPE;
} | java | public void reset () {
fieldDelimiter = DEFAULT_DELIMITER_FIELD;
componentDelimiter = DEFAULT_DELIMITER_COMPONENT;
subComponentDelimiter = DEFAULT_DELIMITER_SUBCOMPONENT;
repetitionDelimiter = DEFAULT_DELIMITER_REPETITION;
escapeCharacter = DEFAULT_CHARACTER_ESCAPE;
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"fieldDelimiter",
"=",
"DEFAULT_DELIMITER_FIELD",
";",
"componentDelimiter",
"=",
"DEFAULT_DELIMITER_COMPONENT",
";",
"subComponentDelimiter",
"=",
"DEFAULT_DELIMITER_SUBCOMPONENT",
";",
"repetitionDelimiter",
"=",
"DEFAULT_DELIMITER_... | reset to default HL7 values | [
"reset",
"to",
"default",
"HL7",
"values"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java#L188-L194 |
22,541 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java | Delimiters.check | public void check() throws FHIRException {
rule(componentDelimiter != fieldDelimiter, "Delimiter Error: \""+componentDelimiter+"\" is used for both CPComponent and CPField");
rule(subComponentDelimiter != fieldDelimiter, "Delimiter Error: \""+subComponentDelimiter+"\" is used for both CPSubComponent a... | java | public void check() throws FHIRException {
rule(componentDelimiter != fieldDelimiter, "Delimiter Error: \""+componentDelimiter+"\" is used for both CPComponent and CPField");
rule(subComponentDelimiter != fieldDelimiter, "Delimiter Error: \""+subComponentDelimiter+"\" is used for both CPSubComponent a... | [
"public",
"void",
"check",
"(",
")",
"throws",
"FHIRException",
"{",
"rule",
"(",
"componentDelimiter",
"!=",
"fieldDelimiter",
",",
"\"Delimiter Error: \\\"\"",
"+",
"componentDelimiter",
"+",
"\"\\\" is used for both CPComponent and CPField\"",
")",
";",
"rule",
"(",
... | check that the delimiters are valid
@throws FHIRException | [
"check",
"that",
"the",
"delimiters",
"are",
"valid"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java#L201-L212 |
22,542 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java | Delimiters.getEscape | public String getEscape(char ch) {
if (ch == escapeCharacter)
return escapeCharacter + "E" + escapeCharacter;
else if (ch == fieldDelimiter)
return escapeCharacter + "F" + escapeCharacter;
else if (ch == componentDelimiter)
return escapeCharacter + "S" + escapeCharacter;
... | java | public String getEscape(char ch) {
if (ch == escapeCharacter)
return escapeCharacter + "E" + escapeCharacter;
else if (ch == fieldDelimiter)
return escapeCharacter + "F" + escapeCharacter;
else if (ch == componentDelimiter)
return escapeCharacter + "S" + escapeCharacter;
... | [
"public",
"String",
"getEscape",
"(",
"char",
"ch",
")",
"{",
"if",
"(",
"ch",
"==",
"escapeCharacter",
")",
"return",
"escapeCharacter",
"+",
"\"E\"",
"+",
"escapeCharacter",
";",
"else",
"if",
"(",
"ch",
"==",
"fieldDelimiter",
")",
"return",
"escapeCharac... | get the escape for a character
@param ch
@return | [
"get",
"the",
"escape",
"for",
"a",
"character"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java#L237-L250 |
22,543 | jamesagnew/hapi-fhir | hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java | Delimiters.getDelimiterEscapeChar | public char getDelimiterEscapeChar(char ch) throws DefinitionException {
if (ch == 'E')
return escapeCharacter;
else if (ch == 'F')
return fieldDelimiter;
else if (ch == 'S')
return componentDelimiter;
else if (ch == 'T')
return subComponentDelimiter;
... | java | public char getDelimiterEscapeChar(char ch) throws DefinitionException {
if (ch == 'E')
return escapeCharacter;
else if (ch == 'F')
return fieldDelimiter;
else if (ch == 'S')
return componentDelimiter;
else if (ch == 'T')
return subComponentDelimiter;
... | [
"public",
"char",
"getDelimiterEscapeChar",
"(",
"char",
"ch",
")",
"throws",
"DefinitionException",
"{",
"if",
"(",
"ch",
"==",
"'",
"'",
")",
"return",
"escapeCharacter",
";",
"else",
"if",
"(",
"ch",
"==",
"'",
"'",
")",
"return",
"fieldDelimiter",
";",... | get escape for ch in an escape
@param ch
@return
@throws DefinitionException
@throws FHIRException | [
"get",
"escape",
"for",
"ch",
"in",
"an",
"escape"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/elementmodel/VerticalBarParser.java#L276-L289 |
22,544 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java | AbstractJaxRsPageProvider.getPages | @GET
public Response getPages(@QueryParam(Constants.PARAM_PAGINGACTION) String thePageId) throws IOException {
JaxRsRequest theRequest = getRequest(RequestTypeEnum.GET, RestOperationTypeEnum.GET_PAGE).build();
try {
return (Response) myBinding.invokeServer(this, theRequest);
} catch (JaxRsResponseException th... | java | @GET
public Response getPages(@QueryParam(Constants.PARAM_PAGINGACTION) String thePageId) throws IOException {
JaxRsRequest theRequest = getRequest(RequestTypeEnum.GET, RestOperationTypeEnum.GET_PAGE).build();
try {
return (Response) myBinding.invokeServer(this, theRequest);
} catch (JaxRsResponseException th... | [
"@",
"GET",
"public",
"Response",
"getPages",
"(",
"@",
"QueryParam",
"(",
"Constants",
".",
"PARAM_PAGINGACTION",
")",
"String",
"thePageId",
")",
"throws",
"IOException",
"{",
"JaxRsRequest",
"theRequest",
"=",
"getRequest",
"(",
"RequestTypeEnum",
".",
"GET",
... | This method implements the "getpages" action | [
"This",
"method",
"implements",
"the",
"getpages",
"action"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsPageProvider.java#L88-L96 |
22,545 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java | BundleUtil.toListOfResourcesOfType | @SuppressWarnings("unchecked")
public static <T extends IBaseResource> List<T> toListOfResourcesOfType(FhirContext theContext, IBaseBundle theBundle, Class<T> theTypeToInclude) {
Objects.requireNonNull(theTypeToInclude, "ResourceType must not be null");
List<T> retVal = new ArrayList<>();
RuntimeResourceDefinit... | java | @SuppressWarnings("unchecked")
public static <T extends IBaseResource> List<T> toListOfResourcesOfType(FhirContext theContext, IBaseBundle theBundle, Class<T> theTypeToInclude) {
Objects.requireNonNull(theTypeToInclude, "ResourceType must not be null");
List<T> retVal = new ArrayList<>();
RuntimeResourceDefinit... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
"extends",
"IBaseResource",
">",
"List",
"<",
"T",
">",
"toListOfResourcesOfType",
"(",
"FhirContext",
"theContext",
",",
"IBaseBundle",
"theBundle",
",",
"Class",
"<",
"T",
">",
... | Extract all of the resources of a given type from a given bundle | [
"Extract",
"all",
"of",
"the",
"resources",
"of",
"a",
"given",
"type",
"from",
"a",
"given",
"bundle"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/BundleUtil.java#L199-L218 |
22,546 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java | SearchParameterMap.isAllParametersHaveNoModifier | public boolean isAllParametersHaveNoModifier() {
for (List<List<IQueryParameterType>> nextParamName : values()) {
for (List<IQueryParameterType> nextAnd : nextParamName) {
for (IQueryParameterType nextOr : nextAnd) {
if (isNotBlank(nextOr.getQueryParameterQualifier())) {
return false;
}
}
... | java | public boolean isAllParametersHaveNoModifier() {
for (List<List<IQueryParameterType>> nextParamName : values()) {
for (List<IQueryParameterType> nextAnd : nextParamName) {
for (IQueryParameterType nextOr : nextAnd) {
if (isNotBlank(nextOr.getQueryParameterQualifier())) {
return false;
}
}
... | [
"public",
"boolean",
"isAllParametersHaveNoModifier",
"(",
")",
"{",
"for",
"(",
"List",
"<",
"List",
"<",
"IQueryParameterType",
">",
">",
"nextParamName",
":",
"values",
"(",
")",
")",
"{",
"for",
"(",
"List",
"<",
"IQueryParameterType",
">",
"nextAnd",
":... | This will only return true if all parameters have no modifier of any kind | [
"This",
"will",
"only",
"return",
"true",
"if",
"all",
"parameters",
"have",
"no",
"modifier",
"of",
"any",
"kind"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/SearchParameterMap.java#L274-L285 |
22,547 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java | DateRangeParam.setLowerBoundInclusive | public DateRangeParam setLowerBoundInclusive(Date theLowerBound) {
validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound);
return this;
} | java | public DateRangeParam setLowerBoundInclusive(Date theLowerBound) {
validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound);
return this;
} | [
"public",
"DateRangeParam",
"setLowerBoundInclusive",
"(",
"Date",
"theLowerBound",
")",
"{",
"validateAndSet",
"(",
"new",
"DateParam",
"(",
"ParamPrefixEnum",
".",
"GREATERTHAN_OR_EQUALS",
",",
"theLowerBound",
")",
",",
"myUpperBound",
")",
";",
"return",
"this",
... | Sets the lower bound to be greaterthan or equal to the given date | [
"Sets",
"the",
"lower",
"bound",
"to",
"be",
"greaterthan",
"or",
"equal",
"to",
"the",
"given",
"date"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L227-L230 |
22,548 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java | DateRangeParam.setUpperBoundInclusive | public DateRangeParam setUpperBoundInclusive(Date theUpperBound) {
validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound));
return this;
} | java | public DateRangeParam setUpperBoundInclusive(Date theUpperBound) {
validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN_OR_EQUALS, theUpperBound));
return this;
} | [
"public",
"DateRangeParam",
"setUpperBoundInclusive",
"(",
"Date",
"theUpperBound",
")",
"{",
"validateAndSet",
"(",
"myLowerBound",
",",
"new",
"DateParam",
"(",
"ParamPrefixEnum",
".",
"LESSTHAN_OR_EQUALS",
",",
"theUpperBound",
")",
")",
";",
"return",
"this",
";... | Sets the upper bound to be greaterthan or equal to the given date | [
"Sets",
"the",
"upper",
"bound",
"to",
"be",
"greaterthan",
"or",
"equal",
"to",
"the",
"given",
"date"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L235-L238 |
22,549 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java | DateRangeParam.setLowerBoundExclusive | public DateRangeParam setLowerBoundExclusive(Date theLowerBound) {
validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN, theLowerBound), myUpperBound);
return this;
} | java | public DateRangeParam setLowerBoundExclusive(Date theLowerBound) {
validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN, theLowerBound), myUpperBound);
return this;
} | [
"public",
"DateRangeParam",
"setLowerBoundExclusive",
"(",
"Date",
"theLowerBound",
")",
"{",
"validateAndSet",
"(",
"new",
"DateParam",
"(",
"ParamPrefixEnum",
".",
"GREATERTHAN",
",",
"theLowerBound",
")",
",",
"myUpperBound",
")",
";",
"return",
"this",
";",
"}... | Sets the lower bound to be greaterthan to the given date | [
"Sets",
"the",
"lower",
"bound",
"to",
"be",
"greaterthan",
"to",
"the",
"given",
"date"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L244-L247 |
22,550 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java | DateRangeParam.setUpperBoundExclusive | public DateRangeParam setUpperBoundExclusive(Date theUpperBound) {
validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN, theUpperBound));
return this;
} | java | public DateRangeParam setUpperBoundExclusive(Date theUpperBound) {
validateAndSet(myLowerBound, new DateParam(ParamPrefixEnum.LESSTHAN, theUpperBound));
return this;
} | [
"public",
"DateRangeParam",
"setUpperBoundExclusive",
"(",
"Date",
"theUpperBound",
")",
"{",
"validateAndSet",
"(",
"myLowerBound",
",",
"new",
"DateParam",
"(",
"ParamPrefixEnum",
".",
"LESSTHAN",
",",
"theUpperBound",
")",
")",
";",
"return",
"this",
";",
"}"
] | Sets the upper bound to be greaterthan to the given date | [
"Sets",
"the",
"upper",
"bound",
"to",
"be",
"greaterthan",
"to",
"the",
"given",
"date"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L252-L255 |
22,551 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java | DateRangeParam.setRangeFromDatesInclusive | public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) {
IPrimitiveType<Date> lowerBound = theLowerBound;
IPrimitiveType<Date> upperBound = theUpperBound;
if (lowerBound != null && lowerBound.getValue() != null && upperBound != null && upperBound.getValue() ... | java | public void setRangeFromDatesInclusive(IPrimitiveType<Date> theLowerBound, IPrimitiveType<Date> theUpperBound) {
IPrimitiveType<Date> lowerBound = theLowerBound;
IPrimitiveType<Date> upperBound = theUpperBound;
if (lowerBound != null && lowerBound.getValue() != null && upperBound != null && upperBound.getValue() ... | [
"public",
"void",
"setRangeFromDatesInclusive",
"(",
"IPrimitiveType",
"<",
"Date",
">",
"theLowerBound",
",",
"IPrimitiveType",
"<",
"Date",
">",
"theUpperBound",
")",
"{",
"IPrimitiveType",
"<",
"Date",
">",
"lowerBound",
"=",
"theLowerBound",
";",
"IPrimitiveType... | Sets the range from a pair of dates, inclusive on both ends. Note that if
theLowerBound is after theUpperBound, thie method will automatically reverse
the order of the arguments in order to create an inclusive range.
@param theLowerBound A qualified date param representing the lower date bound (optionally may include ... | [
"Sets",
"the",
"range",
"from",
"a",
"pair",
"of",
"dates",
"inclusive",
"on",
"both",
"ends",
".",
"Note",
"that",
"if",
"theLowerBound",
"is",
"after",
"theUpperBound",
"thie",
"method",
"will",
"automatically",
"reverse",
"the",
"order",
"of",
"the",
"arg... | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/DateRangeParam.java#L421-L434 |
22,552 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java | CustomThymeleafNarrativeGenerator.setPropertyFile | public void setPropertyFile(String... thePropertyFile) {
Validate.notNull(thePropertyFile, "Property file can not be null");
myPropertyFile = Arrays.asList(thePropertyFile);
} | java | public void setPropertyFile(String... thePropertyFile) {
Validate.notNull(thePropertyFile, "Property file can not be null");
myPropertyFile = Arrays.asList(thePropertyFile);
} | [
"public",
"void",
"setPropertyFile",
"(",
"String",
"...",
"thePropertyFile",
")",
"{",
"Validate",
".",
"notNull",
"(",
"thePropertyFile",
",",
"\"Property file can not be null\"",
")",
";",
"myPropertyFile",
"=",
"Arrays",
".",
"asList",
"(",
"thePropertyFile",
")... | Set the property file to use
@param thePropertyFile
The name of the property file, in one of the following formats:
<ul>
<li>file:/path/to/file/file.properties</li>
<li>classpath:/com/package/file.properties</li>
</ul> | [
"Set",
"the",
"property",
"file",
"to",
"use"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/CustomThymeleafNarrativeGenerator.java#L57-L60 |
22,553 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java | UrlUtil.constructAbsoluteUrl | public static String constructAbsoluteUrl(String theBase, String theEndpoint) {
if (theEndpoint == null) {
return null;
}
if (isAbsolute(theEndpoint)) {
return theEndpoint;
}
if (theBase == null) {
return theEndpoint;
}
try {
return new URL(new URL(theBase), theEndpoint).toString();
} catch... | java | public static String constructAbsoluteUrl(String theBase, String theEndpoint) {
if (theEndpoint == null) {
return null;
}
if (isAbsolute(theEndpoint)) {
return theEndpoint;
}
if (theBase == null) {
return theEndpoint;
}
try {
return new URL(new URL(theBase), theEndpoint).toString();
} catch... | [
"public",
"static",
"String",
"constructAbsoluteUrl",
"(",
"String",
"theBase",
",",
"String",
"theEndpoint",
")",
"{",
"if",
"(",
"theEndpoint",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"isAbsolute",
"(",
"theEndpoint",
")",
")",
"{"... | Resolve a relative URL - THIS METHOD WILL NOT FAIL but will log a warning and return theEndpoint if the input is invalid. | [
"Resolve",
"a",
"relative",
"URL",
"-",
"THIS",
"METHOD",
"WILL",
"NOT",
"FAIL",
"but",
"will",
"log",
"a",
"warning",
"and",
"return",
"theEndpoint",
"if",
"the",
"input",
"is",
"invalid",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java#L53-L70 |
22,554 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java | UrlUtil.sanitizeUrlPart | public static String sanitizeUrlPart(String theString) {
if (theString == null) {
return null;
}
boolean needsSanitization = isNeedsSanitization(theString);
if (needsSanitization) {
// Ok, we're sanitizing
StringBuilder buffer = new StringBuilder(theString.length() + 10);
for (int j = 0; j < theSt... | java | public static String sanitizeUrlPart(String theString) {
if (theString == null) {
return null;
}
boolean needsSanitization = isNeedsSanitization(theString);
if (needsSanitization) {
// Ok, we're sanitizing
StringBuilder buffer = new StringBuilder(theString.length() + 10);
for (int j = 0; j < theSt... | [
"public",
"static",
"String",
"sanitizeUrlPart",
"(",
"String",
"theString",
")",
"{",
"if",
"(",
"theString",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"boolean",
"needsSanitization",
"=",
"isNeedsSanitization",
"(",
"theString",
")",
";",
"if",
"... | This method specifically HTML-encodes the " and
< characters in order to prevent injection attacks | [
"This",
"method",
"specifically",
"HTML",
"-",
"encodes",
"the",
""",
";",
"and",
"<",
";",
"characters",
"in",
"order",
"to",
"prevent",
"injection",
"attacks"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/UrlUtil.java#L305-L336 |
22,555 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java | TokenOrListParam.add | public TokenOrListParam add(String theSystem, String theValue) {
add(new TokenParam(theSystem, theValue));
return this;
} | java | public TokenOrListParam add(String theSystem, String theValue) {
add(new TokenParam(theSystem, theValue));
return this;
} | [
"public",
"TokenOrListParam",
"add",
"(",
"String",
"theSystem",
",",
"String",
"theValue",
")",
"{",
"add",
"(",
"new",
"TokenParam",
"(",
"theSystem",
",",
"theValue",
")",
")",
";",
"return",
"this",
";",
"}"
] | Add a new token to this list
@param theSystem
The system to use for the one token to pre-populate in this list | [
"Add",
"a",
"new",
"token",
"to",
"this",
"list"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TokenOrListParam.java#L75-L78 |
22,556 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PortUtil.java | PortUtil.isAvailable | private static boolean isAvailable(int thePort) {
ourLog.info("Testing a bind on thePort {}", thePort);
try (ServerSocket ss = new ServerSocket()) {
ss.setReuseAddress(true);
ss.bind(new InetSocketAddress("0.0.0.0", thePort));
try (DatagramSocket ds = new DatagramSocket()) {
ds.setReuseAddress(true);
... | java | private static boolean isAvailable(int thePort) {
ourLog.info("Testing a bind on thePort {}", thePort);
try (ServerSocket ss = new ServerSocket()) {
ss.setReuseAddress(true);
ss.bind(new InetSocketAddress("0.0.0.0", thePort));
try (DatagramSocket ds = new DatagramSocket()) {
ds.setReuseAddress(true);
... | [
"private",
"static",
"boolean",
"isAvailable",
"(",
"int",
"thePort",
")",
"{",
"ourLog",
".",
"info",
"(",
"\"Testing a bind on thePort {}\"",
",",
"thePort",
")",
";",
"try",
"(",
"ServerSocket",
"ss",
"=",
"new",
"ServerSocket",
"(",
")",
")",
"{",
"ss",
... | This method checks if we are able to bind a given port to both
0.0.0.0 and localhost in order to be sure it's truly available. | [
"This",
"method",
"checks",
"if",
"we",
"are",
"able",
"to",
"bind",
"a",
"given",
"port",
"to",
"both",
"0",
".",
"0",
".",
"0",
".",
"0",
"and",
"localhost",
"in",
"order",
"to",
"be",
"sure",
"it",
"s",
"truly",
"available",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PortUtil.java#L192-L219 |
22,557 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java | RuntimeResourceDefinition.getSearchParamsForCompartmentName | public List<RuntimeSearchParam> getSearchParamsForCompartmentName(String theCompartmentName) {
validateSealed();
List<RuntimeSearchParam> retVal = myCompartmentNameToSearchParams.get(theCompartmentName);
if (retVal == null) {
return Collections.emptyList();
}
return retVal;
} | java | public List<RuntimeSearchParam> getSearchParamsForCompartmentName(String theCompartmentName) {
validateSealed();
List<RuntimeSearchParam> retVal = myCompartmentNameToSearchParams.get(theCompartmentName);
if (retVal == null) {
return Collections.emptyList();
}
return retVal;
} | [
"public",
"List",
"<",
"RuntimeSearchParam",
">",
"getSearchParamsForCompartmentName",
"(",
"String",
"theCompartmentName",
")",
"{",
"validateSealed",
"(",
")",
";",
"List",
"<",
"RuntimeSearchParam",
">",
"retVal",
"=",
"myCompartmentNameToSearchParams",
".",
"get",
... | Will not return null | [
"Will",
"not",
"return",
"null"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java#L155-L162 |
22,558 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/XmlParserBase.java | XmlParserBase.parse | @Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
try {
XmlPullParser xpp = loadXml(input);
return parse(xpp);
} catch (XmlPullParserException e) {
throw new FHIRFormatError(e.getMessage(), e);
}
} | java | @Override
public Resource parse(InputStream input) throws IOException, FHIRFormatError {
try {
XmlPullParser xpp = loadXml(input);
return parse(xpp);
} catch (XmlPullParserException e) {
throw new FHIRFormatError(e.getMessage(), e);
}
} | [
"@",
"Override",
"public",
"Resource",
"parse",
"(",
"InputStream",
"input",
")",
"throws",
"IOException",
",",
"FHIRFormatError",
"{",
"try",
"{",
"XmlPullParser",
"xpp",
"=",
"loadXml",
"(",
"input",
")",
";",
"return",
"parse",
"(",
"xpp",
")",
";",
"}"... | Parse content that is known to be a resource
@ | [
"Parse",
"content",
"that",
"is",
"known",
"to",
"be",
"a",
"resource"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/XmlParserBase.java#L84-L92 |
22,559 | jamesagnew/hapi-fhir | hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/XmlParserBase.java | XmlParserBase.parse | public Resource parse(XmlPullParser xpp) throws IOException, FHIRFormatError, XmlPullParserException {
if (xpp.getNamespace() == null)
throw new FHIRFormatError("This does not appear to be a FHIR resource (no namespace '"+xpp.getNamespace()+"') (@ /) "+Integer.toString(xpp.getEventType()));
if (!xpp.getNames... | java | public Resource parse(XmlPullParser xpp) throws IOException, FHIRFormatError, XmlPullParserException {
if (xpp.getNamespace() == null)
throw new FHIRFormatError("This does not appear to be a FHIR resource (no namespace '"+xpp.getNamespace()+"') (@ /) "+Integer.toString(xpp.getEventType()));
if (!xpp.getNames... | [
"public",
"Resource",
"parse",
"(",
"XmlPullParser",
"xpp",
")",
"throws",
"IOException",
",",
"FHIRFormatError",
",",
"XmlPullParserException",
"{",
"if",
"(",
"xpp",
".",
"getNamespace",
"(",
")",
"==",
"null",
")",
"throw",
"new",
"FHIRFormatError",
"(",
"\... | parse xml that is known to be a resource, and that is already being read by an XML Pull Parser
This is if a resource is in a bigger piece of XML.
@ | [
"parse",
"xml",
"that",
"is",
"known",
"to",
"be",
"a",
"resource",
"and",
"that",
"is",
"already",
"being",
"read",
"by",
"an",
"XML",
"Pull",
"Parser",
"This",
"is",
"if",
"a",
"resource",
"is",
"in",
"a",
"bigger",
"piece",
"of",
"XML",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/formats/XmlParserBase.java#L99-L105 |
22,560 | jamesagnew/hapi-fhir | hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/DefaultEnableWhenEvaluator.java | DefaultEnableWhenEvaluator.findQuestionAnswers | private List<Element> findQuestionAnswers(Element questionnaireResponse, String question) {
List<Element> retVal = new ArrayList<>();
List<Element> items = questionnaireResponse.getChildren(ITEM_ELEMENT);
for (Element next : items) {
if (hasLinkId(next, question)) {
List<Element> answers = extractAnsw... | java | private List<Element> findQuestionAnswers(Element questionnaireResponse, String question) {
List<Element> retVal = new ArrayList<>();
List<Element> items = questionnaireResponse.getChildren(ITEM_ELEMENT);
for (Element next : items) {
if (hasLinkId(next, question)) {
List<Element> answers = extractAnsw... | [
"private",
"List",
"<",
"Element",
">",
"findQuestionAnswers",
"(",
"Element",
"questionnaireResponse",
",",
"String",
"question",
")",
"{",
"List",
"<",
"Element",
">",
"retVal",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"<",
"Element",
">",
"... | Recursively look for answers to questions with the given link id | [
"Recursively",
"look",
"for",
"answers",
"to",
"questions",
"with",
"the",
"given",
"link",
"id"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-validation/src/main/java/org/hl7/fhir/r4/validation/DefaultEnableWhenEvaluator.java#L161-L174 |
22,561 | jamesagnew/hapi-fhir | hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java | SubscriptionDeliveringRestHookSubscriber.sendNotification | protected void sendNotification(ResourceDeliveryMessage theMsg) {
Map<String, List<String>> params = new HashMap<>();
List<Header> headers = new ArrayList<>();
if (theMsg.getSubscription().getHeaders() != null) {
theMsg.getSubscription().getHeaders().stream().filter(Objects::nonNull).forEach(h -> {
final i... | java | protected void sendNotification(ResourceDeliveryMessage theMsg) {
Map<String, List<String>> params = new HashMap<>();
List<Header> headers = new ArrayList<>();
if (theMsg.getSubscription().getHeaders() != null) {
theMsg.getSubscription().getHeaders().stream().filter(Objects::nonNull).forEach(h -> {
final i... | [
"protected",
"void",
"sendNotification",
"(",
"ResourceDeliveryMessage",
"theMsg",
")",
"{",
"Map",
"<",
"String",
",",
"List",
"<",
"String",
">",
">",
"params",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"List",
"<",
"Header",
">",
"headers",
"=",
"ne... | Sends a POST notification without a payload | [
"Sends",
"a",
"POST",
"notification",
"without",
"a",
"payload"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-subscription/src/main/java/ca/uhn/fhir/jpa/subscription/module/subscriber/SubscriptionDeliveringRestHookSubscriber.java#L193-L221 |
22,562 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java | InterceptorService.getInvokersForPointcut | private List<BaseInvoker> getInvokersForPointcut(Pointcut thePointcut) {
List<BaseInvoker> invokers;
synchronized (myRegistryMutex) {
List<BaseInvoker> globalInvokers = myGlobalInvokers.get(thePointcut);
List<BaseInvoker> anonymousInvokers = myAnonymousInvokers.get(thePointcut);
List<BaseInvoker> threadLo... | java | private List<BaseInvoker> getInvokersForPointcut(Pointcut thePointcut) {
List<BaseInvoker> invokers;
synchronized (myRegistryMutex) {
List<BaseInvoker> globalInvokers = myGlobalInvokers.get(thePointcut);
List<BaseInvoker> anonymousInvokers = myAnonymousInvokers.get(thePointcut);
List<BaseInvoker> threadLo... | [
"private",
"List",
"<",
"BaseInvoker",
">",
"getInvokersForPointcut",
"(",
"Pointcut",
"thePointcut",
")",
"{",
"List",
"<",
"BaseInvoker",
">",
"invokers",
";",
"synchronized",
"(",
"myRegistryMutex",
")",
"{",
"List",
"<",
"BaseInvoker",
">",
"globalInvokers",
... | Returns an ordered list of invokers for the given pointcut. Note that
a new and stable list is returned to.. do whatever you want with it. | [
"Returns",
"an",
"ordered",
"list",
"of",
"invokers",
"for",
"the",
"given",
"pointcut",
".",
"Note",
"that",
"a",
"new",
"and",
"stable",
"list",
"is",
"returned",
"to",
"..",
"do",
"whatever",
"you",
"want",
"with",
"it",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java#L290-L307 |
22,563 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java | InterceptorService.union | @SafeVarargs
private final List<BaseInvoker> union(List<BaseInvoker>... theInvokersLists) {
List<BaseInvoker> haveOne = null;
boolean haveMultiple = false;
for (List<BaseInvoker> nextInvokerList : theInvokersLists) {
if (nextInvokerList == null || nextInvokerList.isEmpty()) {
continue;
}
if (haveOn... | java | @SafeVarargs
private final List<BaseInvoker> union(List<BaseInvoker>... theInvokersLists) {
List<BaseInvoker> haveOne = null;
boolean haveMultiple = false;
for (List<BaseInvoker> nextInvokerList : theInvokersLists) {
if (nextInvokerList == null || nextInvokerList.isEmpty()) {
continue;
}
if (haveOn... | [
"@",
"SafeVarargs",
"private",
"final",
"List",
"<",
"BaseInvoker",
">",
"union",
"(",
"List",
"<",
"BaseInvoker",
">",
"...",
"theInvokersLists",
")",
"{",
"List",
"<",
"BaseInvoker",
">",
"haveOne",
"=",
"null",
";",
"boolean",
"haveMultiple",
"=",
"false"... | First argument must be the global invoker list!! | [
"First",
"argument",
"must",
"be",
"the",
"global",
"invoker",
"list!!"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java#L312-L357 |
22,564 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java | InterceptorService.haveAppropriateParams | boolean haveAppropriateParams(Pointcut thePointcut, HookParams theParams) {
Validate.isTrue(theParams.getParamsForType().values().size() == thePointcut.getParameterTypes().size(), "Wrong number of params for pointcut %s - Wanted %s but found %s", thePointcut.name(), toErrorString(thePointcut.getParameterTypes()), the... | java | boolean haveAppropriateParams(Pointcut thePointcut, HookParams theParams) {
Validate.isTrue(theParams.getParamsForType().values().size() == thePointcut.getParameterTypes().size(), "Wrong number of params for pointcut %s - Wanted %s but found %s", thePointcut.name(), toErrorString(thePointcut.getParameterTypes()), the... | [
"boolean",
"haveAppropriateParams",
"(",
"Pointcut",
"thePointcut",
",",
"HookParams",
"theParams",
")",
"{",
"Validate",
".",
"isTrue",
"(",
"theParams",
".",
"getParamsForType",
"(",
")",
".",
"values",
"(",
")",
".",
"size",
"(",
")",
"==",
"thePointcut",
... | Only call this when assertions are enabled, it's expensive | [
"Only",
"call",
"this",
"when",
"assertions",
"are",
"enabled",
"it",
"s",
"expensive"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/executor/InterceptorService.java#L362-L377 |
22,565 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java | StopWatch.getEstimatedTimeRemaining | public String getEstimatedTimeRemaining(double theCompleteToDate, double theTotal) {
double millis = getMillis();
long millisRemaining = (long) (((theTotal / theCompleteToDate) * millis) - (millis));
return formatMillis(millisRemaining);
} | java | public String getEstimatedTimeRemaining(double theCompleteToDate, double theTotal) {
double millis = getMillis();
long millisRemaining = (long) (((theTotal / theCompleteToDate) * millis) - (millis));
return formatMillis(millisRemaining);
} | [
"public",
"String",
"getEstimatedTimeRemaining",
"(",
"double",
"theCompleteToDate",
",",
"double",
"theTotal",
")",
"{",
"double",
"millis",
"=",
"getMillis",
"(",
")",
";",
"long",
"millisRemaining",
"=",
"(",
"long",
")",
"(",
"(",
"(",
"theTotal",
"/",
"... | Given an amount of something completed so far, and a total amount, calculates how long it will take for something to complete
@param theCompleteToDate The amount so far
@param theTotal The total (must be higher than theCompleteToDate
@return A formatted amount of time | [
"Given",
"an",
"amount",
"of",
"something",
"completed",
"so",
"far",
"and",
"a",
"total",
"amount",
"calculates",
"how",
"long",
"it",
"will",
"take",
"for",
"something",
"to",
"complete"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java#L180-L184 |
22,566 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java | StopWatch.append | static private void append(StringBuilder tgt, String pfx, int dgt, long val) {
tgt.append(pfx);
if (dgt > 1) {
int pad = (dgt - 1);
for (long xa = val; xa > 9 && pad > 0; xa /= 10) {
pad--;
}
for (int xa = 0; xa < pad; xa++) {
tgt.append('0');
}
}
tgt.append(val);
} | java | static private void append(StringBuilder tgt, String pfx, int dgt, long val) {
tgt.append(pfx);
if (dgt > 1) {
int pad = (dgt - 1);
for (long xa = val; xa > 9 && pad > 0; xa /= 10) {
pad--;
}
for (int xa = 0; xa < pad; xa++) {
tgt.append('0');
}
}
tgt.append(val);
} | [
"static",
"private",
"void",
"append",
"(",
"StringBuilder",
"tgt",
",",
"String",
"pfx",
",",
"int",
"dgt",
",",
"long",
"val",
")",
"{",
"tgt",
".",
"append",
"(",
"pfx",
")",
";",
"if",
"(",
"dgt",
">",
"1",
")",
"{",
"int",
"pad",
"=",
"(",
... | Append a right-aligned and zero-padded numeric value to a `StringBuilder`. | [
"Append",
"a",
"right",
"-",
"aligned",
"and",
"zero",
"-",
"padded",
"numeric",
"value",
"to",
"a",
"StringBuilder",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/StopWatch.java#L327-L339 |
22,567 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java | BaseNarrativeGenerator.cleanWhitespace | public static String cleanWhitespace(String theResult) {
StringBuilder b = new StringBuilder();
boolean inWhitespace = false;
boolean betweenTags = false;
boolean lastNonWhitespaceCharWasTagEnd = false;
boolean inPre = false;
for (int i = 0; i < theResult.length(); i++) {
char nextChar = theResult.charAt... | java | public static String cleanWhitespace(String theResult) {
StringBuilder b = new StringBuilder();
boolean inWhitespace = false;
boolean betweenTags = false;
boolean lastNonWhitespaceCharWasTagEnd = false;
boolean inPre = false;
for (int i = 0; i < theResult.length(); i++) {
char nextChar = theResult.charAt... | [
"public",
"static",
"String",
"cleanWhitespace",
"(",
"String",
"theResult",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"boolean",
"inWhitespace",
"=",
"false",
";",
"boolean",
"betweenTags",
"=",
"false",
";",
"boolean",
"last... | Trims the superfluous whitespace out of an HTML block | [
"Trims",
"the",
"superfluous",
"whitespace",
"out",
"of",
"an",
"HTML",
"block"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/BaseNarrativeGenerator.java#L154-L209 |
22,568 | jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java | AbstractJaxRsConformanceProvider.conformance | @GET
@Path("/metadata")
public Response conformance() throws IOException {
setUpPostConstruct();
Builder request = getRequest(RequestTypeEnum.OPTIONS, RestOperationTypeEnum.METADATA);
IRestfulResponse response = request.build().getResponse();
response.addHeader(Constants.HEADER_CORS_ALLOW_ORIGIN, "*");
... | java | @GET
@Path("/metadata")
public Response conformance() throws IOException {
setUpPostConstruct();
Builder request = getRequest(RequestTypeEnum.OPTIONS, RestOperationTypeEnum.METADATA);
IRestfulResponse response = request.build().getResponse();
response.addHeader(Constants.HEADER_CORS_ALLOW_ORIGIN, "*");
... | [
"@",
"GET",
"@",
"Path",
"(",
"\"/metadata\"",
")",
"public",
"Response",
"conformance",
"(",
")",
"throws",
"IOException",
"{",
"setUpPostConstruct",
"(",
")",
";",
"Builder",
"request",
"=",
"getRequest",
"(",
"RequestTypeEnum",
".",
"OPTIONS",
",",
"RestOpe... | This method will retrieve the conformance using the http GET method
@return the response containing the conformance | [
"This",
"method",
"will",
"retrieve",
"the",
"conformance",
"using",
"the",
"http",
"GET",
"method"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/AbstractJaxRsConformanceProvider.java#L192-L228 |
22,569 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java | BaseParser.shouldEncodePath | protected boolean shouldEncodePath(IResource theResource, String thePath) {
if (myDontEncodeElements != null) {
String resourceName = myContext.getResourceDefinition(theResource).getName();
if (myDontEncodeElements.stream().anyMatch(t -> t.equalsPath(resourceName + "." + thePath))) {
return false;
} else... | java | protected boolean shouldEncodePath(IResource theResource, String thePath) {
if (myDontEncodeElements != null) {
String resourceName = myContext.getResourceDefinition(theResource).getName();
if (myDontEncodeElements.stream().anyMatch(t -> t.equalsPath(resourceName + "." + thePath))) {
return false;
} else... | [
"protected",
"boolean",
"shouldEncodePath",
"(",
"IResource",
"theResource",
",",
"String",
"thePath",
")",
"{",
"if",
"(",
"myDontEncodeElements",
"!=",
"null",
")",
"{",
"String",
"resourceName",
"=",
"myContext",
".",
"getResourceDefinition",
"(",
"theResource",
... | Used for DSTU2 only | [
"Used",
"for",
"DSTU2",
"only"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java#L941-L951 |
22,570 | jamesagnew/hapi-fhir | hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java | CCDAConverter.processAdverseReactionObservation | protected AllergyIntoleranceReactionComponent processAdverseReactionObservation(Element reaction) throws Exception {
checkNoNegationOrNullFlavor(reaction, "Adverse Reaction Observation");
checkNoSubject(reaction, "Adverse Reaction Observation");
// This clinical statement represents an undesired symptom, finding... | java | protected AllergyIntoleranceReactionComponent processAdverseReactionObservation(Element reaction) throws Exception {
checkNoNegationOrNullFlavor(reaction, "Adverse Reaction Observation");
checkNoSubject(reaction, "Adverse Reaction Observation");
// This clinical statement represents an undesired symptom, finding... | [
"protected",
"AllergyIntoleranceReactionComponent",
"processAdverseReactionObservation",
"(",
"Element",
"reaction",
")",
"throws",
"Exception",
"{",
"checkNoNegationOrNullFlavor",
"(",
"reaction",
",",
"\"Adverse Reaction Observation\"",
")",
";",
"checkNoSubject",
"(",
"react... | this is going to be a contained resource, so we aren't going to generate any narrative | [
"this",
"is",
"going",
"to",
"be",
"a",
"contained",
"resource",
"so",
"we",
"aren",
"t",
"going",
"to",
"generate",
"any",
"narrative"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-converter/src/main/java/org/hl7/fhir/convertors/CCDAConverter.java#L836-L874 |
22,571 | jamesagnew/hapi-fhir | hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java | BaseHttpClientInvocation.createHttpRequest | protected IHttpRequest createHttpRequest(String theUrl, EncodingEnum theEncoding, RequestTypeEnum theRequestType) {
IHttpClient httpClient = getRestfulClientFactory().getHttpClient(new StringBuilder(theUrl), null, null, theRequestType, myHeaders);
return httpClient.createGetRequest(getContext(), theEncoding);
} | java | protected IHttpRequest createHttpRequest(String theUrl, EncodingEnum theEncoding, RequestTypeEnum theRequestType) {
IHttpClient httpClient = getRestfulClientFactory().getHttpClient(new StringBuilder(theUrl), null, null, theRequestType, myHeaders);
return httpClient.createGetRequest(getContext(), theEncoding);
} | [
"protected",
"IHttpRequest",
"createHttpRequest",
"(",
"String",
"theUrl",
",",
"EncodingEnum",
"theEncoding",
",",
"RequestTypeEnum",
"theRequestType",
")",
"{",
"IHttpClient",
"httpClient",
"=",
"getRestfulClientFactory",
"(",
")",
".",
"getHttpClient",
"(",
"new",
... | Create an HTTP request for the given url, encoding and request-type
@param theUrl
The complete FHIR url to which the http request will be sent
@param theEncoding
The encoding to use for any serialized content sent to the
server
@param theRequestType
the type of HTTP request (GET, DELETE, ..) | [
"Create",
"an",
"HTTP",
"request",
"for",
"the",
"given",
"url",
"encoding",
"and",
"request",
"-",
"type"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-client/src/main/java/ca/uhn/fhir/rest/client/impl/BaseHttpClientInvocation.java#L75-L78 |
22,572 | jamesagnew/hapi-fhir | restful-server-example/src/main/java/ca/uhn/example/provider/PatientResourceProvider.java | PatientResourceProvider.addNewVersion | private void addNewVersion(Patient thePatient, Long theId) {
InstantDt publishedDate;
if (!myIdToPatientVersions.containsKey(theId)) {
myIdToPatientVersions.put(theId, new LinkedList<Patient>());
publishedDate = InstantDt.withCurrentTime();
} else {
Patient currentPatitne = myIdToPatientVersions.get(theI... | java | private void addNewVersion(Patient thePatient, Long theId) {
InstantDt publishedDate;
if (!myIdToPatientVersions.containsKey(theId)) {
myIdToPatientVersions.put(theId, new LinkedList<Patient>());
publishedDate = InstantDt.withCurrentTime();
} else {
Patient currentPatitne = myIdToPatientVersions.get(theI... | [
"private",
"void",
"addNewVersion",
"(",
"Patient",
"thePatient",
",",
"Long",
"theId",
")",
"{",
"InstantDt",
"publishedDate",
";",
"if",
"(",
"!",
"myIdToPatientVersions",
".",
"containsKey",
"(",
"theId",
")",
")",
"{",
"myIdToPatientVersions",
".",
"put",
... | Stores a new version of the patient in memory so that it can be retrieved later.
@param thePatient
The patient resource to store
@param theId
The ID of the patient to retrieve | [
"Stores",
"a",
"new",
"version",
"of",
"the",
"patient",
"in",
"memory",
"so",
"that",
"it",
"can",
"be",
"retrieved",
"later",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/restful-server-example/src/main/java/ca/uhn/example/provider/PatientResourceProvider.java#L80-L107 |
22,573 | jamesagnew/hapi-fhir | restful-server-example/src/main/java/ca/uhn/example/provider/PatientResourceProvider.java | PatientResourceProvider.validateResource | private void validateResource(Patient thePatient) {
/*
* Our server will have a rule that patients must have a family name or we will reject them
*/
if (thePatient.getNameFirstRep().getFamilyFirstRep().isEmpty()) {
OperationOutcome outcome = new OperationOutcome();
outcome.addIssue().setSeverity(IssueSe... | java | private void validateResource(Patient thePatient) {
/*
* Our server will have a rule that patients must have a family name or we will reject them
*/
if (thePatient.getNameFirstRep().getFamilyFirstRep().isEmpty()) {
OperationOutcome outcome = new OperationOutcome();
outcome.addIssue().setSeverity(IssueSe... | [
"private",
"void",
"validateResource",
"(",
"Patient",
"thePatient",
")",
"{",
"/*\n\t\t * Our server will have a rule that patients must have a family name or we will reject them\n\t\t */",
"if",
"(",
"thePatient",
".",
"getNameFirstRep",
"(",
")",
".",
"getFamilyFirstRep",
"(",... | This method just provides simple business validation for resources we are storing.
@param thePatient
The patient to validate | [
"This",
"method",
"just",
"provides",
"simple",
"business",
"validation",
"for",
"resources",
"we",
"are",
"storing",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/restful-server-example/src/main/java/ca/uhn/example/provider/PatientResourceProvider.java#L254-L263 |
22,574 | jamesagnew/hapi-fhir | examples/src/main/java/example/CompleteExampleClient.java | CompleteExampleClient.main | public static void main(String[] args) throws IOException {
// Create a client factory
FhirContext ctx = FhirContext.forDstu2();
// Create the client
String serverBase = "http://fhir.healthintersections.com.au/open";
ClientInterface client = ctx.newRestfulClient(ClientInterface.class, se... | java | public static void main(String[] args) throws IOException {
// Create a client factory
FhirContext ctx = FhirContext.forDstu2();
// Create the client
String serverBase = "http://fhir.healthintersections.com.au/open";
ClientInterface client = ctx.newRestfulClient(ClientInterface.class, se... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"IOException",
"{",
"// Create a client factory",
"FhirContext",
"ctx",
"=",
"FhirContext",
".",
"forDstu2",
"(",
")",
";",
"// Create the client",
"String",
"serverBase",
"=",
"... | The main method here will directly call an open FHIR server and retrieve a
list of resources matching a given criteria, then load a linked resource. | [
"The",
"main",
"method",
"here",
"will",
"directly",
"call",
"an",
"open",
"FHIR",
"server",
"and",
"retrieve",
"a",
"list",
"of",
"resources",
"matching",
"a",
"given",
"criteria",
"then",
"load",
"a",
"linked",
"resource",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/examples/src/main/java/example/CompleteExampleClient.java#L37-L62 |
22,575 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java | OperationOutcomeUtil.addIssue | public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) {
IBase issue = createIssue(theCtx, theOperationOutcome);
populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode);
} | java | public static void addIssue(FhirContext theCtx, IBaseOperationOutcome theOperationOutcome, String theSeverity, String theDetails, String theLocation, String theCode) {
IBase issue = createIssue(theCtx, theOperationOutcome);
populateDetails(theCtx, issue, theSeverity, theDetails, theLocation, theCode);
} | [
"public",
"static",
"void",
"addIssue",
"(",
"FhirContext",
"theCtx",
",",
"IBaseOperationOutcome",
"theOperationOutcome",
",",
"String",
"theSeverity",
",",
"String",
"theDetails",
",",
"String",
"theLocation",
",",
"String",
"theCode",
")",
"{",
"IBase",
"issue",
... | Add an issue to an OperationOutcome
@param theCtx
The fhir context
@param theOperationOutcome
The OO resource to add to
@param theSeverity
The severity (fatal | error | warning | information)
@param theDetails
The details string
@param theCode | [
"Add",
"an",
"issue",
"to",
"an",
"OperationOutcome"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java#L57-L60 |
22,576 | jamesagnew/hapi-fhir | hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java | OperationOutcomeUtil.hasIssues | public static boolean hasIssues(FhirContext theCtx, IBaseOperationOutcome theOutcome) {
if (theOutcome == null) {
return false;
}
RuntimeResourceDefinition ooDef = theCtx.getResourceDefinition(theOutcome);
BaseRuntimeChildDefinition issueChild = ooDef.getChildByName("issue");
return issueChild.getAccessor(... | java | public static boolean hasIssues(FhirContext theCtx, IBaseOperationOutcome theOutcome) {
if (theOutcome == null) {
return false;
}
RuntimeResourceDefinition ooDef = theCtx.getResourceDefinition(theOutcome);
BaseRuntimeChildDefinition issueChild = ooDef.getChildByName("issue");
return issueChild.getAccessor(... | [
"public",
"static",
"boolean",
"hasIssues",
"(",
"FhirContext",
"theCtx",
",",
"IBaseOperationOutcome",
"theOutcome",
")",
"{",
"if",
"(",
"theOutcome",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"RuntimeResourceDefinition",
"ooDef",
"=",
"theCtx",
"."... | Returns true if the given OperationOutcome has 1 or more Operation.issue repetitions | [
"Returns",
"true",
"if",
"the",
"given",
"OperationOutcome",
"has",
"1",
"or",
"more",
"Operation",
".",
"issue",
"repetitions"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java#L107-L114 |
22,577 | jamesagnew/hapi-fhir | hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BaseNarrative.java | BaseNarrative.setDivAsString | public void setDivAsString(String theString) {
XhtmlNode div;
if (StringUtils.isNotBlank(theString)) {
div = new XhtmlNode();
div.setValueAsString(theString);
} else {
div = null;
}
setDiv(div);
} | java | public void setDivAsString(String theString) {
XhtmlNode div;
if (StringUtils.isNotBlank(theString)) {
div = new XhtmlNode();
div.setValueAsString(theString);
} else {
div = null;
}
setDiv(div);
} | [
"public",
"void",
"setDivAsString",
"(",
"String",
"theString",
")",
"{",
"XhtmlNode",
"div",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"theString",
")",
")",
"{",
"div",
"=",
"new",
"XhtmlNode",
"(",
")",
";",
"div",
".",
"setValueAsString",
... | Sets the value of
@param theString
@throws Exception | [
"Sets",
"the",
"value",
"of"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BaseNarrative.java#L15-L24 |
22,578 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getStringProperty | public String getStringProperty(String pstrSection, String pstrProp)
{
String strRet = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
objProp... | java | public String getStringProperty(String pstrSection, String pstrProp)
{
String strRet = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
objProp... | [
"public",
"String",
"getStringProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
")",
"{",
"String",
"strRet",
"=",
"null",
";",
"INIProperty",
"objProp",
"=",
"null",
";",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISe... | Returns the specified string property from the specified section.
@param pstrSection the INI section name.
@param pstrProp the property to be retrieved.
@return the string property value. | [
"Returns",
"the",
"specified",
"string",
"property",
"from",
"the",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L113-L131 |
22,579 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getIntegerProperty | public Integer getIntegerProperty(String pstrSection, String pstrProp)
{
Integer intRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != n... | java | public Integer getIntegerProperty(String pstrSection, String pstrProp)
{
Integer intRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != n... | [
"public",
"Integer",
"getIntegerProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
")",
"{",
"Integer",
"intRet",
"=",
"null",
";",
"String",
"strVal",
"=",
"null",
";",
"INIProperty",
"objProp",
"=",
"null",
";",
"INISection",
"objSec",
"=",
... | Returns the specified integer property from the specified section.
@param pstrSection the INI section name.
@param pstrProp the property to be retrieved.
@return the integer property value. | [
"Returns",
"the",
"specified",
"integer",
"property",
"from",
"the",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L180-L209 |
22,580 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getLongProperty | public Long getLongProperty(String pstrSection, String pstrProp)
{
Long lngRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
... | java | public Long getLongProperty(String pstrSection, String pstrProp)
{
Long lngRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
... | [
"public",
"Long",
"getLongProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
")",
"{",
"Long",
"lngRet",
"=",
"null",
";",
"String",
"strVal",
"=",
"null",
";",
"INIProperty",
"objProp",
"=",
"null",
";",
"INISection",
"objSec",
"=",
"null",... | Returns the specified long property from the specified section.
@param pstrSection the INI section name.
@param pstrProp the property to be retrieved.
@return the long property value. | [
"Returns",
"the",
"specified",
"long",
"property",
"from",
"the",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L217-L246 |
22,581 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getDoubleProperty | public Double getDoubleProperty(String pstrSection, String pstrProp)
{
Double dblRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != nul... | java | public Double getDoubleProperty(String pstrSection, String pstrProp)
{
Double dblRet = null;
String strVal = null;
INIProperty objProp = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != nul... | [
"public",
"Double",
"getDoubleProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
")",
"{",
"Double",
"dblRet",
"=",
"null",
";",
"String",
"strVal",
"=",
"null",
";",
"INIProperty",
"objProp",
"=",
"null",
";",
"INISection",
"objSec",
"=",
"... | Returns the specified double property from the specified section.
@param pstrSection the INI section name.
@param pstrProp the property to be retrieved.
@return the double property value. | [
"Returns",
"the",
"specified",
"double",
"property",
"from",
"the",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L254-L283 |
22,582 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.addSection | public void addSection(String pstrSection, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstrSection);
this.mhmapSections.put(pstrSection, ob... | java | public void addSection(String pstrSection, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstrSection);
this.mhmapSections.put(pstrSection, ob... | [
"public",
"void",
"addSection",
"(",
"String",
"pstrSection",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mhmapSections",
".",
"get",
"(",
"pstrSection",
")",
";",
... | Sets the comments associated with a section.
@param pstrSection the section name
@param pstrComments the comments. | [
"Sets",
"the",
"comments",
"associated",
"with",
"a",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L379-L391 |
22,583 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setStringProperty | public void setStringProperty(String pstrSection, String pstrProp,
String pstrVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection... | java | public void setStringProperty(String pstrSection, String pstrProp,
String pstrVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection... | [
"public",
"void",
"setStringProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"String",
"pstrVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"... | Sets the specified string property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@pstrVal the string value to be persisted | [
"Sets",
"the",
"specified",
"string",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L399-L411 |
22,584 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setBooleanProperty | public void setBooleanProperty(String pstrSection, String pstrProp,
boolean pblnVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISecti... | java | public void setBooleanProperty(String pstrSection, String pstrProp,
boolean pblnVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISecti... | [
"public",
"void",
"setBooleanProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"boolean",
"pblnVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
... | Sets the specified boolean property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param pblnVal the boolean value to be persisted | [
"Sets",
"the",
"specified",
"boolean",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L419-L434 |
22,585 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setIntegerProperty | public void setIntegerProperty(String pstrSection, String pstrProp,
int pintVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(p... | java | public void setIntegerProperty(String pstrSection, String pstrProp,
int pintVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(p... | [
"public",
"void",
"setIntegerProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"int",
"pintVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mh... | Sets the specified integer property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param pintVal the int property to be persisted. | [
"Sets",
"the",
"specified",
"integer",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L442-L454 |
22,586 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setLongProperty | public void setLongProperty(String pstrSection, String pstrProp,
long plngVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstr... | java | public void setLongProperty(String pstrSection, String pstrProp,
long plngVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstr... | [
"public",
"void",
"setLongProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"long",
"plngVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mhma... | Sets the specified long property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param plngVal the long value to be persisted. | [
"Sets",
"the",
"specified",
"long",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L462-L474 |
22,587 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setDoubleProperty | public void setDoubleProperty(String pstrSection, String pstrProp,
double pdblVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection... | java | public void setDoubleProperty(String pstrSection, String pstrProp,
double pdblVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection... | [
"public",
"void",
"setDoubleProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"double",
"pdblVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"... | Sets the specified double property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param pdblVal the double value to be persisted. | [
"Sets",
"the",
"specified",
"double",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L482-L494 |
22,588 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setDateProperty | public void setDateProperty(String pstrSection, String pstrProp,
Date pdtVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstrS... | java | public void setDateProperty(String pstrSection, String pstrProp,
Date pdtVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INISection(pstrS... | [
"public",
"void",
"setDateProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"Date",
"pdtVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mhmap... | Sets the specified java.util.Date property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param pdtVal the date value to be persisted. | [
"Sets",
"the",
"specified",
"java",
".",
"util",
".",
"Date",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L502-L515 |
22,589 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.setTimestampProperty | public void setTimestampProperty(String pstrSection, String pstrProp,
Timestamp ptsVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INIS... | java | public void setTimestampProperty(String pstrSection, String pstrProp,
Timestamp ptsVal, String pstrComments)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec == null)
{
objSec = new INIS... | [
"public",
"void",
"setTimestampProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
",",
"Timestamp",
"ptsVal",
",",
"String",
"pstrComments",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
"."... | Sets the specified java.sql.Timestamp property.
@param pstrSection the INI section name.
@param pstrProp the property to be set.
@param ptsVal the timestamp value to be persisted. | [
"Sets",
"the",
"specified",
"java",
".",
"sql",
".",
"Timestamp",
"property",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L523-L536 |
22,590 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getAllSectionNames | public String[] getAllSectionNames()
{
int iCntr = 0;
Iterator<String> iter = null;
String[] arrRet = null;
try
{
if (this.mhmapSections.size() > 0)
{
arrRet = new String[this.mhmapSections.size()];
... | java | public String[] getAllSectionNames()
{
int iCntr = 0;
Iterator<String> iter = null;
String[] arrRet = null;
try
{
if (this.mhmapSections.size() > 0)
{
arrRet = new String[this.mhmapSections.size()];
... | [
"public",
"String",
"[",
"]",
"getAllSectionNames",
"(",
")",
"{",
"int",
"iCntr",
"=",
"0",
";",
"Iterator",
"<",
"String",
">",
"iter",
"=",
"null",
";",
"String",
"[",
"]",
"arrRet",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"this",
".",
"mhmapSe... | Returns a string array containing names of all sections in INI file.
@return the string array of section names | [
"Returns",
"a",
"string",
"array",
"containing",
"names",
"of",
"all",
"sections",
"in",
"INI",
"file",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L574-L600 |
22,591 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getPropertyNames | public String[] getPropertyNames(String pstrSection)
{
String[] arrRet = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
arrRet = objSec.getPropNames();
objSec = null;
... | java | public String[] getPropertyNames(String pstrSection)
{
String[] arrRet = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
arrRet = objSec.getPropNames();
objSec = null;
... | [
"public",
"String",
"[",
"]",
"getPropertyNames",
"(",
"String",
"pstrSection",
")",
"{",
"String",
"[",
"]",
"arrRet",
"=",
"null",
";",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mhmapSections",
".",
... | Returns a string array containing names of all the properties under specified section.
@param pstrSection the name of the section for which names of properties is to be retrieved.
@return the string array of property names. | [
"Returns",
"a",
"string",
"array",
"containing",
"names",
"of",
"all",
"the",
"properties",
"under",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L607-L619 |
22,592 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.getProperties | public Map<String, INIProperty> getProperties(String pstrSection)
{
Map<String, INIProperty> hmRet = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
hmRet = objSec.getProperties();
... | java | public Map<String, INIProperty> getProperties(String pstrSection)
{
Map<String, INIProperty> hmRet = null;
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
hmRet = objSec.getProperties();
... | [
"public",
"Map",
"<",
"String",
",",
"INIProperty",
">",
"getProperties",
"(",
"String",
"pstrSection",
")",
"{",
"Map",
"<",
"String",
",",
"INIProperty",
">",
"hmRet",
"=",
"null",
";",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INI... | Returns a map containing all the properties under specified section.
@param pstrSection the name of the section for which properties are to be retrieved.
@return the map of properties. | [
"Returns",
"a",
"map",
"containing",
"all",
"the",
"properties",
"under",
"specified",
"section",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L626-L638 |
22,593 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.removeProperty | public void removeProperty(String pstrSection, String pstrProp)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
objSec.removeProperty(pstrProp);
objSec = null;
}
} | java | public void removeProperty(String pstrSection, String pstrProp)
{
INISection objSec = null;
objSec = (INISection) this.mhmapSections.get(pstrSection);
if (objSec != null)
{
objSec.removeProperty(pstrProp);
objSec = null;
}
} | [
"public",
"void",
"removeProperty",
"(",
"String",
"pstrSection",
",",
"String",
"pstrProp",
")",
"{",
"INISection",
"objSec",
"=",
"null",
";",
"objSec",
"=",
"(",
"INISection",
")",
"this",
".",
"mhmapSections",
".",
"get",
"(",
"pstrSection",
")",
";",
... | Removed specified property from the specified section. If the specified
section or the property does not exist, does nothing.
@param pstrSection the section name.
@param pstrProp the name of the property to be removed. | [
"Removed",
"specified",
"property",
"from",
"the",
"specified",
"section",
".",
"If",
"the",
"specified",
"section",
"or",
"the",
"property",
"does",
"not",
"exist",
"does",
"nothing",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L646-L656 |
22,594 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.save | public boolean save()
{
boolean blnRet = false;
File objFile = null;
String strName = null;
String strTemp = null;
Iterator<String> itrSec = null;
INISection objSec = null;
FileWriter objWriter = null;
try
... | java | public boolean save()
{
boolean blnRet = false;
File objFile = null;
String strName = null;
String strTemp = null;
Iterator<String> itrSec = null;
INISection objSec = null;
FileWriter objWriter = null;
try
... | [
"public",
"boolean",
"save",
"(",
")",
"{",
"boolean",
"blnRet",
"=",
"false",
";",
"File",
"objFile",
"=",
"null",
";",
"String",
"strName",
"=",
"null",
";",
"String",
"strTemp",
"=",
"null",
";",
"Iterator",
"<",
"String",
">",
"itrSec",
"=",
"null"... | Flush changes back to the disk file. If the disk file does not exists then
creates the new one.
@ | [
"Flush",
"changes",
"back",
"to",
"the",
"disk",
"file",
".",
"If",
"the",
"disk",
"file",
"does",
"not",
"exists",
"then",
"creates",
"the",
"new",
"one",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L673-L715 |
22,595 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.checkDateTimeFormat | private boolean checkDateTimeFormat(String pstrDtFmt)
{
boolean blnRet = false;
DateFormat objFmt = null;
try
{
objFmt = new SimpleDateFormat(pstrDtFmt);
blnRet = true;
}
catch (NullPointerException NPExIgnore)
{
... | java | private boolean checkDateTimeFormat(String pstrDtFmt)
{
boolean blnRet = false;
DateFormat objFmt = null;
try
{
objFmt = new SimpleDateFormat(pstrDtFmt);
blnRet = true;
}
catch (NullPointerException NPExIgnore)
{
... | [
"private",
"boolean",
"checkDateTimeFormat",
"(",
"String",
"pstrDtFmt",
")",
"{",
"boolean",
"blnRet",
"=",
"false",
";",
"DateFormat",
"objFmt",
"=",
"null",
";",
"try",
"{",
"objFmt",
"=",
"new",
"SimpleDateFormat",
"(",
"pstrDtFmt",
")",
";",
"blnRet",
"... | Helper function to check the date time formats.
@param pstrDtFmt the date time format string to be checked.
@return true for valid date/time format, false otherwise. | [
"Helper",
"function",
"to",
"check",
"the",
"date",
"time",
"formats",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L811-L832 |
22,596 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.loadStream | private void loadStream(InputStream stream)
{
int iPos = -1;
String strLine = null;
String strSection = null;
String strRemarks = null;
BufferedReader objBRdr = null;
InputStreamReader objFRdr = null;
... | java | private void loadStream(InputStream stream)
{
int iPos = -1;
String strLine = null;
String strSection = null;
String strRemarks = null;
BufferedReader objBRdr = null;
InputStreamReader objFRdr = null;
... | [
"private",
"void",
"loadStream",
"(",
"InputStream",
"stream",
")",
"{",
"int",
"iPos",
"=",
"-",
"1",
";",
"String",
"strLine",
"=",
"null",
";",
"String",
"strSection",
"=",
"null",
";",
"String",
"strRemarks",
"=",
"null",
";",
"BufferedReader",
"objBRd... | Reads the INI file and load its contentens into a section collection after
parsing the file line by line. | [
"Reads",
"the",
"INI",
"file",
"and",
"load",
"its",
"contentens",
"into",
"a",
"section",
"collection",
"after",
"parsing",
"the",
"file",
"line",
"by",
"line",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L838-L932 |
22,597 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.checkFile | private boolean checkFile(String pstrFile)
{
boolean blnRet = false;
File objFile = null;
try
{
objFile = new CSFile(pstrFile);
blnRet = (objFile.exists() && objFile.isFile());
}
catch (Exception e)
{
blnRet... | java | private boolean checkFile(String pstrFile)
{
boolean blnRet = false;
File objFile = null;
try
{
objFile = new CSFile(pstrFile);
blnRet = (objFile.exists() && objFile.isFile());
}
catch (Exception e)
{
blnRet... | [
"private",
"boolean",
"checkFile",
"(",
"String",
"pstrFile",
")",
"{",
"boolean",
"blnRet",
"=",
"false",
";",
"File",
"objFile",
"=",
"null",
";",
"try",
"{",
"objFile",
"=",
"new",
"CSFile",
"(",
"pstrFile",
")",
";",
"blnRet",
"=",
"(",
"objFile",
... | Helper method to check the existance of a file.
@param the full path and name of the file to be checked.
@return true if file exists, false otherwise. | [
"Helper",
"method",
"to",
"check",
"the",
"existance",
"of",
"a",
"file",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1072-L1091 |
22,598 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.utilDateToStr | private String utilDateToStr(Date pdt, String pstrFmt)
{
String strRet = null;
SimpleDateFormat dtFmt = null;
try
{
dtFmt = new SimpleDateFormat(pstrFmt);
strRet = dtFmt.format(pdt);
}
catch (Exception e)
{
strR... | java | private String utilDateToStr(Date pdt, String pstrFmt)
{
String strRet = null;
SimpleDateFormat dtFmt = null;
try
{
dtFmt = new SimpleDateFormat(pstrFmt);
strRet = dtFmt.format(pdt);
}
catch (Exception e)
{
strR... | [
"private",
"String",
"utilDateToStr",
"(",
"Date",
"pdt",
",",
"String",
"pstrFmt",
")",
"{",
"String",
"strRet",
"=",
"null",
";",
"SimpleDateFormat",
"dtFmt",
"=",
"null",
";",
"try",
"{",
"dtFmt",
"=",
"new",
"SimpleDateFormat",
"(",
"pstrFmt",
")",
";"... | Converts a java.util.date into String
@param pd Date that need to be converted to String
@param pstrFmt The date format pattern.
@return String | [
"Converts",
"a",
"java",
".",
"util",
".",
"date",
"into",
"String"
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1099-L1118 |
22,599 | jamesagnew/hapi-fhir | hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java | IniFile.timeToStr | private String timeToStr(Timestamp pobjTS, String pstrFmt)
{
String strRet = null;
SimpleDateFormat dtFmt = null;
try
{
dtFmt = new SimpleDateFormat(pstrFmt);
strRet = dtFmt.format(pobjTS);
}
catch (IllegalArgumentException iae)
... | java | private String timeToStr(Timestamp pobjTS, String pstrFmt)
{
String strRet = null;
SimpleDateFormat dtFmt = null;
try
{
dtFmt = new SimpleDateFormat(pstrFmt);
strRet = dtFmt.format(pobjTS);
}
catch (IllegalArgumentException iae)
... | [
"private",
"String",
"timeToStr",
"(",
"Timestamp",
"pobjTS",
",",
"String",
"pstrFmt",
")",
"{",
"String",
"strRet",
"=",
"null",
";",
"SimpleDateFormat",
"dtFmt",
"=",
"null",
";",
"try",
"{",
"dtFmt",
"=",
"new",
"SimpleDateFormat",
"(",
"pstrFmt",
")",
... | Converts the given sql timestamp object to a string representation. The format
to be used is to be obtained from the configuration file.
@param pobjTS the sql timestamp object to be converted.
@param pblnGMT If true formats the string using GMT timezone
otherwise using local timezone.
@return the formatted string rep... | [
"Converts",
"the",
"given",
"sql",
"timestamp",
"object",
"to",
"a",
"string",
"representation",
".",
"The",
"format",
"to",
"be",
"used",
"is",
"to",
"be",
"obtained",
"from",
"the",
"configuration",
"file",
"."
] | 150a84d52fe691b7f48fcb28247c4bddb7aec352 | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L1129-L1152 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.