Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » RDF/XML Model access(Epsilon RDF/XML)
RDF/XML Model access [message #1715438] Mon, 23 November 2015 15:07 Go to next message
Andrea Vassallo is currently offline Andrea VassalloFriend
Messages: 8
Registered: November 2015
Junior Member
Hi all!
I'm new in Epsilon. I need to transform a RDF/XML model but I can't access to the resources.

This is an example of a Terminal resource in my XML file

<cim:Terminal rdf:ID="_fb1b3c11-7bfb-11e2-8e74-00219b4fe24c">
<cim:IdentifiedObject.name>T QI8</cim:IdentifiedObject.name>
<cim:Terminal.connected>true</cim:Terminal.connected>
<cim:Terminal.ConductingEquipment rdf:resource="#_577c7180-6fa0-11e2-89cb-00219b4fe24c"/>
<cim:Terminal.ConnectivityNode rdf:resource="#_fb1b3c10-7bfb-11e2-8e74-00219b4fe24c"/>
</cim:Terminal>

As first step: how can I print the name off all Terminals in my file?

I tried with:
for (ter in t_Terminal.all) {
ter.a_name.println();
}

I guess it doesn't work because is not correct referring to Terminal in this way.

Can someone help me?
Thanks!!
Re: RDF/XML Model access [message #1715470 is a reply to message #1715438] Mon, 23 November 2015 21:42 Go to previous messageGo to next message
Andrea Vassallo is currently offline Andrea VassalloFriend
Messages: 8
Registered: November 2015
Junior Member
I found the way to access to Terminal resource in this way

for (ter in `t_cim:Terminal`.all)

But this approach doesn't work on properties...
Re: RDF/XML Model access [message #1715523 is a reply to message #1715470] Tue, 24 November 2015 09:17 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Andrea,

ter.`a_rdf:resource`
should work.

Thanks,
Dimitris
Re: RDF/XML Model access [message #1715528 is a reply to message #1715523] Tue, 24 November 2015 09:31 Go to previous messageGo to next message
Andrea Vassallo is currently offline Andrea VassalloFriend
Messages: 8
Registered: November 2015
Junior Member
Do you mean I should write like this?

for (ter in `t_cim:Terminal`.all) {
       ter.`a_rdf:resource`.println();
}


Re: RDF/XML Model access [message #1715632 is a reply to message #1715528] Tue, 24 November 2015 19:44 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Yes.

Cheers,
Dimitris
Re: RDF/XML Model access [message #1715676 is a reply to message #1715632] Wed, 25 November 2015 08:32 Go to previous message
Andrea Vassallo is currently offline Andrea VassalloFriend
Messages: 8
Registered: November 2015
Junior Member
Hi Dimitris,
I solved the problem using the c_ prefix.
I found this article that explains all the prefixes

http://www.eclipse.org/epsilon/doc/articles/plain-xml/

Thank you
Previous Topic:HUTN & ANT Script
Next Topic:Very basic tutorial about a new project for ETL
Goto Forum:
  


Current Time: Thu Apr 25 07:46:52 GMT 2024

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

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

Back to the top