コード例 #1
0
 private DataDescription makeDataDescription(
     final String atg, final String asp, final short simulationVariant)
     throws MissingObjectException {
   final AttributeGroup attributeGroup = tryGetAttributeGroup(_connection, atg);
   final Aspect aspect = tryGetAspect(_connection, asp);
   if (!attributeGroup.getAspects().contains(aspect)) {
     throw new MissingObjectException(
         "Der Aspekt "
             + aspect
             + " kann nicht der Attributgruppe "
             + attributeGroup
             + " zugeordnet werden.");
   }
   return new DataDescription(attributeGroup, aspect, simulationVariant);
 }
コード例 #2
0
 /**
  * Liest alle Konfigurationsdaten dieses Objekts
  *
  * @return Konfigurationsdaten
  * @throws MissingObjectException Falls ein Objekt fehlt (entweder das Systemobjekt, oder die
  *     Attributgruppe oder der Aspekt)
  */
 public Map<PidAttributeGroupUsage, KExDaVAttributeGroupData> getAllConfigurationData()
     throws MissingObjectException {
   final SystemObject wrappedObject = getWrappedObjectOrThrowException();
   final Map<PidAttributeGroupUsage, KExDaVAttributeGroupData> result =
       new HashMap<PidAttributeGroupUsage, KExDaVAttributeGroupData>();
   final List<AttributeGroup> attributeGroups = wrappedObject.getType().getAttributeGroups();
   for (final AttributeGroup attributeGroup : attributeGroups) {
     final Collection<Aspect> aspects = attributeGroup.getAspects();
     for (final Aspect aspect : aspects) {
       final Data data = wrappedObject.getConfigurationData(attributeGroup, aspect);
       if (data != null) {
         result.put(
             new PidAttributeGroupUsage(attributeGroup.getPid(), aspect.getPid()),
             new KExDaVAttributeGroupData(data, _manager));
       }
     }
   }
   return result;
 }