Package org.codehaus.staxmate.out

Examples of org.codehaus.staxmate.out.SMOutputElement.addAttribute()


    }

    it = xmlObject.getAttributes().entrySet().iterator();
    while (it.hasNext()) {
      Entry<String, String> entry = it.next();
      smOutputElement.addAttribute(entry.getKey(), entry.getValue());
    }

    int indent = indentCount;
    if (sbmlDocument.isSetNotes()) {
      writeNotes(sbmlDocument, smOutputElement, streamWriter,
View Full Code Here


          .getAnnotationNamespaces();

      for (String namespacePrefix : otherNamespaces.keySet()) {
        StringTools.append(annotationBeginning, " ", namespacePrefix,
            "=\"", otherNamespaces.get(namespacePrefix), "\"");
        annotationElement.addAttribute(namespacePrefix, otherNamespaces.get(namespacePrefix));
      }
           
      boolean allNamespacesDefined = true;
     
      // Adding the name spaces of the sbml element
View Full Code Here

   
    rdfElement.addCharacters("\n");
    rdfElement.setIndentation(whiteSpace + createIndentationString(indentCount), indent + indentCount, indentCount);
    SMOutputElement descriptionElement = rdfElement.addElement(namespace,
        "Description");
    descriptionElement.addAttribute(namespace, "about",
        annotation.getAbout());
    descriptionElement.addCharacters("\n");
    if (annotation.isSetHistory()) {
      writeHistory(annotation.getHistory(), rdfNamespaces, writer,
          indent + 4);
View Full Code Here

            Iterator<Entry<String, String>> it = parentXmlObject
                .getAttributes().entrySet().iterator();
            while (it.hasNext()) {
              Entry<String, String> entry = it.next();
              newOutPutElement.addAttribute(entry.getKey(),
                  entry.getValue());
            }
            if (nextObjectToWrite instanceof SBase) {
              SBase s = (SBase) nextObjectToWrite;
              if (s.isSetNotes()) {
View Full Code Here

    }

    it = xmlObject.getAttributes().entrySet().iterator();
    while (it.hasNext()) {
      Entry<String, String> entry = it.next();
      smOutputElement.addAttribute(entry.getKey(), entry.getValue());
    }

    int indent = indentCount;
    if (sbmlDocument.isSetNotes()) {
      writeNotes(sbmlDocument, smOutputElement, streamWriter,
View Full Code Here

          .getAnnotationNamespaces();

      for (String namespacePrefix : otherNamespaces.keySet()) {
        StringTools.append(annotationBeginning, " ", namespacePrefix,
            "=\"", otherNamespaces.get(namespacePrefix), "\"");
        annotationElement.addAttribute(namespacePrefix, otherNamespaces.get(namespacePrefix));
      }
           
      boolean allNamespacesDefined = true;
     
      // Adding the name spaces of the sbml element
View Full Code Here

   
    rdfElement.addCharacters("\n");
    rdfElement.setIndentation(whiteSpace + createIndentationString(indentCount), indent + indentCount, indentCount);
    SMOutputElement descriptionElement = rdfElement.addElement(namespace,
        "Description");
    descriptionElement.addAttribute(namespace, "about",
        annotation.getAbout());
    descriptionElement.addCharacters("\n");
    if (annotation.isSetHistory()) {
      writeHistory(annotation.getHistory(), rdfNamespaces, writer,
          indent + 4);
View Full Code Here

            Iterator<Entry<String, String>> it = parentXmlObject
                .getAttributes().entrySet().iterator();
            while (it.hasNext()) {
              Entry<String, String> entry = it.next();
              newOutPutElement.addAttribute(entry.getKey(),
                  entry.getValue());
            }
            if (nextObjectToWrite instanceof SBase) {
              SBase s = (SBase) nextObjectToWrite;
              if (s.isSetNotes()) {
View Full Code Here

  @Override
  public void serialize( SMOutputElement serializeTo, Car object, Version formatVersion ) throws IOException, XMLStreamException {
    assert isVersionWritable( formatVersion );

    SMOutputElement colorElement = serializeTo.addElement( serializeTo.getNamespace(), "color" )//okay, should be a own serializer in real world...
    colorElement.addAttribute( "red", String.valueOf( object.getColor().getRed() ) );
    colorElement.addAttribute( "blue", String.valueOf( object.getColor().getBlue() ) );
    colorElement.addAttribute( "green", String.valueOf( object.getColor().getGreen() ) );

    serialize( object.getModel(), Model.class, serializeTo.addElement( serializeTo.getNamespace(), "model" ), formatVersion );
    serialize( object.getBasePrice(), Money.class, serializeTo.addElement( serializeTo.getNamespace(), "basePrice" ), formatVersion );
View Full Code Here

  public void serialize( SMOutputElement serializeTo, Car object, Version formatVersion ) throws IOException, XMLStreamException {
    assert isVersionWritable( formatVersion );

    SMOutputElement colorElement = serializeTo.addElement( serializeTo.getNamespace(), "color" )//okay, should be a own serializer in real world...
    colorElement.addAttribute( "red", String.valueOf( object.getColor().getRed() ) );
    colorElement.addAttribute( "blue", String.valueOf( object.getColor().getBlue() ) );
    colorElement.addAttribute( "green", String.valueOf( object.getColor().getGreen() ) );

    serialize( object.getModel(), Model.class, serializeTo.addElement( serializeTo.getNamespace(), "model" ), formatVersion );
    serialize( object.getBasePrice(), Money.class, serializeTo.addElement( serializeTo.getNamespace(), "basePrice" ), formatVersion );
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.