Re: [Dev] Implementing -Dsetup in a Carbon product

2015-11-23 Thread Hasitha Hiranya
Hi,

Thanks, Nirmal/Anuruddha, sources were useful

Thanks

On Sun, Nov 22, 2015 at 6:09 PM, Nirmal Fernando  wrote:

> Hi Hasitha,
>
> Check this
> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLDatabaseService.java#L63
> to
> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLDatabaseService.java#L83
>
> On Sat, Nov 21, 2015 at 9:24 PM, Hasitha Hiranya 
> wrote:
>
>> Hi Anuruddha,
>>
>> Thanks for the response.
>> Spotted following code,
>>
>>
>> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLConfigurationParser.java
>> 
>>
>> Here we use javax.xml.bind.Unmarshaller
>>
>> With
>>
>>
>> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.commons/src/main/java/org/wso2/carbon/ml/commons/domain/config/MLConfiguration.java
>> 
>>
>> Is this the way to decrypt the xml tags properly? Are we looking at the
>> correct place?
>>
>> Thanks
>>
>> On Sat, Nov 21, 2015 at 6:46 PM, Anuruddha Premalal 
>> wrote:
>>
>>> Hi Hiranya,
>>>
>>> [1] might help you.
>>>
>>> [1]
>>> https://github.com/wso2/carbon-ml/tree/master/components/ml/org.wso2.carbon.ml.database
>>>
>>> On Sat, Nov 21, 2015 at 8:58 AM, Hasitha Hiranya 
>>> wrote:
>>>
 Hi,

 In our carbon product, we have a new database to deal with. We have the
 DB script that creates the necessary tables to work with the product in a
 specified  database pointed by
 /repository/conf/datasources/masterdatasource.xml.

 If we write a code to source the DB Script, we need to
 read masterdatasource.xml file ourselves and decode necessary xml values
 from data source configuration. Is this the correct way of doing it?

 Or does Carbon have some interface or configuration object where it
 loads the configs in masterdatasource.xml so that our code can read from?

 Thanks
 --
 *Hasitha Abeykoon*
 Senior Software Engineer; WSO2, Inc.; http://wso2.com
 *cell:* *+94 719363063*
 *blog: **abeykoon.blogspot.com* 


 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> *Anuruddha Premalal*
>>> Software Eng. | WSO2 Inc.
>>> Mobile : +94717213122
>>> Web site : www.anuruddha.org
>>>
>>>
>>
>>
>> --
>> *Hasitha Abeykoon*
>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>> *cell:* *+94 719363063*
>> *blog: **abeykoon.blogspot.com* 
>>
>>
>
>
> --
>
> Thanks & regards,
> Nirmal
>
> Team Lead - WSO2 Machine Learner
> Associate Technical Lead - Data Technologies Team, WSO2 Inc.
> Mobile: +94715779733
> Blog: http://nirmalfdo.blogspot.com/
>
>
>


-- 
*Hasitha Abeykoon*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Implementing -Dsetup in a Carbon product

2015-11-22 Thread Nirmal Fernando
Hi Hasitha,

Check this
https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLDatabaseService.java#L63
to
https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLDatabaseService.java#L83

On Sat, Nov 21, 2015 at 9:24 PM, Hasitha Hiranya  wrote:

> Hi Anuruddha,
>
> Thanks for the response.
> Spotted following code,
>
>
> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLConfigurationParser.java
> 
>
> Here we use javax.xml.bind.Unmarshaller
>
> With
>
>
> https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.commons/src/main/java/org/wso2/carbon/ml/commons/domain/config/MLConfiguration.java
> 
>
> Is this the way to decrypt the xml tags properly? Are we looking at the
> correct place?
>
> Thanks
>
> On Sat, Nov 21, 2015 at 6:46 PM, Anuruddha Premalal 
> wrote:
>
>> Hi Hiranya,
>>
>> [1] might help you.
>>
>> [1]
>> https://github.com/wso2/carbon-ml/tree/master/components/ml/org.wso2.carbon.ml.database
>>
>> On Sat, Nov 21, 2015 at 8:58 AM, Hasitha Hiranya 
>> wrote:
>>
>>> Hi,
>>>
>>> In our carbon product, we have a new database to deal with. We have the
>>> DB script that creates the necessary tables to work with the product in a
>>> specified  database pointed by
>>> /repository/conf/datasources/masterdatasource.xml.
>>>
>>> If we write a code to source the DB Script, we need to
>>> read masterdatasource.xml file ourselves and decode necessary xml values
>>> from data source configuration. Is this the correct way of doing it?
>>>
>>> Or does Carbon have some interface or configuration object where it
>>> loads the configs in masterdatasource.xml so that our code can read from?
>>>
>>> Thanks
>>> --
>>> *Hasitha Abeykoon*
>>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>>> *cell:* *+94 719363063*
>>> *blog: **abeykoon.blogspot.com* 
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Anuruddha Premalal*
>> Software Eng. | WSO2 Inc.
>> Mobile : +94717213122
>> Web site : www.anuruddha.org
>>
>>
>
>
> --
> *Hasitha Abeykoon*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* 
>
>


-- 

Thanks & regards,
Nirmal

Team Lead - WSO2 Machine Learner
Associate Technical Lead - Data Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Implementing -Dsetup in a Carbon product

2015-11-21 Thread Hasitha Hiranya
Hi Anuruddha,

Thanks for the response.
Spotted following code,

https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.database/src/main/java/org/wso2/carbon/ml/database/internal/MLConfigurationParser.java


Here we use javax.xml.bind.Unmarshaller

With

https://github.com/wso2/carbon-ml/blob/master/components/ml/org.wso2.carbon.ml.commons/src/main/java/org/wso2/carbon/ml/commons/domain/config/MLConfiguration.java


Is this the way to decrypt the xml tags properly? Are we looking at the
correct place?

Thanks

On Sat, Nov 21, 2015 at 6:46 PM, Anuruddha Premalal 
wrote:

> Hi Hiranya,
>
> [1] might help you.
>
> [1]
> https://github.com/wso2/carbon-ml/tree/master/components/ml/org.wso2.carbon.ml.database
>
> On Sat, Nov 21, 2015 at 8:58 AM, Hasitha Hiranya 
> wrote:
>
>> Hi,
>>
>> In our carbon product, we have a new database to deal with. We have the
>> DB script that creates the necessary tables to work with the product in a
>> specified  database pointed by
>> /repository/conf/datasources/masterdatasource.xml.
>>
>> If we write a code to source the DB Script, we need to
>> read masterdatasource.xml file ourselves and decode necessary xml values
>> from data source configuration. Is this the correct way of doing it?
>>
>> Or does Carbon have some interface or configuration object where it loads
>> the configs in masterdatasource.xml so that our code can read from?
>>
>> Thanks
>> --
>> *Hasitha Abeykoon*
>> Senior Software Engineer; WSO2, Inc.; http://wso2.com
>> *cell:* *+94 719363063*
>> *blog: **abeykoon.blogspot.com* 
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Anuruddha Premalal*
> Software Eng. | WSO2 Inc.
> Mobile : +94717213122
> Web site : www.anuruddha.org
>
>


-- 
*Hasitha Abeykoon*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
*cell:* *+94 719363063*
*blog: **abeykoon.blogspot.com* 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Implementing -Dsetup in a Carbon product

2015-11-21 Thread Anuruddha Premalal
Hi Hiranya,

[1] might help you.

[1]
https://github.com/wso2/carbon-ml/tree/master/components/ml/org.wso2.carbon.ml.database

On Sat, Nov 21, 2015 at 8:58 AM, Hasitha Hiranya  wrote:

> Hi,
>
> In our carbon product, we have a new database to deal with. We have the DB
> script that creates the necessary tables to work with the product in a
> specified  database pointed by
> /repository/conf/datasources/masterdatasource.xml.
>
> If we write a code to source the DB Script, we need to
> read masterdatasource.xml file ourselves and decode necessary xml values
> from data source configuration. Is this the correct way of doing it?
>
> Or does Carbon have some interface or configuration object where it loads
> the configs in masterdatasource.xml so that our code can read from?
>
> Thanks
> --
> *Hasitha Abeykoon*
> Senior Software Engineer; WSO2, Inc.; http://wso2.com
> *cell:* *+94 719363063*
> *blog: **abeykoon.blogspot.com* 
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Anuruddha Premalal*
Software Eng. | WSO2 Inc.
Mobile : +94717213122
Web site : www.anuruddha.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev