Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylar-dev] task list externalization

I don't think it is a good idea to replace a well known API (w3c) with a 
custom interface that almost remodels that API. It imposes additional 
overhead for implementors who need to learn a new API. Unless there are hard 
facts (could you use TPTP to collect a few numbers?) that this approach 
yields a significantly better performance I'd rather keep the current 
implementation.

> public interface IElement {
>     public String getNodeName();
>     public IElement addChildElement(String name);
>     public void addChildElement(IElement element);
>     public List<IElement> getChildNodes();
>     public void setAttribute(String name, String value);
>     public String getAttribute(String name);
>     public boolean hasAttribute(String name);
>     public Map<String, String> getAttributes();
>     public void close();
> }

I suppose close() writes the node to the stream? For a stream-based 
implementation I'd expect an API closer to Java serialization:

 public readQueryHit(NodeInputStream in, TaskList taskList, ...);

 public interface NodeInputStream  {
     Node readNode();
 }

Steffen


Back to the top