2014-11-22 22:18:18 +08:00
|
|
|
#include "terminal.h"
|
2014-11-26 20:49:33 +08:00
|
|
|
#include <iostream>
|
2014-11-24 22:01:30 +08:00
|
|
|
Terminal::Terminal(QObject *parent):BasicElementInfo(parent)
|
2014-11-22 22:18:18 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-26 17:09:37 +08:00
|
|
|
|
|
|
|
|
|
2014-11-22 22:18:18 +08:00
|
|
|
bool Terminal::derivedParse(QXmlStreamReader& reader)
|
|
|
|
|
{
|
|
|
|
|
if("Terminal.ConnectivityNode"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
|
|
|
{
|
|
|
|
|
QString cn;
|
|
|
|
|
cn=reader.attributes().value("rdf:resource").toString();
|
2014-12-06 22:12:17 +08:00
|
|
|
this->connectivityNode=cn.replace("#","").leftRef(-1).toString();
|
2014-11-22 22:18:18 +08:00
|
|
|
qDebug()<<"got "<<"Terminal.ConnectivityNode "<<this->connectivityNode<<"\n";
|
2014-11-26 17:09:37 +08:00
|
|
|
NodeToTerminal nt;
|
|
|
|
|
nt.add(this->connectivityNode,this->id);
|
2014-11-22 22:18:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if("Terminal.ConductingEquipment"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
|
|
|
{
|
|
|
|
|
QString ce;
|
|
|
|
|
ce=reader.attributes().value("rdf:resource").toString();
|
2014-12-06 22:12:17 +08:00
|
|
|
this->conductingEquipment=ce.replace("#","").leftRef(-1).toString();
|
2014-11-22 22:18:18 +08:00
|
|
|
qDebug()<<"got "<<"Terminal.ConductingEquipment "<<this->conductingEquipment<<"\n";
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-26 17:09:37 +08:00
|
|
|
|
|
|
|
|
QString Terminal::getConductingEquipment()
|
|
|
|
|
{
|
|
|
|
|
return this->conductingEquipment;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-26 20:49:33 +08:00
|
|
|
QString Terminal::getConnectivityNode()
|
|
|
|
|
{
|
|
|
|
|
return this->connectivityNode;
|
|
|
|
|
}
|
2014-11-26 17:09:37 +08:00
|
|
|
|
2014-11-22 22:18:18 +08:00
|
|
|
bool Terminal::parse(QXmlStreamReader& reader)
|
|
|
|
|
{
|
|
|
|
|
return this->parseBasicInfo(reader);
|
|
|
|
|
}
|
2014-11-26 20:49:33 +08:00
|
|
|
|
|
|
|
|
|