Examples of ElementInfo


Examples of org.platformlayer.xml.XmlHelper.ElementInfo

      if (Strings.isNullOrEmpty(namespace)) {
        namespace = null;
      }
    }

    return new ElementInfo(namespace, name);

  }
View Full Code Here

Examples of org.platformlayer.xml.XmlHelper.ElementInfo

  }

  @Override
  protected <T> Class<T> mapToJavaClass(ElementInfo elementInfo) throws OpsException {
    for (Class<?> modelClass : modelClasses) {
      ElementInfo classElementInfo = XmlHelper.getXmlElementInfo(modelClass);
      if (elementInfo.equals(classElementInfo)) {
        return (Class<T>) modelClass;
      }
    }
View Full Code Here

Examples of org.webharvest.definition.ElementInfo

        Iterator iterator = this.elementInfos.entrySet().iterator();
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String key = (String) entry.getKey();
            if ( prefix == null || key.toLowerCase().startsWith(prefix) ) {
                ElementInfo elementInfo = (ElementInfo) entry.getValue();
                model.addElement(elementInfo.getName());
            }
        }

        boolean addCData = CDATA_NAME.toLowerCase().startsWith("<" + prefix);
        boolean addXmlComment = XML_COMMENT_NAME.toLowerCase().startsWith("<" + prefix);
View Full Code Here

Examples of org.webharvest.definition.ElementInfo

        elementName = elementName.toLowerCase();
        prefix = prefix.toLowerCase();

        this.model.clear();

        ElementInfo elementInfo = DefinitionResolver.getElementInfo(elementName);
        if (elementInfo != null) {
            for (Object attObj: elementInfo.getAttsSet()) {
                if (attObj != null) {
                    String att = ((String)attObj).toLowerCase();
                    if ( att.startsWith(prefix) && !"id".equals(att) ) {
                        model.addElement(att);
                    }
View Full Code Here

Examples of org.webharvest.definition.ElementInfo

    }

    private void defineAttributeValuesMenu(String tagName, String attributeName, String attValuePrefix) {
        this.model.clear();

        ElementInfo elementInfo = DefinitionResolver.getElementInfo(tagName);
        if (elementInfo != null) {
            String[] suggs = elementInfo.getAttributeValueSuggestions(attributeName);
            if (suggs != null) {
                for (String s: suggs) {
                    if (s.toLowerCase().startsWith(attValuePrefix)) {
                        model.addElement(s);
                    }
View Full Code Here

Examples of org.webharvest.definition.ElementInfo

            xmlPane.setCaretPosition( xmlPane.getCaretPosition() - 4 );
        } else if ( XML_COMMENT_NAME.equals(name) ) {
            document.insertString(pos, "<!--  -->".substring(this.prefixLength), null);
            xmlPane.setCaretPosition( xmlPane.getCaretPosition() - 4 );
        } else {
            ElementInfo info = DefinitionResolver.getElementInfo(name);
            if (info != null) {
                String template = info.getTemplate(true).substring(this.prefixLength);
                document.insertString(pos, template, null);
                int closingIndex = template.lastIndexOf("</");
                if (closingIndex >= 0) {
                    xmlPane.setCaretPosition( xmlPane.getCaretPosition() - template.length() + closingIndex );
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.