Re: Xapi-J: an architectural detail

Sarah Slocombe (sarah@attd.com)
Wed, 06 Aug 1997 15:57:06 -0400


Greetings!

I've been following this thread with great interest.
I'm trying to piece together the suggestions so far but
I wonder if I've muddled it already. Perhaps I should just
wait a bit longer but things are really starting to get
exciting now!

As I understand it, we've got:

public interface INode{
public INode getParent();
public void setParent(INode aContainer);
}

(Or is INode ONLY so things have a common base class/
interface, and shouldn't have any methods? Or does an
IContainer never need to deal with parents? Or ought even
parent stuff to be handled by iterators?)

public interface IContainer extends INode{
public Enumeration getContents();
public void insertContent(IContent aContent,
IContent preceedingContent);
public void appendContent(IContent aContent);
public void removeContent(IContent aContent);
}

public interface IContent extends INode{
public String getData();
}

public interface IElement extends IContent, IContainer{
public String getType();
public void setType(String aType);
public void addAttribute(String name, String value);
public void removeAttribute(String name);
public IAttribute getAttribute(String attributeName);
public java.util.Enumeration getAttributes();
}

So far so good? Now what about IAttribute? John Tigue's
shown:

public interface IAttribute{
public String getName();
public void setName(String aName);
public String getValue();
public void setValue();
}

Ought this to inherit from IContent? Chris Lloyd spoke of
IContainer vs. IProperty -- are IContent and IProperty the
same thing?

Thanks for any help.

Sarah Slocombe
sarah@attd.com