void
ASTCSymbolDelayNode::write(XMLOutputStream& stream) const
{
  if (&stream == NULL) return;

  stream.startElement("apply");
  
  stream.startElement("csymbol");

  stream.setAutoIndent(false);
  
  ASTBase::writeAttributes(stream);

  stream.writeAttribute( "encoding"     , mEncoding );
  stream.writeAttribute( "definitionURL", mDefinitionURL  );

  stream << " " << getName() << " ";
  
  stream.endElement("csymbol");
  
  stream.setAutoIndent(true);

  for (unsigned int n = 0; n < getNumChildren(); n++)
  {
    ASTFunctionBase::getChild(n)->write(stream);
  }
  
  stream.endElement("apply");
}
Exemplo n.º 2
0
/*
 * Writes the attributes to the stream
 */
void
ClassThree::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetNumber() == true)
  {
    stream.writeAttribute("number", getPrefix(), Enum_toString(mNumber));
  }

  if (isSetName() == true)
  {
    stream.writeAttribute("name", getPrefix(), Fred_toString(mName));
  }

  if (isSetBadName() == true)
  {
    stream.writeAttribute("badName", getPrefix(), Fred_toString(mBadName));
  }

  if (isSetOtherNum() == true)
  {
    stream.writeAttribute("otherNum", getPrefix(), Enum_toString(mOtherNum));
  }

  SBase::writeExtensionAttributes(stream);
}
Exemplo n.º 3
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
CompartmentType::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  const unsigned int level = getLevel();
  const unsigned int version = getVersion();

  /* invalid level/version */
  if (level < 2 || (level == 2 && version == 1))
  {
    return;
  }

  //
  // id: SId  { use="required" }  (L2v2 ->)
  //
  stream.writeAttribute("id", mId);

  //
  // name: string  { use="optional" }  (L2v2 ->)
  //
  stream.writeAttribute("name", mName);
  //
  // sboTerm: SBOTerm { use="optional" }  (L2v3 ->)
  // is written in SBase::writeAttributes()
  //

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
Exemplo n.º 4
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
Trigger::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  const unsigned int level   = getLevel  ();
 
  /* invalid level/version */
  if (level < 2)
  {
    return;
  }

  //
  // sboTerm: SBOTerm { use="optional" }  (L2v3->)
  // is written in SBase::writeAttributes()
  //
  if (level > 2)
  {
    // in L3 only write it out if it has been set
    if (isSetInitialValue())
      stream.writeAttribute("initialValue", mInitialValue);
      // in L3 only write it out if it has been set
    if (isSetPersistent())
      stream.writeAttribute("persistent", mPersistent);
  }

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
Exemplo n.º 5
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
NUMLDocument::writeAttributes (XMLOutputStream& stream) const
{
  if (mNUMLNamespaces->getNamespaces() == 0)
  {
     XMLNamespaces xmlns;

     if (mLevel == 1)
     {
        xmlns.add("http://www.numl.org/numl/level1/version1");
     }
     stream << xmlns;

     mNUMLNamespaces->setNamespaces(&xmlns);
  }  

  NMBase::writeAttributes(stream);

  //
  // level: positiveInteger  { use="required" fixed="1" }  (L1v1)
  stream.writeAttribute("level", mLevel);


  stream.writeAttribute("version", mVersion);
}
Exemplo n.º 6
0
/*
 * Writes the attributes to the stream
 */
void
AnalyticVolume::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetFunctionType() == true)
  {
    stream.writeAttribute("functionType", getPrefix(),
      FunctionKind_toString(mFunctionType));
  }

  if (isSetOrdinal() == true)
  {
    stream.writeAttribute("ordinal", getPrefix(), mOrdinal);
  }

  if (isSetDomainType() == true)
  {
    stream.writeAttribute("domainType", getPrefix(), mDomainType);
  }

  SBase::writeExtensionAttributes(stream);
}
Exemplo n.º 7
0
/*
 * Writes the attributes to the stream
 */
void
Output::writeAttributes(XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetQualitativeSpecies() == true)
  {
    stream.writeAttribute("qualitativeSpecies", getPrefix(),
      mQualitativeSpecies);
  }

  if (isSetTransitionEffect() == true)
  {
    stream.writeAttribute("transitionEffect", getPrefix(),
      TransitionOutputEffect_toString(mTransitionEffect));
  }

  if (isSetName() == true)
  {
    stream.writeAttribute("name", getPrefix(), mName);
  }

  if (isSetOutputLevel() == true)
  {
    stream.writeAttribute("outputLevel", getPrefix(), mOutputLevel);
  }

  SBase::writeExtensionAttributes(stream);
}
/** @cond doxygenLibsbmlInternal */
void ListOfGlobalRenderInformation::writeAttributes (XMLOutputStream& stream) const
{
  ListOf::writeAttributes(stream);
  std::ostringstream os;
  os << this->mVersionMajor;
  stream.writeAttribute("versionMajor", getPrefix(), os.str());
  os.str("");
  os << this->mVersionMinor;
  stream.writeAttribute("versionMinor", getPrefix(), os.str());
}
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
CompositeDescription::writeAttributes (XMLOutputStream& stream) const
{
	NMBase::writeAttributes(stream);

	stream.writeAttribute("id", mId);
	stream.writeAttribute("name", mName);
	stream.writeAttribute("ontologyTerm", mOntologyTerm);
	stream.writeAttribute("indexType", mIndexType);
}
Exemplo n.º 10
0
/**
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.  For example:
 *
 *   SBase::writeAttributes(stream);
 *   stream.writeAttribute( "id"  , mId   );
 *   stream.writeAttribute( "name", mName );
 *   ...
 */
void Point::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);
  stream.writeAttribute("x", mXOffset);
  stream.writeAttribute("y", mYOffset);
  if(this->mZOffset!=0.0)
  {
    stream.writeAttribute("z", mZOffset);
  }
}
Exemplo n.º 11
0
/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedDocument::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetLevel() == true)
    stream.writeAttribute("level", getPrefix(), mLevel);

  if (isSetVersion() == true)
    stream.writeAttribute("version", getPrefix(), mVersion);

}
Exemplo n.º 12
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
DomainType::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetSpatialDimensions() == true)
    stream.writeAttribute("spatialDimensions", getPrefix(), mSpatialDimensions);

}
Exemplo n.º 13
0
/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedSimulation::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetName() == true)
    stream.writeAttribute("name", getPrefix(), mName);

}
Exemplo n.º 14
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
AdvectionCoefficient::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetVariable() == true)
    stream.writeAttribute("variable", getPrefix(), mVariable);

  if (isSetCoordinate() == true)
    stream.writeAttribute("coordinate", getPrefix(), CoordinateKind_toString(mCoordinate));

}
Exemplo n.º 15
0
/*
 * Write values of XMLAttributes to the output stream.
 */
void
SedSubTask::writeAttributes(XMLOutputStream& stream) const
{
  SedBase::writeAttributes(stream);

  if (isSetOrder() == true)
    stream.writeAttribute("order", getPrefix(), mOrder);

  if (isSetTask() == true)
    stream.writeAttribute("task", getPrefix(), mTask);

}
Exemplo n.º 16
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.  For example:
 *
 *   SBase::writeAttributes(stream);
 *   stream.writeAttribute( "id"  , mId   );
 *   stream.writeAttribute( "name", mName );
 *   ...
 */
void RenderCurve::writeAttributes (XMLOutputStream& stream) const
{
  GraphicalPrimitive1D::writeAttributes(stream);
  if(this->isSetStartHead())
  {
      stream.writeAttribute("startHead", getPrefix(), this->mStartHead);
  }
  if(this->isSetEndHead())
  {
      stream.writeAttribute("endHead", getPrefix(), this->mEndHead);
  }
}
Exemplo n.º 17
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
Domain::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetDomainType() == true)
    stream.writeAttribute("domainType", getPrefix(), mDomainType);

}
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
GeneProductAssociation::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetId() == true)
    stream.writeAttribute("id", getPrefix(), mId);

  if (isSetName() == true)
    stream.writeAttribute("name", getPrefix(), mName);

}
Exemplo n.º 19
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
ImageData::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  if (isSetSamplesLength() == true)
    stream.writeAttribute("samplesLength", getPrefix(), mSamplesLength);

  if (isSetDataType() == true)
    stream.writeAttribute("dataType", getPrefix(), mDataType);

}
Exemplo n.º 20
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
FbcSpeciesPlugin::writeAttributes (XMLOutputStream& stream) const
{
  SBasePlugin::writeAttributes(stream);

  if (isSetCharge() == true)
    stream.writeAttribute("charge", getPrefix(), mCharge);

  if (isSetChemicalFormula() == true)
    stream.writeAttribute("chemicalFormula", getPrefix(), mChemicalFormula);

}
Exemplo n.º 21
0
/** @cond doxygenLibsbmlInternal */
void
Port::writeAttributes (XMLOutputStream& stream) const
{
  SBaseRef::writeAttributes(stream);

  if (isSetId()) {
    stream.writeAttribute("id", getPrefix(), mId);
  }
  if (isSetName()) {
    stream.writeAttribute("name", getPrefix(), mName);
  }
}
Exemplo n.º 22
0
/*
 * Write values of XMLAttributes to the output stream.
 */
	void
SedRepeatedTask::writeAttributes (XMLOutputStream& stream) const
{
	SedTask::writeAttributes(stream);

	if (isSetRangeId() == true)
		stream.writeAttribute("range", getPrefix(), mRangeId);

	if (isSetResetModel() == true)
		stream.writeAttribute("resetModel", getPrefix(), mResetModel);

}
Exemplo n.º 23
0
/*
 * Write values of XMLAttributes to the output stream.
 */
  void
DynEventPlugin::writeAttributes (XMLOutputStream& stream) const
{
  SBasePlugin::writeAttributes(stream);

  if (isSetCboTerm() == true)
    stream.writeAttribute("cboTerm", getPrefix(), mCboTerm);

  if (isSetApplyToAll() == true)
    stream.writeAttribute("applyToAll", getPrefix(), mApplyToAll);

}
Exemplo n.º 24
0
/** @cond doxygenLibsbmlInternal */
void
GeneAssociation::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  stream.writeAttribute("id",   getPrefix(), mId);
  stream.writeAttribute("reaction",   getPrefix(), mReaction);

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}
Exemplo n.º 25
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void AtomicDescription::writeAttributes(XMLOutputStream& stream) const
{
	NMBase::writeAttributes(stream);

	const unsigned int level = getLevel();
	const unsigned int version = getVersion();

	stream.writeAttribute("id", mId);
	stream.writeAttribute("name", mName);
	stream.writeAttribute("ontologyTerm", mOntologyTerm);
	stream.writeAttribute("valueType", mValueType);

}
Exemplo n.º 26
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.  For example:
 *
 *   SBase::writeAttributes(stream);
 *   stream.writeAttribute( "id"  , mId   );
 *   stream.writeAttribute( "name", mName );
 *   ...
 */
void Style::writeAttributes (XMLOutputStream& stream) const
{
    SBase::writeAttributes(stream);
    stream.writeAttribute("id", getPrefix(), this->mId);
    if(this->isSetName())
    {
        stream.writeAttribute("name", getPrefix(), this->mName);
    }
    // write role list
    this->writeRolesList(stream);
    // write type list
    this->writeTypeList(stream);
}
Exemplo n.º 27
0
/*
 * Writes the attributes to the stream
 */
void
ClassOne::writeV2Attributes(XMLOutputStream& stream) const
{
  if (isSetId() == true)
  {
    stream.writeAttribute("id", getPrefix(), mId);
  }

  if (isSetAtt2() == true)
  {
    stream.writeAttribute("att2", getPrefix(), mAtt2);
  }
}
Exemplo n.º 28
0
/** @cond doxygenLibsbmlInternal */
void
ReplacedElement::writeAttributes (XMLOutputStream& stream) const
{
  Replacing::writeAttributes(stream);

  if (isSetDeletion()) {
    stream.writeAttribute("deletion", getPrefix(), mDeletion);
  }
  if (isSetConversionFactor()) {
    stream.writeAttribute("conversionFactor", getPrefix(), mConversionFactor);
  }

  Replacing::writeExtensionAttributes(stream);
}
Exemplo n.º 29
0
void 
SpatialSpeciesRxnPlugin::writeAttributes (XMLOutputStream& stream) const
{
  if ( isSetIsSpatial() ) 
  {
	  XMLTriple tripleIsSpatial("isSpatial", mURI, mPrefix);
	  stream.writeAttribute(tripleIsSpatial, mIsSpatial);
  }
  if ( isSetIsLocal() )
  {
	  XMLTriple tripleIsLocal("isLocal", mURI, mPrefix);
	  stream.writeAttribute(tripleIsLocal, mIsLocal);
  }
}
Exemplo n.º 30
0
/*
 * Subclasses should override this method to write their XML attributes
 * to the XMLOutputStream.  Be sure to call your parents implementation
 * of this method as well.
 */
void
ParametricObject::writeAttributes (XMLOutputStream& stream) const
{
  SBase::writeAttributes(stream);

  stream.writeAttribute("spatialId",   getPrefix(), mSpatialId);
  stream.writeAttribute("domain",   getPrefix(), mDomain);
  stream.writeAttribute("polygonType",   getPrefix(), mPolygonType);

  //
  // (EXTENSION)
  //
  SBase::writeExtensionAttributes(stream);
}