/**
  * Adds information about defined properties.
  *
  * @param pomDescriptor The descriptor for the current POM.
  * @param properties The properties information.
  * @param store The database.
  */
 private void addProperties(
     BaseProfileDescriptor pomDescriptor, Properties properties, Store store) {
   Set<Entry<Object, Object>> entrySet = properties.entrySet();
   for (Entry<Object, Object> entry : entrySet) {
     PropertyDescriptor propertyDescriptor = store.create(PropertyDescriptor.class);
     propertyDescriptor.setName(entry.getKey().toString());
     propertyDescriptor.setValue(entry.getValue().toString());
     pomDescriptor.getProperties().add(propertyDescriptor);
   }
 }
 /**
  * Returns information about child config entries.
  *
  * @param node Current config node.
  * @param store The database.
  * @return Child config information.
  */
 private ValueDescriptor<?> getConfigChildNodes(Xpp3Dom node, Store store) {
   Xpp3Dom[] children = node.getChildren();
   if (children.length == 0) {
     PropertyDescriptor propertyDescriptor = store.create(PropertyDescriptor.class);
     propertyDescriptor.setName(node.getName());
     propertyDescriptor.setValue(node.getValue());
     return propertyDescriptor;
   }
   ArrayValueDescriptor childDescriptor = store.create(ArrayValueDescriptor.class);
   childDescriptor.setName(node.getName());
   for (Xpp3Dom child : children) {
     childDescriptor.getValue().add(getConfigChildNodes(child, store));
   }
   return childDescriptor;
 }
  /**
   * Adds activation information for the given profile.
   *
   * @param mavenProfileDescriptor The profile descriptor.
   * @param activation The activation information.
   * @param store The database.
   */
  private void addActivation(
      MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) {
    if (null == activation) {
      return;
    }
    MavenProfileActivationDescriptor profileActivationDescriptor =
        store.create(MavenProfileActivationDescriptor.class);
    mavenProfileDescriptor.setActivation(profileActivationDescriptor);

    profileActivationDescriptor.setJdk(activation.getJdk());
    profileActivationDescriptor.setActiveByDefault(activation.isActiveByDefault());

    ActivationFile activationFile = activation.getFile();
    if (null != activationFile) {
      MavenActivationFileDescriptor activationFileDescriptor =
          store.create(MavenActivationFileDescriptor.class);
      profileActivationDescriptor.setActivationFile(activationFileDescriptor);
      activationFileDescriptor.setExists(activationFile.getExists());
      activationFileDescriptor.setMissing(activationFile.getMissing());
    }
    ActivationOS os = activation.getOs();
    if (null != os) {
      MavenActivationOSDescriptor osDescriptor = store.create(MavenActivationOSDescriptor.class);
      profileActivationDescriptor.setActivationOS(osDescriptor);
      osDescriptor.setArch(os.getArch());
      osDescriptor.setFamily(os.getFamily());
      osDescriptor.setName(os.getName());
      osDescriptor.setVersion(os.getVersion());
    }
    ActivationProperty property = activation.getProperty();
    if (null != property) {
      PropertyDescriptor propertyDescriptor = store.create(PropertyDescriptor.class);
      profileActivationDescriptor.setProperty(propertyDescriptor);
      propertyDescriptor.setName(property.getName());
      propertyDescriptor.setValue(property.getValue());
    }
  }