org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology.getKey()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(126)

本文整理了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

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;

相关文章