You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Peter Szolovits <ps...@mit.edu> on 2015/10/26 18:11:41 UTC

Can one pass UMLS username and password as API arguments?

I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits


RE: Can one pass UMLS username and password as API arguments?

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
POJ:  
http://docs.oracle.com/javase/8/docs/api/java/lang/System.html

System.setProperty( "ctakes.umlsuser", "Pete" );
System.setProperty( "ctakes.umlspw", "MyPassword" );

That should do it.

Sean


-----Original Message-----
From: Peter Szolovits [mailto:psz@mit.edu] 
Sent: Monday, October 26, 2015 1:27 PM
To: dev@ctakes.apache.org
Subject: Re: Can one pass UMLS username and password as API arguments?

I know that, but was asking specifically whether there is a way for this info to be passed in by a program that embeds cTakes, without having to set environment variables or muck with the java command line.

> On Oct 26, 2015, at 1:18 PM, Finan, Sean <Se...@childrens.harvard.edu> wrote:
> 
> You should be able to use ctakes.umlsuser and ctakes.umlspw in the command line or as environment variables.  If your shell requires, you can replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw
> 
> Sean
> 
> -----Original Message-----
> From: Peter Szolovits [mailto:psz@mit.edu] 
> Sent: Monday, October 26, 2015 1:12 PM
> To: dev@ctakes.apache.org
> Subject: Can one pass UMLS username and password as API arguments?
> 
> I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits
> 


Re: Can one pass UMLS username and password as API arguments?

Posted by Pei Chen <pe...@wiredinformatics.com>.
Yes, I wasn’t sure if your application had a security restriction to store
paw’s into the env var for any code to read.

Anyhow, anyone should be able to create an Jira account at:

https://issues.apache.org/jira/browse/CTAKES

    Pei Chen
Wired Informatics <http://www.wiredinformatics.com>
265 Franklin St Ste 1702
Boston, MA 02110
tel: (617) 433-7544
Pei.Chen@wiredinformatics.com

On Mon, Oct 26, 2015 at 2:06 PM, Peter Szolovits <ps...@mit.edu> wrote:

> Thanks, Sean and Pei.  Sean’s suggestion to set the properties via
> System.setProperty() works; I had forgotten that this was doable in Java.
> I think the suggestion of an overloaded method is still a good idea, but I
> also don’t remember how to create a Jira.  —Pete
>
> > On Oct 26, 2015, at 1:44 PM, Pei Chen <ch...@apache.org> wrote:
> >
> > Pete,
> > System.setProperty()?
> > Were you suggest we add an overloaded method?:
> > ClinicalPipelineFactory.getFastPipeline(String user, String pw) {}
> > It's not a bad suggestion- if you require it, feel free to create a
> > Jira or even better a patch...
> > --Pei
> >
> >
> > On Mon, Oct 26, 2015 at 1:27 PM, Peter Szolovits <ps...@mit.edu> wrote:
> >> I know that, but was asking specifically whether there is a way for
> this info to be passed in by a program that embeds cTakes, without having
> to set environment variables or muck with the java command line.
> >>
> >>> On Oct 26, 2015, at 1:18 PM, Finan, Sean <
> Sean.Finan@childrens.harvard.edu> wrote:
> >>>
> >>> You should be able to use ctakes.umlsuser and ctakes.umlspw in the
> command line or as environment variables.  If your shell requires, you can
> replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw
> >>>
> >>> Sean
> >>>
> >>> -----Original Message-----
> >>> From: Peter Szolovits [mailto:psz@mit.edu]
> >>> Sent: Monday, October 26, 2015 1:12 PM
> >>> To: dev@ctakes.apache.org
> >>> Subject: Can one pass UMLS username and password as API arguments?
> >>>
> >>> I am embedding cTakes as part of a larger (Java-based) processing
> program and would like to be able to pass the user’s UMLS username and
> password when setting up the cTakes API rather than embedding them in UIMA
> configuration files or having to give them as java vm arguments.  E.g., at
> some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.
> Is there a way to do this that I have not been able to find?  Thank you.
> —Peter Szolovits
> >>>
> >>
>
>

Re: Can one pass UMLS username and password as API arguments?

Posted by Peter Szolovits <ps...@mit.edu>.
Thanks, Sean and Pei.  Sean’s suggestion to set the properties via System.setProperty() works; I had forgotten that this was doable in Java.  I think the suggestion of an overloaded method is still a good idea, but I also don’t remember how to create a Jira.  —Pete

> On Oct 26, 2015, at 1:44 PM, Pei Chen <ch...@apache.org> wrote:
> 
> Pete,
> System.setProperty()?
> Were you suggest we add an overloaded method?:
> ClinicalPipelineFactory.getFastPipeline(String user, String pw) {}
> It's not a bad suggestion- if you require it, feel free to create a
> Jira or even better a patch...
> --Pei
> 
> 
> On Mon, Oct 26, 2015 at 1:27 PM, Peter Szolovits <ps...@mit.edu> wrote:
>> I know that, but was asking specifically whether there is a way for this info to be passed in by a program that embeds cTakes, without having to set environment variables or muck with the java command line.
>> 
>>> On Oct 26, 2015, at 1:18 PM, Finan, Sean <Se...@childrens.harvard.edu> wrote:
>>> 
>>> You should be able to use ctakes.umlsuser and ctakes.umlspw in the command line or as environment variables.  If your shell requires, you can replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw
>>> 
>>> Sean
>>> 
>>> -----Original Message-----
>>> From: Peter Szolovits [mailto:psz@mit.edu]
>>> Sent: Monday, October 26, 2015 1:12 PM
>>> To: dev@ctakes.apache.org
>>> Subject: Can one pass UMLS username and password as API arguments?
>>> 
>>> I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits
>>> 
>> 


Re: Can one pass UMLS username and password as API arguments?

Posted by Pei Chen <ch...@apache.org>.
Pete,
System.setProperty()?
Were you suggest we add an overloaded method?:
ClinicalPipelineFactory.getFastPipeline(String user, String pw) {}
It's not a bad suggestion- if you require it, feel free to create a
Jira or even better a patch...
--Pei


On Mon, Oct 26, 2015 at 1:27 PM, Peter Szolovits <ps...@mit.edu> wrote:
> I know that, but was asking specifically whether there is a way for this info to be passed in by a program that embeds cTakes, without having to set environment variables or muck with the java command line.
>
>> On Oct 26, 2015, at 1:18 PM, Finan, Sean <Se...@childrens.harvard.edu> wrote:
>>
>> You should be able to use ctakes.umlsuser and ctakes.umlspw in the command line or as environment variables.  If your shell requires, you can replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw
>>
>> Sean
>>
>> -----Original Message-----
>> From: Peter Szolovits [mailto:psz@mit.edu]
>> Sent: Monday, October 26, 2015 1:12 PM
>> To: dev@ctakes.apache.org
>> Subject: Can one pass UMLS username and password as API arguments?
>>
>> I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits
>>
>

Re: Can one pass UMLS username and password as API arguments?

Posted by Peter Szolovits <ps...@mit.edu>.
I know that, but was asking specifically whether there is a way for this info to be passed in by a program that embeds cTakes, without having to set environment variables or muck with the java command line.

> On Oct 26, 2015, at 1:18 PM, Finan, Sean <Se...@childrens.harvard.edu> wrote:
> 
> You should be able to use ctakes.umlsuser and ctakes.umlspw in the command line or as environment variables.  If your shell requires, you can replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw
> 
> Sean
> 
> -----Original Message-----
> From: Peter Szolovits [mailto:psz@mit.edu] 
> Sent: Monday, October 26, 2015 1:12 PM
> To: dev@ctakes.apache.org
> Subject: Can one pass UMLS username and password as API arguments?
> 
> I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits
> 


RE: Can one pass UMLS username and password as API arguments?

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
You should be able to use ctakes.umlsuser and ctakes.umlspw in the command line or as environment variables.  If your shell requires, you can replace the dot with underscore: ctakes_umlsuser  ctakes_umlspw

Sean

-----Original Message-----
From: Peter Szolovits [mailto:psz@mit.edu] 
Sent: Monday, October 26, 2015 1:12 PM
To: dev@ctakes.apache.org
Subject: Can one pass UMLS username and password as API arguments?

I am embedding cTakes as part of a larger (Java-based) processing program and would like to be able to pass the user’s UMLS username and password when setting up the cTakes API rather than embedding them in UIMA configuration files or having to give them as java vm arguments.  E.g., at some place such as a call to ClinicalPipelineFactory.getFastPipeline()g.  Is there a way to do this that I have not been able to find?  Thank you.  —Peter Szolovits