本文整理了Java中org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology.getKey()
方法的一些代码示例,展示了Topology.getKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Topology.getKey()
方法的具体详情如下:
包路径:org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology
类名称:Topology
方法名:getKey
[英]Returns Primary Key of Yang List Type
[中]返回列表类型的主键
代码示例来源:origin: org.opendaylight.yangtools/bug1196-test-model
public TopologyBuilder(Topology base) {
if (base.getKey() == null) {
this._key = new TopologyKey(
base.getTopologyId()
);
this._topologyId = base.getTopologyId();
} else {
this._key = base.getKey();
this._topologyId = _key.getTopologyId();
}
this._node = base.getNode();
if (base instanceof TopologyImpl) {
TopologyImpl impl = (TopologyImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology>) base;
if (!casted.augmentations().isEmpty()) {
this.augmentation = new HashMap<>(casted.augmentations());
}
}
}
代码示例来源:origin: org.opendaylight.yangtools/bug1196-test-model
if (other.getKey() != null) {
return false;
} else if(!_key.equals(other.getKey())) {
return false;
代码示例来源:origin: org.opendaylight.yangtools.model/ietf-topology
public TopologyBuilder(Topology base) {
if (base.getKey() == null) {
this._key = new TopologyKey(
base.getTopologyId()
);
this._topologyId = base.getTopologyId();
} else {
this._key = base.getKey();
this._topologyId = _key.getTopologyId();
}
this._link = base.getLink();
this._node = base.getNode();
this._topologyTypes = base.getTopologyTypes();
this._underlayTopology = base.getUnderlayTopology();
this._serverProvided = base.isServerProvided();
if (base instanceof TopologyImpl) {
TopologyImpl impl = (TopologyImpl) base;
if (!impl.augmentation.isEmpty()) {
this.augmentation = new HashMap<>(impl.augmentation);
}
} else if (base instanceof AugmentationHolder) {
@SuppressWarnings("unchecked")
AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology>) base;
if (!casted.augmentations().isEmpty()) {
this.augmentation = new HashMap<>(casted.augmentations());
}
}
}
代码示例来源:origin: org.opendaylight.bgpcep/bgp-topology-provider
private static void writeConfiguration(final DataBroker dataBroker, final Topology topology) {
final KeyedInstanceIdentifier<Topology, TopologyKey> topologyIId = InstanceIdentifier.create(NetworkTopology.class).child(Topology.class,
topology.getKey());
final WriteTransaction wTx = dataBroker.newWriteOnlyTransaction();
wTx.put(LogicalDatastoreType.CONFIGURATION, topologyIId, topology, true);
wTx.submit();
}
代码示例来源:origin: org.opendaylight.yangtools.model/ietf-topology
if (other.getKey() != null) {
return false;
} else if(!_key.equals(other.getKey())) {
return false;
内容来源于网络,如有侵权,请联系作者删除!