TOCReference.java :  » App » edgelibrarylib » nl » siegmann » epublib » domain » Android Open Source

Android Open Source » App » edgelibrarylib 
edgelibrarylib » nl » siegmann » epublib » domain » TOCReference.java
package nl.siegmann.epublib.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * An item in the Table of Contents.
 * 
 * @see nl.siegmann.epublib.domain.TableOfContents
 * 
 * @author paul
 *
 */
public class TOCReference extends TitledResourceReference {

  private List<TOCReference> children;
  
  public TOCReference() {
    this(null, null, null);
  }
  
  public TOCReference(String name, Resource resource) {
    this(name, resource, null);
  }
  
  public TOCReference(String name, Resource resource, String fragmentId) {
    this(name, resource, fragmentId, new ArrayList<TOCReference>());
  }
  
  public TOCReference(String title, Resource resource, String fragmentId, List<TOCReference> children) {
    super(resource, title, fragmentId);
    this.children = children;
  }

  public List<TOCReference> getChildren() {
    return children;
  }

  public TOCReference addChildSection(TOCReference childSection) {
    this.children.add(childSection);
    return childSection;
  }
  
  public void setChildren(List<TOCReference> children) {
    this.children = children;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.