Examples of XMLElement


Examples of org.eclipse.persistence.jaxb.xmlmodel.XmlElement

                    JAXBElement<? extends JavaAttribute> jaxbElement = iterator.next();
   
                    JavaAttribute att = (JavaAttribute) jaxbElement.getValue();
   
                    if (att instanceof XmlElement) {
                        XmlElement xme = (XmlElement) att;
                        String fieldName = xme.getJavaAttribute();
                        String fieldType = xme.getType();
                        fieldsToReturn.add(new OXMJavaFieldImpl(fieldName, fieldType, this));
                    } else if (att instanceof XmlElements) {
                        XmlElements xmes = (XmlElements) att;
                        String fieldName = xmes.getJavaAttribute();
                        String fieldType = JAVA_LANG_OBJECT;
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlElement

    }

    @Override
    public Element convert( final XmlResource resource )
    {
        final XmlElement element = resource.getXmlElement();
       
        if( element != null )
        {
            return element.getDomNode();
        }
       
        return null;
    }
View Full Code Here

Examples of org.enhydra.shark.xpdl.XMLElement

    protected boolean validateId(XMLPanel pnl, XMLElement el) {
        XMLComplexElement cel = null;
        String newId = null;
        XMLPanel idPanel = null;
        if (el instanceof XMLAttribute) {
            XMLElement parent = el.getParent();
            if (parent instanceof XMLCollectionElement) {
                cel = (XMLCollectionElement) parent;
                newId = cel.get("Id").toValue();
                if (pnl.getValue() instanceof String) {
                    newId = ((String) pnl.getValue()).trim();
View Full Code Here

Examples of org.freeplane.n3.nanoxml.XMLElement

  private void writeContent(final ITreeWriter writer, final NodeModel node, final NodeStyleModel style,
                            final boolean forceFormatting) throws IOException {
    if(! NodeWriter.shouldWriteSharedContent(writer))
      return;
    if (forceFormatting || style != null) {
      final XMLElement fontElement = new XMLElement();
      fontElement.setName("font");
      boolean isRelevant = forceFormatting;
      final String fontFamilyName = forceFormatting ? nsc.getFontFamilyName(node) : style.getFontFamilyName();
      if (fontFamilyName != null) {
        fontElement.setAttribute("NAME", fontFamilyName);
        isRelevant = true;
      }
      final Integer fontSize = forceFormatting ? Integer.valueOf(nsc.getFontSize(node)) : style.getFontSize();
      if (fontSize != null) {
        fontElement.setAttribute("SIZE", Integer.toString(fontSize));
        isRelevant = true;
      }
      final Boolean bold = forceFormatting ? Boolean.valueOf(nsc.isBold(node)) : style.isBold();
      if (bold != null) {
        fontElement.setAttribute("BOLD", bold ? "true" : "false");
        isRelevant = true;
      }
      final Boolean italic = forceFormatting ? Boolean.valueOf(nsc.isItalic(node)) : style.isItalic();
      if (italic != null) {
        fontElement.setAttribute("ITALIC", italic ? "true" : "false");
        isRelevant = true;
      }
      if (isRelevant) {
        writer.addElement(style, fontElement);
      }
View Full Code Here

Examples of org.jacoco.report.internal.xml.XMLElement

   * @throws IOException
   *             in case of problems with the output stream
   */
  public IReportVisitor createVisitor(final OutputStream output)
      throws IOException {
    final XMLElement root = new XMLDocument("report", PUBID, SYSTEM,
        outputEncoding, true, output);
    class RootVisitor extends XMLGroupVisitor implements IReportVisitor {

      RootVisitor(final XMLElement element) throws IOException {
        super(element, null);
      }

      private List<SessionInfo> sessionInfos;

      public void visitInfo(final List<SessionInfo> sessionInfos,
          final Collection<ExecutionData> executionData)
          throws IOException {
        this.sessionInfos = sessionInfos;
      }

      @Override
      protected void handleBundle(final IBundleCoverage bundle,
          final ISourceFileLocator locator) throws IOException {
        writeHeader(bundle.getName());
        XMLCoverageWriter.writeBundle(bundle, element);
      }

      @Override
      protected AbstractGroupVisitor handleGroup(final String name)
          throws IOException {
        writeHeader(name);
        return new XMLGroupVisitor(element, name);
      }

      private void writeHeader(final String name) throws IOException {
        element.attr("name", name);
        for (final SessionInfo i : sessionInfos) {
          final XMLElement sessioninfo = root.element("sessioninfo");
          sessioninfo.attr("id", i.getId());
          sessioninfo.attr("start", i.getStartTimeStamp());
          sessioninfo.attr("dump", i.getDumpTimeStamp());
        }
      }

      @Override
      protected void handleEnd() throws IOException {
View Full Code Here

Examples of org.jayasoft.woj.tools.dlbuilder.xmldescriptor.model.XmlElement

      public void actionPerformed(java.awt.event.ActionEvent e) {
        TreePath selectionPath = _descriptorTree.getSelectionPath();
        if(selectionPath != null) {
          DefaultMutableTreeNode node = (DefaultMutableTreeNode) selectionPath.getLastPathComponent();
          if (node != null && node.getUserObject() instanceof XmlElement) {
            final XmlElement element = (XmlElement)node.getUserObject();
            if (element != null) {
              WaitPanel.start(DownloadManagerPanel.this, new Runnable() {
                public void run() {
                  handleElement(element);
                }
View Full Code Here

Examples of org.jgroups.annotations.XmlElement

        Element complexType = xmldoc.createElement("xs:complexType");
        classElement.appendChild(complexType);

        // the protocol has its own subtree
        XmlElement el=Util.getAnnotation(clazz, XmlElement.class);
        if(el != null) {
            Element choice=xmldoc.createElement("xs:choice");
            choice.setAttribute("minOccurs", "0");
            choice.setAttribute("maxOccurs", "unbounded");
            complexType.appendChild(choice);
            Element tmp=xmldoc.createElement("xs:element");
            tmp.setAttribute("name", el.name());
            tmp.setAttribute("type", el.type());
            choice.appendChild(tmp);
        }

        XmlAttribute xml_attr=Util.getAnnotation(clazz, XmlAttribute.class);
        if(xml_attr != null) {
View Full Code Here

Examples of org.jnode.nanoxml.XMLElement

        return this.syntaxes;
    }

    @Override
    public XMLElement basicElement(String name) {
        XMLElement element = super.basicElement(name);
        for (Syntax child : this.syntaxes) {
            element.addChild((child == null ? MY_EMPTY : child).toXML());
        }
        return element;
    }
View Full Code Here

Examples of org.mizartools.utility.xml.XMLElement

        return theorem;
    }

    public LinkedList<XMLElement> getXMLElementList() {
        LinkedList<XMLElement> xmlElementList = new LinkedList<XMLElement>();
        XMLElement xmlElement = new XMLElement(NAME);
        if (this.articlenr != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("articlenr", this.articlenr);
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        if (this.nr != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("nr", this.nr);
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        if (this.aid != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("aid", this.aid);
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        if (this.kind != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("kind", this.kind.name());
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        if (this.constrkind != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("constrkind", this.constrkind.name());
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        if (this.constrnr != null) {
            XMLAttribute xmlAttribute = new XMLAttribute("constrnr", this.constrnr);
            xmlElement.getXMLAttributeList().add(xmlAttribute);
        }
        boolean isEmpty = !(formula != null);
        xmlElement.setEmpty(isEmpty);
        xmlElementList.add(xmlElement);
        if (this.formula != null){
            xmlElementList.addAll(this.formula.getXMLElementList());
        }
        if (!isEmpty) {
            xmlElement = new XMLElement(NAME);
            xmlElement.setEndElement(true);
            xmlElementList.add(xmlElement);
        }
        return xmlElementList;
    }
View Full Code Here

Examples of org.mybatis.generator.api.dom.xml.XmlElement

  @Override
  public boolean sqlMapDocumentGenerated(Document document,
      IntrospectedTable introspectedTable)
  {
    XmlElement parentElement = document.getRootElement();

    // 生成selectByMap的sql映射
    XmlElement answer = new XmlElement("select"); //$NON-NLS-1$
    answer.addAttribute(new Attribute("id", "selectByMap")); //$NON-NLS-1$
    answer.addAttribute(new Attribute(
        "resultMap", introspectedTable.getBaseResultMapId())); //$NON-NLS-1$
    answer.addAttribute(new Attribute("parameterType", "Map")); //$NON-NLS-1$

    context.getCommentGenerator().addComment(answer);

    StringBuilder sb = new StringBuilder();
    sb.append("select * from "); //$NON-NLS-1$
    sb.append(introspectedTable
        .getAliasedFullyQualifiedTableNameAtRuntime());
    answer.addElement(new TextElement(sb.toString()));

    XmlElement whereElement = new XmlElement("where"); //$NON-NLS-1$
    for (IntrospectedColumn introspectedColumn : introspectedTable
        .getAllColumns())
    {
      XmlElement isNotNullElement = new XmlElement("if"); //$NON-NLS-1$
      sb.setLength(0);
      sb.append(introspectedColumn.getJavaProperty()); //$NON-NLS-1$
      sb.append(" != null"); //$NON-NLS-1$
      isNotNullElement.addAttribute(new Attribute("test", sb.toString())); //$NON-NLS-1$

      sb.setLength(0);
      sb.append("and ");
      sb.append(MyBatis3FormattingUtilities
          .getAliasedEscapedColumnName(introspectedColumn));
      sb.append(" = "); //$NON-NLS-1$
      sb.append(MyBatis3FormattingUtilities.getParameterClause(
          introspectedColumn, "")); //$NON-NLS-1$

      isNotNullElement.addElement(new TextElement(sb.toString()));

      whereElement.addElement(isNotNullElement);
    }
    answer.addElement(whereElement);

    parentElement.addElement(answer);

    // 生成selectCountByCriteria的sql映射
    parentElement = document.getRootElement();

    String fqjt = introspectedTable.getExampleType();
    answer = new XmlElement("select"); //$NON-NLS-1$
    answer
        .addAttribute(new Attribute(
            "id", "selectCount" + introspectedTable.getSelectByExampleStatementId().substring(6))); //$NON-NLS-1$
    answer.addAttribute(new Attribute("resultType", "long")); //$NON-NLS-1$
    answer.addAttribute(new Attribute("parameterType", fqjt)); //$NON-NLS-1$
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.