fr.paris5.shaman.insight.model
Class TopicModel

java.lang.Object
  |
  +--fr.paris5.shaman.insight.model.TopicModel
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RootTopicModel

public class TopicModel
extends java.lang.Object
implements java.io.Serializable

The persistent implementation of a Topic.

Version:
$Id: TopicModel.java,v 1.6 2002/07/25 13:18:08 caillette Exp $
Author:
Laurent Caillette
See Also:
Serialized Form

Field Summary
private  java.util.ArrayList children
           
private  PublicationModel defaultPublication
           
private  long id
           
private  java.lang.String name
           
private  TopicModel parent
           
private  java.util.ArrayList publications
           
 
Constructor Summary
protected TopicModel(long rootId)
          Only used by RootTopicModel.
  TopicModel(TopicModel parent, java.lang.String name)
           
 
Method Summary
(package private)  void addPublication(PublicationModel publication)
           
private  void addTopic(TopicModel topic)
           
(package private)  long createPublicationId()
           
 TopicModel[] getAllChildren()
          Returns all children (recursively).
 TopicModel[] getAllChildren(boolean includeThis)
          Returns all children (recursively).
private  void getAllChildren(TopicModel parent, java.util.List childrenList)
           
 TopicModel getChild(java.lang.String name)
           
 int getChildCount()
           
 TopicModel[] getChildren()
           
 PublicationModel getDefaultPublication()
           
 java.lang.String getFQName()
           
 long getId()
           
 InsightModel getInsightModel()
           
 java.lang.String getName()
           
 PublicationModel getOwnedPublication(long id)
           
 TopicModel getParent()
           
 PublicationModel[] getPublications()
           
 boolean isRoot()
           
 void setDefaultPublicationModel(PublicationModel newDefault)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

parent

private final TopicModel parent

id

private final long id

name

private java.lang.String name

children

private final java.util.ArrayList children

publications

private final java.util.ArrayList publications

defaultPublication

private PublicationModel defaultPublication
Constructor Detail

TopicModel

protected TopicModel(long rootId)
Only used by RootTopicModel.

TopicModel

public TopicModel(TopicModel parent,
                  java.lang.String name)
Method Detail

getInsightModel

public InsightModel getInsightModel()

getId

public long getId()

isRoot

public boolean isRoot()

getParent

public TopicModel getParent()

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getFQName

public java.lang.String getFQName()

addTopic

private void addTopic(TopicModel topic)

getChildren

public TopicModel[] getChildren()

getChildCount

public int getChildCount()

getChild

public TopicModel getChild(java.lang.String name)

getAllChildren

private void getAllChildren(TopicModel parent,
                            java.util.List childrenList)

getAllChildren

public TopicModel[] getAllChildren(boolean includeThis)
Returns all children (recursively).
Parameters:
includeThis - true means called instance will be added.
Returns:
All children in an undefined order.

getAllChildren

public TopicModel[] getAllChildren()
Returns all children (recursively).
Returns:
All children in an undefined order.

addPublication

void addPublication(PublicationModel publication)

createPublicationId

long createPublicationId()

getPublications

public PublicationModel[] getPublications()

getOwnedPublication

public PublicationModel getOwnedPublication(long id)
                                     throws InvalidIdException

getDefaultPublication

public PublicationModel getDefaultPublication()

setDefaultPublicationModel

public void setDefaultPublicationModel(PublicationModel newDefault)
                                throws PublicationNotOwnedException


Copyright © 2002 Laurent Caillette and l'Université René Descartes, Paris 5. All rights reserved.