All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nz.net.ultraq.preferences.xml.XMLNode Maven / Gradle / Ivy

Go to download

An implementation of the Java Preferences API (java.util.prefs) to store preferences in an XML file, in a subdirectory of a Java program's working directory.

There is a newer version: 2.0.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2012.08.12 at 10:21:32 PM NZST 
//


package nz.net.ultraq.preferences.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;


/**
 * 

Java class for Node complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Node">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="entries" type="{http://www.ultraq.net.nz/preferences/xml}Entries" minOccurs="0"/>
 *         <element name="nodes" type="{http://www.ultraq.net.nz/preferences/xml}Nodes" minOccurs="0"/>
 *       </sequence>
 *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Node", propOrder = { "entries", "nodes" }) @XmlSeeAlso({ XMLRoot.class }) public class XMLNode { @XmlAttribute(name = "name", required = true) protected String name; @XmlElementWrapper(name = "entries") @XmlElement(name = "entry") protected List entries; @XmlElementWrapper(name = "nodes") @XmlElement(name = "node") protected List nodes; /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } public List getEntries() { if (entries == null) { entries = new ArrayList(); } return entries; } public List getNodes() { if (nodes == null) { nodes = new ArrayList(); } return nodes; } /** * Default constructor. */ public XMLNode() { } /** * Constructor, set the name of this node. * * @param name */ public XMLNode(String name) { this.name = name; } /** * Compares preferences nodes. Nodes are equal if they share the same * 'package' name. * * @return true if both objects share the same package name, * false otherwise. */ @Override public boolean equals(Object o) { return o instanceof XMLNode && ((XMLNode)o).name.equals(name); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy