42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#include "terminal.h"
|
|
|
|
Terminal::Terminal(QObject *parent):BasicElementInfo(parent)
|
|
{
|
|
}
|
|
|
|
|
|
|
|
bool Terminal::derivedParse(QXmlStreamReader& reader)
|
|
{
|
|
if("Terminal.ConnectivityNode"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
{
|
|
QString cn;
|
|
cn=reader.attributes().value("rdf:resource").toString();
|
|
this->connectivityNode=cn.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
|
|
qDebug()<<"got "<<"Terminal.ConnectivityNode "<<this->connectivityNode<<"\n";
|
|
NodeToTerminal nt;
|
|
nt.add(this->connectivityNode,this->id);
|
|
}
|
|
|
|
if("Terminal.ConductingEquipment"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
{
|
|
QString ce;
|
|
ce=reader.attributes().value("rdf:resource").toString();
|
|
this->conductingEquipment=ce.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
|
|
qDebug()<<"got "<<"Terminal.ConductingEquipment "<<this->conductingEquipment<<"\n";
|
|
}
|
|
return true;
|
|
}
|
|
|
|
|
|
QString Terminal::getConductingEquipment()
|
|
{
|
|
return this->conductingEquipment;
|
|
}
|
|
|
|
|
|
bool Terminal::parse(QXmlStreamReader& reader)
|
|
{
|
|
return this->parseBasicInfo(reader);
|
|
}
|