/** * @return the configuration */ protected HierarchicalConfiguration createConfiguration() { XMLConfiguration config = new XMLConfiguration(); config.setRootElementName("report"); config.setDelimiterParsingDisabled(true); return config; }
public void saveIntermediateGMLFile() throws IOException{ XMLConfiguration configuration = getConfiguration(); configuration.setRootElementName("gml"); List<Path> instancePathCollection; for(int partitionId : _partitionedTemplates.keySet()){ configuration.addProperty("partition(-1)[@id]", partitionId); configuration.addProperty("partition.template", _partitionedTemplates.get(partitionId).toFile().getAbsolutePath()); instancePathCollection = _partitionedInstances.get(partitionId); for(Path instancePath : instancePathCollection){ configuration.addProperty("partition.instances.instance(-1)", instancePath.toFile().getAbsolutePath()); } } try { File partitionedGMLFileDir = _workingDirPath.resolve(_intermediateGMLInputFile).toFile(); configuration.save(partitionedGMLFileDir); System.out.println("saving the partitioned gml information to " + partitionedGMLFileDir.getAbsolutePath()); } catch (ConfigurationException e) { throw new RuntimeException(e); } }
/** * Creates a new instance of {@code XMLConfiguration} and copies the * content of the passed in configuration into this object. Note that only * the data of the passed in configuration will be copied. If, for instance, * the other configuration is a {@code XMLConfiguration}, too, * things like comments or processing instructions will be lost. * * @param c the configuration to copy * @since 1.4 */ public XMLConfiguration(HierarchicalConfiguration c) { super(c); clearReferences(getRootNode()); setRootElementName(getRootNode().getName()); setLogger(LogFactory.getLog(XMLConfiguration.class)); }
/** * Creates a new instance of {@code XMLConfiguration} and copies the * content of the passed in configuration into this object. Note that only * the data of the passed in configuration will be copied. If, for instance, * the other configuration is a {@code XMLConfiguration}, too, * things like comments or processing instructions will be lost. * * @param c the configuration to copy * @since 1.4 */ public XMLConfiguration(HierarchicalConfiguration c) { super(c); clearReferences(getRootNode()); setRootElementName(getRootNode().getName()); setLogger(LogFactory.getLog(XMLConfiguration.class)); }
Configuration cc = new CompositeConfiguration(saveConfiguration); saveConfiguration.setRootElementName("uddi");
public static XMLConfiguration writeAnimation( Animation anim, String path, ChannelsParameterSource source, Set<SynchronizedPointGroup> syncPointGroups){ XMLConfiguration config = new XMLConfiguration(); config.setRootElementName(ANIMATION); ConfigurationNode node = config.getRootNode(); node.addChild(XMLConfigUtils.writeVersion(anim.getVersion(), ANIMATION_VERSION_TYPE)); node.addChild(writeChannels(anim.getChannels())); node.addChild(writeAddOnList(anim.getAddOns(), path)); node.addChild(writeChannelsParameters(source)); node.addChild(SyncPointGroupXML.ApacheWriter.writeSyncGroups(syncPointGroups)); return config; }