/* * GrammarLiason.java * * Created on August 8, 2001, 11:25 PM */ package org.netbeans.xmlsupport.completion; import java.util.List; import java.util.Collection; /** This class defines the basic acces interface for the Grammar of this document. * */ public interface GrammarLiasion { /** Gets possible attribute's for the passed element that mey be inserted into * the element without affecting the validity of this element. * @param elementName Qualified name of the element for which attributes are requested * @param alreadyHave Qualified attribute names that are already contained by the element * @return List of possible attributes (AtributeDeclarations) */ public List getAttributesFor(String elementName, Collection alreadyHave); /** Get the possible default values for attrName attribute of element elementName. * @param elementName Qualified name of the element for whose attribute's values are requested * @param attrName Qualified name of the attribute whose default values are requested * @return List of attribute values for this attribute. */ public List getAttValuesFor(String elementName, String attrName); /** Returns the list of entities defined by this grammar * @return List of entities defined in this Grammar */ public List getEntityList(); /** Returns a list of all possible child element declarations that may be inserted * under the levelRoot parameter element at the position specified by insertAt. * Fully Valid indicates whether the returned elements if inserted at this point * will result in a fully valid element. * @param levelRoot The Qualified Root element, content model of which should deliver possible values. * @param alreadyChildren List of Qualifed children elements already present. * @param insertAt Where in the list should the next element be inserted. * @param fullyValid Whether the alreadyElements after the insert position should be taken into * account, while checking validity. * @return Element Declarations for the possible children */ public List getElements(String levelRoot, List alreadyHave, int insertAt, boolean fullyValid); }