idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
32,800 | public void visit ( IBaseResource theResource , IModelVisitor theVisitor ) { BaseRuntimeElementCompositeDefinition < ? > def = myContext . getResourceDefinition ( theResource ) ; visit ( new IdentityHashMap < Object , Object > ( ) , theResource , theResource , null , null , def , theVisitor ) ; } | Visit all elements in a given resource |
32,801 | public SubscriptionMatchResult match ( String theCriteria , IBaseResource theResource , ResourceIndexedSearchParams theSearchParams ) { RuntimeResourceDefinition resourceDefinition ; if ( theResource == null ) { resourceDefinition = UrlUtil . parseUrlResourceType ( myFhirContext , theCriteria ) ; } else { resourceDefin... | This method is called in two different scenarios . With a null theResource it determines whether database matching might be required . Otherwise it tries to perform the match in - memory returning UNSUPPORTED if it s not possible . |
32,802 | public void registerOsgiProvider ( Object provider ) throws FhirConfigurationException { if ( null == provider ) { throw new NullPointerException ( "FHIR Provider cannot be null" ) ; } try { super . registerProvider ( provider ) ; log . trace ( "registered provider. class [" + provider . getClass ( ) . getName ( ) + "]... | Dynamically registers a single provider with the RestfulServer |
32,803 | public void unregisterOsgiProvider ( Object provider ) throws FhirConfigurationException { if ( null == provider ) { throw new NullPointerException ( "FHIR Provider cannot be null" ) ; } try { this . serverProviders . remove ( provider ) ; log . trace ( "unregistered provider. class [" + provider . getClass ( ) . getNa... | Dynamically unregisters a single provider with the RestfulServer |
32,804 | public void registerOsgiProviders ( Collection < Object > providers ) throws FhirConfigurationException { if ( null == providers ) { throw new NullPointerException ( "FHIR Provider list cannot be null" ) ; } try { super . registerProviders ( providers ) ; for ( Object provider : providers ) { log . trace ( "registered ... | Dynamically registers a list of providers with the RestfulServer |
32,805 | public void unregisterOsgiProviders ( Collection < Object > providers ) throws FhirConfigurationException { if ( null == providers ) { throw new NullPointerException ( "FHIR Provider list cannot be null" ) ; } try { for ( Object provider : providers ) { log . trace ( "unregistered provider. class [" + provider . getCla... | Dynamically unregisters a list of providers with the RestfulServer |
32,806 | public void unregisterOsgiProviders ( ) throws FhirConfigurationException { Collection < Object > providers = new ArrayList < Object > ( ) ; providers . addAll ( this . serverProviders ) ; this . unregisterOsgiProviders ( providers ) ; } | Dynamically unregisters all of providers currently registered |
32,807 | public List < Patient > search ( @ RequiredParam ( name = "family" ) StringParam theParam ) { List < Patient > retVal = new ArrayList < Patient > ( ) ; for ( Patient next : myPatients . values ( ) ) { String familyName = next . getNameFirstRep ( ) . getFamilyAsSingleString ( ) . toLowerCase ( ) ; if ( familyName . cont... | A search with a parameter |
32,808 | String extractPrefixAndReturnRest ( String theString ) { int offset = 0 ; while ( true ) { if ( theString . length ( ) == offset ) { break ; } else { char nextChar = theString . charAt ( offset ) ; if ( nextChar == '-' || Character . isDigit ( nextChar ) ) { break ; } } offset ++ ; } String prefix = theString . substri... | Eg . if this is invoked with gt2012 - 11 - 02 sets the prefix to GREATER_THAN and returns 2012 - 11 - 02 |
32,809 | protected void preProcessResourceForStorage ( T theResource ) { String type = getContext ( ) . getResourceDefinition ( theResource ) . getName ( ) ; if ( ! getResourceName ( ) . equals ( type ) ) { throw new InvalidRequestException ( getContext ( ) . getLocalizer ( ) . getMessage ( BaseHapiFhirResourceDao . class , "in... | May be overridden by subclasses to validate resources prior to storage |
32,810 | public RuntimeResourceDefinition validateCriteriaAndReturnResourceDefinition ( String criteria ) { String resourceName ; if ( criteria == null || criteria . trim ( ) . isEmpty ( ) ) { throw new IllegalArgumentException ( "Criteria cannot be empty" ) ; } if ( criteria . contains ( "?" ) ) { resourceName = criteria . sub... | Get the resource definition from the criteria which specifies the resource type |
32,811 | public DateTimeType makeDateTimeFromIVL ( Element ivl ) throws Exception { if ( ivl == null ) return null ; if ( ivl . hasAttribute ( "value" ) ) return makeDateTimeFromTS ( ivl ) ; Element high = cda . getChild ( ivl , "high" ) ; if ( high != null ) return makeDateTimeFromTS ( high ) ; Element low = cda . getChild ( i... | this is a weird one - where CDA has an IVL and FHIR has a date |
32,812 | public String analyse ( String unit ) throws UcumException { if ( Utilities . noString ( unit ) ) return "(unity)" ; assert checkStringParam ( unit ) : paramError ( "analyse" , "unit" , "must not be null or empty" ) ; Term term = new ExpressionParser ( model ) . parse ( unit ) ; return new FormalStructureComposer ( ) .... | given a unit return a formal description of what the units stand for using full names |
32,813 | public static String determineServletContextPath ( HttpServletRequest theRequest , RestfulServer server ) { String retVal ; if ( server . getServletContext ( ) != null ) { if ( server . getServletContext ( ) . getMajorVersion ( ) >= 3 || ( server . getServletContext ( ) . getMajorVersion ( ) > 2 && server . getServletC... | Determines the servlet s context path . |
32,814 | public static List < String > getOtherChildren ( CodeSystem cs , ConceptDefinitionComponent c ) { List < String > res = new ArrayList < String > ( ) ; for ( ConceptPropertyComponent p : c . getProperty ( ) ) { if ( "parent" . equals ( p . getCode ( ) ) ) { res . add ( p . getValue ( ) . primitiveValue ( ) ) ; } } retur... | returns additional parents not in the heirarchy |
32,815 | public Boolean equalsUsingFhirPathRules ( BaseDateTimeType theOther ) { BaseDateTimeType me = this ; int lowestPrecision = Math . min ( me . getPrecision ( ) . ordinal ( ) , theOther . getPrecision ( ) . ordinal ( ) ) ; TemporalPrecisionEnum lowestPrecisionEnum = TemporalPrecisionEnum . values ( ) [ lowestPrecision ] ;... | This method implements a datetime equality check using the rules as defined by FHIRPath . |
32,816 | public String getSubscriptionId ( FhirContext theFhirContext ) { String retVal = null ; if ( getSubscription ( ) != null ) { retVal = getSubscription ( ) . getIdElement ( theFhirContext ) . getValue ( ) ; } return retVal ; } | Helper method to fetch the subscription ID |
32,817 | public boolean ensureSearchEntityLoaded ( ) { if ( mySearchEntity == null ) { ensureDependenciesInjected ( ) ; TransactionTemplate txTemplate = new TransactionTemplate ( myPlatformTransactionManager ) ; txTemplate . setPropagationBehavior ( TransactionDefinition . PROPAGATION_REQUIRED ) ; txTemplate . setIsolationLevel... | Returns false if the entity can t be found |
32,818 | @ SuppressWarnings ( "deprecation" ) public boolean equalsIgnoreBase ( IdDt theId ) { if ( theId == null ) { return false ; } if ( theId . isEmpty ( ) ) { return isEmpty ( ) ; } return ObjectUtils . equals ( getResourceType ( ) , theId . getResourceType ( ) ) && ObjectUtils . equals ( getIdPart ( ) , theId . getIdPart ... | Returns true if this IdDt matches the given IdDt in terms of resource type and ID but ignores the URL base |
32,819 | public Object intercept ( final InvocationContext ctx ) throws JaxRsResponseException { try { return ctx . proceed ( ) ; } catch ( final Exception theException ) { final AbstractJaxRsProvider theServer = ( AbstractJaxRsProvider ) ctx . getTarget ( ) ; throw convertException ( theServer , theException ) ; } } | This interceptor will catch all exception and convert them using the exceptionhandler |
32,820 | public JaxRsResponseException convertException ( final AbstractJaxRsProvider theServer , final Throwable theException ) { if ( theServer . withStackTrace ( ) ) { exceptionHandler . setReturnStackTracesForExceptionTypes ( Throwable . class ) ; } final JaxRsRequest requestDetails = theServer . getRequest ( null , null ) ... | This method convert an exception to a JaxRsResponseException |
32,821 | public Response convertExceptionIntoResponse ( final JaxRsRequest theRequest , final JaxRsResponseException theException ) throws IOException { return handleExceptionWithoutServletError ( theRequest , theException ) ; } | This method converts an exception into a response |
32,822 | public static < T > T getTargetObject ( Object proxy , Class < T > clazz ) throws Exception { while ( ( AopUtils . isJdkDynamicProxy ( proxy ) ) ) { return clazz . cast ( getTargetObject ( ( ( Advised ) proxy ) . getTargetSource ( ) . getTarget ( ) , clazz ) ) ; } return clazz . cast ( proxy ) ; } | Retrieve the Spring proxy object s target object |
32,823 | public static IBundleProvider newEmptyList ( ) { final InstantDt published = InstantDt . withCurrentTime ( ) ; return new IBundleProvider ( ) { public List < IBaseResource > getResources ( int theFromIndex , int theToIndex ) { return Collections . emptyList ( ) ; } public Integer size ( ) { return 0 ; } public InstantD... | Create a new unmodifiable empty resource list with the current time as the publish date . |
32,824 | private List < String > getHeaderValues ( String headerName ) { if ( additionalHttpHeaders . get ( headerName ) == null ) { additionalHttpHeaders . put ( headerName , new ArrayList < String > ( ) ) ; } return additionalHttpHeaders . get ( headerName ) ; } | Gets the header values list for a given header . If the header doesn t have any values an empty list will be returned . |
32,825 | public void interceptRequest ( IHttpRequest theRequest ) { for ( Map . Entry < String , List < String > > header : additionalHttpHeaders . entrySet ( ) ) { for ( String headerValue : header . getValue ( ) ) { if ( headerValue != null ) { theRequest . addHeader ( header . getKey ( ) , headerValue ) ; } } } } | Adds the additional header values to the HTTP request . |
32,826 | void sealAndInitialize ( FhirContext theContext , Map < Class < ? extends IBase > , BaseRuntimeElementDefinition < ? > > theClassToElementDefinitions ) { for ( BaseRuntimeChildDefinition next : myExtensions ) { next . sealAndInitialize ( theContext , theClassToElementDefinitions ) ; } for ( RuntimeChildDeclaredExtensio... | Invoked prior to use to perform any initialization and make object mutable . |
32,827 | private String emitInnerTypes ( ) { StringBuilder itDefs = new StringBuilder ( ) ; while ( emittedInnerTypes . size ( ) < innerTypes . size ( ) ) { for ( Pair < StructureDefinition , ElementDefinition > it : new HashSet < Pair < StructureDefinition , ElementDefinition > > ( innerTypes ) ) { if ( ! emittedInnerTypes . c... | Generate a flattened definition for the inner types |
32,828 | private String emitDataTypes ( ) { StringBuilder dtDefs = new StringBuilder ( ) ; while ( emittedDatatypes . size ( ) < datatypes . size ( ) ) { for ( String dt : new HashSet < String > ( datatypes ) ) { if ( ! emittedDatatypes . contains ( dt ) ) { StructureDefinition sd = context . fetchResource ( StructureDefinition... | Generate a shape definition for the current set of datatypes |
32,829 | private String simpleElement ( StructureDefinition sd , ElementDefinition ed , String typ ) { String addldef = "" ; ElementDefinition . ElementDefinitionBindingComponent binding = ed . getBinding ( ) ; if ( binding . hasStrength ( ) && binding . getStrength ( ) == Enumerations . BindingStrength . REQUIRED && "code" . e... | Generate a type reference and optional value set definition |
32,830 | private String genTypeRef ( StructureDefinition sd , ElementDefinition ed , String id , ElementDefinition . TypeRefComponent typ ) { if ( typ . hasProfile ( ) ) { if ( typ . getCode ( ) . equals ( "Reference" ) ) return genReference ( "" , typ ) ; else if ( ProfileUtilities . getChildList ( sd , ed ) . size ( ) > 0 ) {... | Generate a type reference |
32,831 | private ST genAlternativeTypes ( ElementDefinition ed , String id , String shortId ) { ST shex_alt = tmplt ( ALTERNATIVE_SHAPES_TEMPLATE ) ; List < String > altEntries = new ArrayList < String > ( ) ; for ( ElementDefinition . TypeRefComponent typ : ed . getType ( ) ) { altEntries . add ( genAltEntry ( id , typ ) ) ; }... | Generate a set of alternative shapes |
32,832 | private String genAltEntry ( String id , ElementDefinition . TypeRefComponent typ ) { if ( ! typ . getCode ( ) . equals ( "Reference" ) ) throw new AssertionError ( "We do not handle " + typ . getCode ( ) + " alternatives" ) ; return genReference ( id , typ ) ; } | Generate an alternative shape for a reference |
32,833 | private String genChoiceEntry ( StructureDefinition sd , ElementDefinition ed , String id , String base , ElementDefinition . TypeRefComponent typ ) { ST shex_choice_entry = tmplt ( ELEMENT_TEMPLATE ) ; String ext = typ . getCode ( ) ; shex_choice_entry . add ( "id" , "fhir:" + base + Character . toUpperCase ( ext . ch... | Generate an entry in a choice list |
32,834 | private String genInnerTypeDef ( StructureDefinition sd , ElementDefinition ed ) { String path = ed . hasBase ( ) ? ed . getBase ( ) . getPath ( ) : ed . getPath ( ) ; ; ST element_reference = tmplt ( SHAPE_DEFINITION_TEMPLATE ) ; element_reference . add ( "resourceDecl" , "" ) ; element_reference . add ( "id" , path )... | Generate a definition for a referenced element |
32,835 | private String genReference ( String id , ElementDefinition . TypeRefComponent typ ) { ST shex_ref = tmplt ( REFERENCE_DEFN_TEMPLATE ) ; String ref = getTypeName ( typ ) ; shex_ref . add ( "id" , id ) ; shex_ref . add ( "ref" , ref ) ; references . add ( ref ) ; return shex_ref . render ( ) ; } | Generate a reference to a resource |
32,836 | private String getTypeName ( ElementDefinition . TypeRefComponent typ ) { if ( typ . hasTargetProfile ( ) ) { String [ ] els = typ . getTargetProfile ( ) . get ( 0 ) . getValue ( ) . split ( "/" ) ; return els [ els . length - 1 ] ; } else if ( typ . hasProfile ( ) ) { String [ ] els = typ . getProfile ( ) . get ( 0 ) ... | Return the type name for typ |
32,837 | public IMatches < IAndUnits > withPrefix ( final ParamPrefixEnum thePrefix ) { return new NumberClientParam . IMatches < IAndUnits > ( ) { public IAndUnits number ( long theNumber ) { return new AndUnits ( thePrefix , Long . toString ( theNumber ) ) ; } public IAndUnits number ( String theNumber ) { return new AndUnits... | Use the given quantity prefix |
32,838 | public BaseMethodBinding < ? > determineResourceMethod ( RequestDetails requestDetails , String requestPath ) { RequestTypeEnum requestType = requestDetails . getRequestType ( ) ; ResourceBinding resourceBinding = null ; BaseMethodBinding < ? > resourceMethod = null ; String resourceName = requestDetails . getResourceN... | Figure out and return whichever method binding is appropriate for the given request |
32,839 | public List < IServerInterceptor > getInterceptors_ ( ) { List < IServerInterceptor > retVal = getInterceptorService ( ) . getAllRegisteredInterceptors ( ) . stream ( ) . filter ( t -> t instanceof IServerInterceptor ) . map ( t -> ( IServerInterceptor ) t ) . collect ( Collectors . toList ( ) ) ; return Collections . ... | Returns a list of all registered server interceptors |
32,840 | public void setPlainProviders ( Collection < Object > theProviders ) { Validate . noNullElements ( theProviders , "theProviders must not contain any null elements" ) ; myPlainProviders . clear ( ) ; if ( theProviders != null ) { myPlainProviders . addAll ( theProviders ) ; } } | Sets the non - resource specific providers which implement method calls on this server . |
32,841 | public void registerProvider ( Object provider ) { if ( provider != null ) { Collection < Object > providerList = new ArrayList < > ( 1 ) ; providerList . add ( provider ) ; registerProviders ( providerList ) ; } } | Register a single provider . This could be a Resource Provider or a plain provider not associated with any resource . |
32,842 | public void registerProviders ( Collection < ? > theProviders ) { Validate . noNullElements ( theProviders , "theProviders must not contain any null elements" ) ; myProviderRegistrationMutex . lock ( ) ; try { if ( ! myStarted ) { for ( Object provider : theProviders ) { ourLog . info ( "Registration of provider [" + p... | Register a group of theProviders . These could be Resource Providers plain theProviders or a mixture of the two . |
32,843 | public void setProviders ( Object ... theProviders ) { Validate . noNullElements ( theProviders , "theProviders must not contain any null elements" ) ; myPlainProviders . clear ( ) ; if ( theProviders != null ) { myPlainProviders . addAll ( Arrays . asList ( theProviders ) ) ; } } | Sets the non - resource specific providers which implement method calls on this server |
32,844 | public void unregisterInterceptor ( Object theInterceptor ) { Validate . notNull ( theInterceptor , "Interceptor can not be null" ) ; getInterceptorService ( ) . unregisterInterceptor ( theInterceptor ) ; } | Unregisters an interceptor |
32,845 | public void submitResourceModified ( final ResourceModifiedMessage theMsg ) { if ( TransactionSynchronizationManager . isSynchronizationActive ( ) ) { TransactionSynchronizationManager . registerSynchronization ( new TransactionSynchronizationAdapter ( ) { public int getOrder ( ) { return 0 ; } public void afterCommit ... | This is an internal API - Use with caution! |
32,846 | public static Template parse ( String input ) { return new Template ( input , Tag . getTags ( ) , Filter . getFilters ( ) ) ; } | Returns a new Template instance from a given input string . |
32,847 | 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 . |
32,848 | private < T extends BaseResourceIndex > void tryToReuseIndexEntities ( List < T > theIndexesToRemove , List < T > theIndexesToAdd ) { for ( int addIndex = 0 ; addIndex < theIndexesToAdd . size ( ) ; addIndex ++ ) { if ( theIndexesToRemove . isEmpty ( ) ) { break ; } T targetEntity = theIndexesToAdd . get ( 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... |
32,849 | private ConcurrentHashMap < String , BaseMethodBinding < ? > > getMapForOperation ( RestOperationTypeEnum operationType ) { ConcurrentHashMap < String , BaseMethodBinding < ? > > result = operationBindings . get ( operationType ) ; if ( result == null ) { operationBindings . putIfAbsent ( operationType , new Concurrent... | 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 . |
32,850 | public BaseMethodBinding < ? > getBinding ( RestOperationTypeEnum operationType , String theBindingKey ) { String bindingKey = StringUtils . defaultIfBlank ( theBindingKey , DEFAULT_METHOD_KEY ) ; ConcurrentHashMap < String , BaseMethodBinding < ? > > map = getMapForOperation ( operationType ) ; if ( map == null || ! m... | Get the binding |
32,851 | public static JaxRsMethodBindings getMethodBindings ( AbstractJaxRsProvider theProvider , Class < ? extends AbstractJaxRsProvider > theProviderClass ) { if ( ! getClassBindings ( ) . containsKey ( theProviderClass ) ) { JaxRsMethodBindings foundBindings = new JaxRsMethodBindings ( theProvider , theProviderClass ) ; get... | 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 |
32,852 | public void addExecuteOnlyIfColumnExists ( String theTableName , String theColumnName ) { myConditionalOnExistenceOf . add ( new TableAndColumn ( theTableName , theColumnName ) ) ; } | This task will only execute if the following column exists |
32,853 | 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 ( wordStr ) ; if ( result !=... | Returns the plural form of the word in the string . |
32,854 | 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 . apply ( wordStr ) ; if ( resul... | Returns the singular form of the word in the string . |
32,855 | 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 ) . toLow... | Returns a copy of the input with the first character converted to uppercase and the remainder to lowercase . |
32,856 | public boolean outgoingResponse ( RequestDetails theRequestDetails , Bundle theResponseObject , HttpServletRequest theServletRequest , HttpServletResponse theServletResponse ) throws AuthenticationException { if ( myClientParamsOptional && myDataStore == null ) { log . debug ( "No auditing configured." ) ; return true ... | Intercept the outgoing response to perform auditing of the request data if the bundle contains auditable resources . |
32,857 | protected Event getEventInfo ( RequestDetails theRequestDetails ) { Event event = new Event ( ) ; event . setAction ( mapResourceTypeToSecurityEventAction ( theRequestDetails . getRestOperationType ( ) ) ) ; event . setDateTimeWithMillisPrecision ( new Date ( ) ) ; event . setOutcome ( SecurityEventOutcomeEnum . SUCCES... | Generates the Event segment of the SecurityEvent based on the incoming request details |
32,858 | 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."... | Return the query URL encoded to bytes to be set as the Object . query on the Security Event |
32,859 | protected ObjectElement getObjectElement ( IResource resource , SecurityEventObjectLifecycleEnum lifecycle , byte [ ] query ) throws InstantiationException , IllegalAccessException { String resourceType = resource . getResourceName ( ) ; if ( myAuditableResources . containsKey ( resourceType ) ) { log . debug ( "Found ... | If the resource is considered an auditable resource containing PHI create an ObjectElement otherwise return null |
32,860 | 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 ; } | Helper method to create an ObjectDetail from a pair of Strings . |
32,861 | 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" ) )... | Return the access type for this request |
32,862 | protected SecurityEventActionEnum mapResourceTypeToSecurityEventAction ( ca . uhn . fhir . rest . api . RestOperationTypeEnum theRestfulOperationTypeEnum ) { if ( theRestfulOperationTypeEnum == null ) return null ; switch ( theRestfulOperationTypeEnum ) { case READ : return SecurityEventActionEnum . READ_VIEW_PRINT ; c... | Returns the SecurityEventActionEnum corresponding to the specified RestfulOperationTypeEnum |
32,863 | protected SecurityEventObjectLifecycleEnum mapResourceTypeToSecurityLifecycle ( ca . uhn . fhir . rest . api . RestOperationTypeEnum theRestfulOperationTypeEnum ) { if ( theRestfulOperationTypeEnum == null ) return null ; switch ( theRestfulOperationTypeEnum ) { case READ : return SecurityEventObjectLifecycleEnum . ACC... | Returns the SecurityEventObjectLifecycleEnum corresponding to the specified RestfulOperationTypeEnum |
32,864 | 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 ( ... | Add a type of auditable resource and its auditor to this AuditingInterceptor s resource map |
32,865 | public IBaseOperationOutcome toOperationOutcome ( ) { IBaseOperationOutcome oo = ( IBaseOperationOutcome ) myCtx . getResourceDefinition ( "OperationOutcome" ) . newInstance ( ) ; populateOperationOutcome ( oo ) ; return oo ; } | Create an OperationOutcome resource which contains all of the messages found as a result of this validation |
32,866 | public void populateOperationOutcome ( IBaseOperationOutcome theOperationOutcome ) { for ( SingleValidationMessage next : myMessages ) { String location ; if ( isNotBlank ( next . getLocationString ( ) ) ) { location = next . getLocationString ( ) ; } else if ( next . getLocationLine ( ) != null || next . getLocationCo... | Populate an operation outcome with the results of the validation |
32,867 | public void initialize ( ) { try { Class . forName ( "org.hl7.fhir.instance.model.QuestionnaireResponse" ) ; myValidateResponses = true ; } catch ( ClassNotFoundException e ) { myValidateResponses = Boolean . FALSE ; } } | Initialize the bean |
32,868 | public void compose ( JsonCreator writer , Resource resource ) throws IOException { json = writer ; composeResource ( resource ) ; } | Compose a resource using a pre - existing JsonWriter |
32,869 | 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 ( "'" ) ; els... | Converts the raw characters to XML escape characters . |
32,870 | 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 |
32,871 | 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 ) ; newVa... | Add a new validator module to this validator . You may register as many modules as you like at any time . |
32,872 | 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 ) ; new... | Removes a validator module from this validator . You may register as many modules as you like and remove them at any time . |
32,873 | private IBundleProvider performSearch ( String theCriteria ) { IFhirResourceDao < ? > subscriptionDao = myDaoRegistry . getSubscriptionDao ( ) ; RuntimeResourceDefinition responseResourceDef = subscriptionDao . validateCriteriaAndReturnResourceDefinition ( theCriteria ) ; SearchParameterMap responseCriteriaUrl = myMatc... | Search based on a query criteria |
32,874 | private ProfilingWrapper wrap ( Base object ) { ProfilingWrapper res = new ProfilingWrapper ( context , resource , object ) ; res . cache = cache ; res . engine = engine ; return res ; } | This is a convenient called for |
32,875 | private void start ( List < ValidationMessage > errors , WrapperElement resource , WrapperElement element , StructureDefinition profile , NodeStack stack ) throws FHIRException { if ( rule ( errors , IssueType . STRUCTURE , element . line ( ) , element . col ( ) , stack . getLiteralPath ( ) , profile . hasSnapshot ( ) ... | the instance validator had no issues against the base resource profile |
32,876 | public Response create ( final String resource ) throws IOException { return execute ( getResourceRequest ( RequestTypeEnum . POST , RestOperationTypeEnum . CREATE ) . resource ( resource ) ) ; } | Create a new resource with a server assigned id |
32,877 | public Response conditionalUpdate ( final String resource ) throws IOException { return execute ( getResourceRequest ( RequestTypeEnum . PUT , RestOperationTypeEnum . UPDATE ) . resource ( resource ) ) ; } | Update an existing resource based on the given condition |
32,878 | public Response delete ( ) throws IOException { return execute ( getResourceRequest ( RequestTypeEnum . DELETE , RestOperationTypeEnum . DELETE ) ) ; } | Delete a resource based on the given condition |
32,879 | @ Path ( "/{id}" ) public Response delete ( @ PathParam ( "id" ) final String id ) throws IOException { return execute ( getResourceRequest ( RequestTypeEnum . DELETE , RestOperationTypeEnum . DELETE ) . id ( id ) ) ; } | Delete a resource |
32,880 | @ Path ( "/{id}" ) public Response find ( @ PathParam ( "id" ) final String id ) throws IOException { return execute ( getResourceRequest ( RequestTypeEnum . GET , RestOperationTypeEnum . READ ) . id ( id ) ) ; } | Read the current state of the resource |
32,881 | 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 ( resource ) . id ( id ) ... | Execute a custom operation |
32,882 | @ 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 ) ; ret... | Retrieve the update history for a particular resource |
32,883 | @ 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 ) . compartment ... | Compartment Based Access |
32,884 | 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 ( Response ) method . invokeSe... | Execute the method described by the requestBuilder and methodKey |
32,885 | protected BaseMethodBinding < ? > getBinding ( final RestOperationTypeEnum restOperation , final String theBindingKey ) { return getBindings ( ) . getBinding ( restOperation , theBindingKey ) ; } | Return the method binding for the given rest operation |
32,886 | private Builder getResourceRequest ( final RequestTypeEnum requestType , final RestOperationTypeEnum restOperation ) { return getRequest ( requestType , restOperation , getResourceType ( ) . getSimpleName ( ) ) ; } | Return the request builder based on the resource name for the server |
32,887 | public void reset ( ) { fieldDelimiter = DEFAULT_DELIMITER_FIELD ; componentDelimiter = DEFAULT_DELIMITER_COMPONENT ; subComponentDelimiter = DEFAULT_DELIMITER_SUBCOMPONENT ; repetitionDelimiter = DEFAULT_DELIMITER_REPETITION ; escapeCharacter = DEFAULT_CHARACTER_ESCAPE ; } | reset to default HL7 values |
32,888 | 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... | check that the delimiters are valid |
32,889 | 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 ; else if ( ch == subComponentDelimite... | get the escape for a character |
32,890 | 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 ; else if ( ch == 'R' ) return repetitionDelimiter ; el... | get escape for ch in an escape |
32,891 | 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 ( JaxRsRes... | This method implements the getpages action |
32,892 | @ 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 < > ( ) ... | Extract all of the resources of a given type from a given bundle |
32,893 | public boolean isAllParametersHaveNoModifier ( ) { for ( List < List < IQueryParameterType > > nextParamName : values ( ) ) { for ( List < IQueryParameterType > nextAnd : nextParamName ) { for ( IQueryParameterType nextOr : nextAnd ) { if ( isNotBlank ( nextOr . getQueryParameterQualifier ( ) ) ) { return false ; } } }... | This will only return true if all parameters have no modifier of any kind |
32,894 | 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 |
32,895 | 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 |
32,896 | 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 |
32,897 | 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 |
32,898 | 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 && upper... | 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 . |
32,899 | public void setPropertyFile ( String ... thePropertyFile ) { Validate . notNull ( thePropertyFile , "Property file can not be null" ) ; myPropertyFile = Arrays . asList ( thePropertyFile ) ; } | Set the property file to use |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.