1 11 package org.eclipse.ant.internal.ui.dtd.schema; 12 13 import java.util.HashMap ; 14 15 import org.eclipse.ant.internal.ui.dtd.IElement; 16 import org.eclipse.ant.internal.ui.dtd.ISchema; 17 18 26 public class Schema implements ISchema { 27 private HashMap fElementMap = new HashMap (); 28 private Exception fErrorException; 29 32 public IElement getElement(String qname) { 33 return (IElement) fElementMap.get(qname); 34 } 35 36 39 public IElement[] getElements() { 40 return (IElement[]) fElementMap.entrySet().toArray(new IElement[fElementMap.entrySet().size()]); 41 } 42 43 47 public void addElement(IElement element) { 48 fElementMap.put(element.getName(), element); 49 } 50 51 57 public void setErrorException(Exception e) { 58 fErrorException = e; 59 } 60 61 64 public Exception getErrorException() { 65 return fErrorException; 66 } 67 } 68 | Popular Tags |