Package org.eclipse.wst.xml.core.internal.contentmodel

Examples of org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration


  /*
   * @see CMElementDeclaration#getContent()
   */
  public CMContent getContent() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return null;
    return edecl.getContent();
  }
View Full Code Here


  /*
   * @see CMElementDeclaration#getContentType()
   */
  public int getContentType() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return CMElementDeclaration.ANY;
    return edecl.getContentType();
  }
View Full Code Here

  /*
   * @see CMElementDeclaration#getElementName()
   */
  public String getElementName() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return null;
    return edecl.getElementName();
  }
View Full Code Here

  /*
   * @see CMElementDeclaration#getDataType()
   */
  public CMDataType getDataType() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return null;
    return edecl.getDataType();
  }
View Full Code Here

  /*
   * @see CMElementDeclaration#getLocalElements()
   */
  public CMNamedNodeMap getLocalElements() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return null;
    return edecl.getLocalElements();
  }
View Full Code Here

  /*
   * @see CMContent#getMaxOccur()
   */
  public int getMaxOccur() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return -1;
    return edecl.getMaxOccur();
  }
View Full Code Here

  /*
   * @see CMContent#getMinOccur()
   */
  public int getMinOccur() {
    CMElementDeclaration edecl = getSelf();
    if (edecl == null)
      return -1;
    return edecl.getMinOccur();
  }
View Full Code Here

  private static Collection getAncestorDeclarations(Element target) {
    Vector ancestors = new Vector();

    Document doc = target.getOwnerDocument();
    ModelQuery query = ModelQueryUtil.getModelQuery(doc);
    CMElementDeclaration decl = query.getCMElementDeclaration(target);
    ancestors.add(decl);

    Element parent = getParent(target);
    while (parent != null) {
      decl = query.getCMElementDeclaration(parent);
View Full Code Here

  private static Collection gatherInclusions(Collection ancestors) {
    Vector inclusions = new Vector();
    Iterator iter = ancestors.iterator();
    while (iter.hasNext()) {
      CMElementDeclaration decl = (CMElementDeclaration) iter.next();
      if (decl.supports(HTMLCMProperties.INCLUSION)) {
        CMContent inclusion = (CMContent) decl.getProperty(HTMLCMProperties.INCLUSION);
        if (inclusion != null)
          inclusions.add(inclusion);
      }
    }
    return inclusions;
View Full Code Here

  public CMNamedNodeMap getElements() {
    if (fElements == null) {
      int length = getDocument().getElements().getLength();
      CMNamedNodeMapImpl elements = new CMNamedNodeMapImpl();
      for (int i = 0; i < length; i++) {
        CMElementDeclaration ed = new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration) getDocument().getElements().item(i));
        elements.setNamedItem(ed.getNodeName(), ed);
      }
      fElements = elements;
    }
    return fElements;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.