2014-11-22 22:18:18 +08:00
|
|
|
#include "disconnector.h"
|
|
|
|
|
|
2014-11-24 22:01:30 +08:00
|
|
|
Disconnector::Disconnector(QObject *parent):BasicElementInfo(parent)
|
2014-11-22 22:18:18 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool Disconnector::derivedParse(QXmlStreamReader &reader)
|
|
|
|
|
{
|
|
|
|
|
if(this->isTerminalA && "ConductingEquipment.Terminals"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
|
|
|
{
|
|
|
|
|
QString terminal;
|
|
|
|
|
terminal=reader.attributes().value("rdf:resource").toString();
|
2014-11-24 22:01:30 +08:00
|
|
|
this->terminalA=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
|
2014-11-22 22:18:18 +08:00
|
|
|
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminalA<<"\n";
|
|
|
|
|
this->isTerminalA=false;
|
|
|
|
|
}
|
|
|
|
|
if(!this->isTerminalA && "ConductingEquipment.Terminals"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
|
|
|
{
|
|
|
|
|
QString terminal;
|
|
|
|
|
terminal=reader.attributes().value("rdf:resource").toString();
|
2014-11-24 22:01:30 +08:00
|
|
|
this->terminalB=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
|
2014-11-22 22:18:18 +08:00
|
|
|
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminalB<<"\n";
|
|
|
|
|
}
|
|
|
|
|
if("Equipment.MemberOf_EquipmentContainer"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
|
|
|
|
|
{
|
|
|
|
|
QString ss;
|
|
|
|
|
ss=reader.attributes().value("rdf:resource").toString();
|
2014-11-24 22:01:30 +08:00
|
|
|
this->equipmentContainer=ss.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
|
2014-11-22 22:18:18 +08:00
|
|
|
qDebug()<<"got "<<"Equipment.MemberOf_EquipmentContainer "<<this->equipmentContainer<<"\n";
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool Disconnector::parse(QXmlStreamReader &reader)
|
|
|
|
|
{
|
|
|
|
|
return this->parseBasicInfo(reader);
|
|
|
|
|
}
|