Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » OHF » How to Create Organization Information
How to Create Organization Information [message #48687] Tue, 07 October 2008 09:51 Go to next message
RobertHua is currently offline RobertHuaFriend
Messages: 58
Registered: July 2009
Member
<representedOrganization>
<id root="8a54f393-8015-460c-abd2-f29aad15481c"/>
<name>Good Health Disease Management</name>
<telecom value="tel:(999)555-1212" use="DIR"/>
<addr>
<streetAddressLine>21 North Ave</streetAddressLine>
<city>Burlington</city>
<state>MA</state>
<postalCode>01803</postalCode>
<country>USA</country>
</addr>
</representedOrganization>

What is the object type in the function
representedOrganization.getName().add(Object)? And the object type
representedOrganization.getTelecom().add£šObject£©?
In other words, how to write code to set the Organization Information.
This confused me for hours.


Thanks in advance!
Re: How to Create Organization Information [message #48751 is a reply to message #48687] Wed, 08 October 2008 09:40 Go to previous messageGo to next message
RobertHua is currently offline RobertHuaFriend
Messages: 58
Registered: July 2009
Member
The addr was setted sucessful.But the use of telecom attributes value was
not setted.
How can set it?
Thanks!
Re: How to Create Organization Information [message #48781 is a reply to message #48751] Wed, 08 October 2008 17:56 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 292
Registered: July 2009
Senior Member
Hi Robert,

Using the CDA schema and CDA examples as a guide will help you. telecom
is of type TEL and the actual telephone number/email/web
address/whatever will be set in the value attribute:

// create a TEL data type
TEL telecom = CDAR2Factory.eINSTANCE.createTEL();
// set the value
telecom.setValue("<telephone number>");
// add to the list of telecom for the organization
organization.getTelecom().add(telecom);

Again, EMF tutorials will be your best way to learn how to interact with
EMF.

- Sarah


RobertHua wrote:
> The addr was setted sucessful.But the use of telecom attributes value
> was not setted.
> How can set it?
> Thanks!
>
Re: How to Create Organization Information [message #48869 is a reply to message #48781] Thu, 09 October 2008 05:30 Go to previous messageGo to next message
RobertHua is currently offline RobertHuaFriend
Messages: 58
Registered: July 2009
Member
XML:<telecom value="tel:(999)555-1212" use="DIR"/>
The telecom element have two attributes,vaule and use.Thank you for your
code.The code that you give me can set the value's value,but how to set
the use value?
Re: How to Create Organization Information [message #48933 is a reply to message #48869] Thu, 09 October 2008 14:46 Go to previous message
No real name is currently offline No real nameFriend
Messages: 292
Registered: July 2009
Senior Member
Pretty much you can set it the same way ... there is a setUse method and
it will take an enumeration value from the TelecomAddressUse (or
something named simmilar -- I don't have access to the code at the
moment) enumeration.

- Sarah


RobertHua wrote:
> XML:<telecom value="tel:(999)555-1212" use="DIR"/>
> The telecom element have two attributes,vaule and use.Thank you for your
> code.The code that you give me can set the value's value,but how to set
> the use value?
>
>
Re: How to Create Organization Information [message #587855 is a reply to message #48687] Wed, 08 October 2008 09:40 Go to previous message
RobertHua is currently offline RobertHuaFriend
Messages: 58
Registered: July 2009
Member
The addr was setted sucessful.But the use of telecom attributes value was
not setted.
How can set it?
Thanks!
Re: How to Create Organization Information [message #587859 is a reply to message #48751] Wed, 08 October 2008 17:56 Go to previous message
No real name is currently offline No real nameFriend
Messages: 292
Registered: July 2009
Senior Member
Hi Robert,

Using the CDA schema and CDA examples as a guide will help you. telecom
is of type TEL and the actual telephone number/email/web
address/whatever will be set in the value attribute:

// create a TEL data type
TEL telecom = CDAR2Factory.eINSTANCE.createTEL();
// set the value
telecom.setValue("<telephone number>");
// add to the list of telecom for the organization
organization.getTelecom().add(telecom);

Again, EMF tutorials will be your best way to learn how to interact with
EMF.

- Sarah


RobertHua wrote:
> The addr was setted sucessful.But the use of telecom attributes value
> was not setted.
> How can set it?
> Thanks!
>
Re: How to Create Organization Information [message #587882 is a reply to message #48781] Thu, 09 October 2008 05:30 Go to previous message
RobertHua is currently offline RobertHuaFriend
Messages: 58
Registered: July 2009
Member
XML:<telecom value="tel:(999)555-1212" use="DIR"/>
The telecom element have two attributes,vaule and use.Thank you for your
code.The code that you give me can set the value's value,but how to set
the use value?
Re: How to Create Organization Information [message #587893 is a reply to message #48869] Thu, 09 October 2008 14:46 Go to previous message
No real name is currently offline No real nameFriend
Messages: 292
Registered: July 2009
Senior Member
Pretty much you can set it the same way ... there is a setUse method and
it will take an enumeration value from the TelecomAddressUse (or
something named simmilar -- I don't have access to the code at the
moment) enumeration.

- Sarah


RobertHua wrote:
> XML:<telecom value="tel:(999)555-1212" use="DIR"/>
> The telecom element have two attributes,vaule and use.Thank you for your
> code.The code that you give me can set the value's value,but how to set
> the use value?
>
>
Previous Topic:Set Value?
Next Topic:Set Value?
Goto Forum:
  


Current Time: Thu Apr 18 05:37:58 GMT 2024

Powered by FUDForum. Page generated in 0.02261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top