/**
   * Runs the test case.
   *
   * @throws Throwable Any uncaught exception causes test to fail
   */
  public void runTest() throws Throwable {
    Document doc;
    NodeList elementList;
    Node employeeNode;
    Node childNode;
    NodeList childNodes;
    int nodeType;
    String childName;
    java.util.List actual = new java.util.ArrayList();

    java.util.List expected = new java.util.ArrayList();
    expected.add("em");
    expected.add("strong");
    expected.add("code");
    expected.add("sup");
    expected.add("var");
    expected.add("acronym");

    doc = (Document) load("hc_staff", false);
    elementList = doc.getElementsByTagName("p");
    employeeNode = elementList.item(1);
    childNodes = employeeNode.getChildNodes();
    for (int indexN1006C = 0; indexN1006C < childNodes.getLength(); indexN1006C++) {
      childNode = (Node) childNodes.item(indexN1006C);
      nodeType = (int) childNode.getNodeType();
      childName = childNode.getNodeName();

      if (equals(1, nodeType)) {
        actual.add(childName);
      } else {
        assertEquals("textNodeType", 3, nodeType);
      }
    }
    assertEqualsAutoCase("element", "elementNames", expected, actual);
  }
Esempio n. 2
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("set");
   int size;
   if (classValue != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "class", classValue);
   }
   if (style != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "style", style);
   }
   if (id != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "id", id);
   }
   if (other != null) {
     URelaxer2.setAttributePropertyByString(
         element, "http://www.w3.org/1998/Math/MathML", "other", other);
   }
   size = content.size();
   for (int i = 0; i < size; i++) {
     IMSetContent value = (IMSetContent) this.content.get(i);
     value.makeElement(element);
   }
   parent.appendChild(element);
 }
Esempio n. 3
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   setTitle(new FtTitle(stack));
   if (FtSubtitle.isMatch(stack)) {
     setSubtitle(new FtSubtitle(stack));
   }
   if (FtVersion.isMatch(stack)) {
     setVersion(new FtVersion(stack));
   }
   if (FtType.isMatch(stack)) {
     setType(new FtType(stack));
   }
   if (FtAuthors.isMatch(stack)) {
     setAuthors(new FtAuthors(stack));
   }
   notice_.clear();
   while (true) {
     if (FtNotice.isMatch(stack)) {
       addNotice(new FtNotice(stack));
     } else {
       break;
     }
   }
   if (FtAbstract.isMatch(stack)) {
     setAbstract(new FtAbstract(stack));
   }
 }
  /**
   * enqueues the given runnable
   *
   * @param runnable a runnable
   */
  protected void invokeLater(Runnable runnable) {

    if (runnable != null) {

      queue.add(runnable);
    }
  }
Esempio n. 5
0
 /**
  * Initializes the <code>XParamList</code> by the Stack <code>stack</code> that contains Elements.
  * This constructor is supposed to be used internally by the Relaxer system.
  *
  * @param stack
  */
 public void setup(RStack stack) {
   Element element = stack.getContextElement();
   IGlyphFactory factory = GlyphFactory.getFactory();
   paramListParam_.clear();
   while (true) {
     if (XParamListParam.isMatch(stack)) {
       addParamListParam(factory.createXParamListParam(stack));
     } else {
       break;
     }
   }
 }
Esempio n. 6
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   person_.clear();
   while (true) {
     if (FtPerson.isMatch(stack)) {
       addPerson(new FtPerson(stack));
     } else {
       break;
     }
   }
 }
Esempio n. 7
0
 /**
  * Gets the FtNotice property <b>notice</b> by index.
  *
  * @param index
  * @return FtNotice
  */
 public FtNotice getNotice(int index) {
   return ((FtNotice) notice_.get(index));
 }
Esempio n. 8
0
 /**
  * Gets the XParamListParam property <b>paramListParam</b> by index.
  *
  * @param index
  * @return XParamListParam
  */
 public XParamListParam getParamListParam(int index) {
   return ((XParamListParam) paramListParam_.get(index));
 }
Esempio n. 9
0
 /**
  * Gets the FtNotice property <b>notice</b>.
  *
  * @return FtNotice[]
  */
 public FtNotice[] getNotice() {
   FtNotice[] array = new FtNotice[notice_.size()];
   return ((FtNotice[]) notice_.toArray(array));
 }
Esempio n. 10
0
 /**
  * Gets number of the FtNotice property <b>notice</b>.
  *
  * @return int
  */
 public int sizeNotice() {
   return (notice_.size());
 }
Esempio n. 11
0
 /**
  * Gets the FtPerson property <b>person</b> by index.
  *
  * @param index
  * @return FtPerson
  */
 public FtPerson getPerson(int index) {
   return ((FtPerson) person_.get(index));
 }
Esempio n. 12
0
 /**
  * Gets the FcTr property <b>tr</b> by index.
  *
  * @param index
  * @return FcTr
  */
 public FcTr getTr(int index) {
   return ((FcTr) tr_.get(index));
 }
Esempio n. 13
0
 /**
  * Gets the FtPerson property <b>person</b>.
  *
  * @return FtPerson[]
  */
 public FtPerson[] getPerson() {
   FtPerson[] array = new FtPerson[person_.size()];
   return ((FtPerson[]) person_.toArray(array));
 }
Esempio n. 14
0
 /**
  * Gets number of the FtPerson property <b>person</b>.
  *
  * @return int
  */
 public int sizePerson() {
   return (person_.size());
 }
Esempio n. 15
0
 /**
  * Gets the IFtContentMixMixed property <b>content</b> by index.
  *
  * @param index
  * @return IFtContentMixMixed
  */
 public IFtContentMixMixed getContent(int index) {
   return ((IFtContentMixMixed) content_.get(index));
 }
Esempio n. 16
0
 /**
  * Gets number of the FcTr property <b>tr</b>.
  *
  * @return int
  */
 public int sizeTr() {
   return (tr_.size());
 }
Esempio n. 17
0
 /**
  * Gets the IFtContentMixMixed property <b>content</b>.
  *
  * @return IFtContentMixMixed[]
  */
 public IFtContentMixMixed[] getContent() {
   IFtContentMixMixed[] array = new IFtContentMixMixed[content_.size()];
   return ((IFtContentMixMixed[]) content_.toArray(array));
 }
Esempio n. 18
0
 /**
  * Gets number of the XParamListParam property <b>paramListParam</b>.
  *
  * @return int
  */
 public int sizeParamListParam() {
   return (paramListParam_.size());
 }
Esempio n. 19
0
 /**
  * Gets the XParamListParam property <b>paramListParam</b>.
  *
  * @return XParamListParam[]
  */
 public XParamListParam[] getParamListParam() {
   XParamListParam[] array = new XParamListParam[paramListParam_.size()];
   return ((XParamListParam[]) paramListParam_.toArray(array));
 }
Esempio n. 20
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   classValue =
       URelaxer2.getAttributePropertyAsString(
           element, "http://www.w3.org/1998/Math/MathML", "class");
   style =
       URelaxer2.getAttributePropertyAsString(
           element, "http://www.w3.org/1998/Math/MathML", "style");
   id =
       URelaxer2.getAttributePropertyAsString(element, "http://www.w3.org/1998/Math/MathML", "id");
   other =
       URelaxer2.getAttributePropertyAsString(
           element, "http://www.w3.org/1998/Math/MathML", "other");
   content.clear();
   while (!stack.isEmptyElement()) {
     if (MCi.isMatch(stack)) {
       addContent(new MCi(stack));
     } else if (MCn.isMatch(stack)) {
       addContent(new MCn(stack));
     } else if (MApply.isMatch(stack)) {
       addContent(new MApply(stack));
     } else if (MReln.isMatch(stack)) {
       addContent(new MReln(stack));
     } else if (MLambda.isMatch(stack)) {
       addContent(new MLambda(stack));
     } else if (MCondition.isMatch(stack)) {
       addContent(new MCondition(stack));
     } else if (MDeclare.isMatch(stack)) {
       addContent(new MDeclare(stack));
     } else if (MSep.isMatch(stack)) {
       addContent(new MSep(stack));
     } else if (MSemantics.isMatch(stack)) {
       addContent(new MSemantics(stack));
     } else if (MAnnotation.isMatch(stack)) {
       addContent(new MAnnotation(stack));
     } else if (MAnnotationXml.isMatch(stack)) {
       addContent(new MAnnotationXml(stack));
     } else if (MInterval.isMatch(stack)) {
       addContent(new MInterval(stack));
     } else if (MList.isMatch(stack)) {
       addContent(new MList(stack));
     } else if (MMatrix.isMatch(stack)) {
       addContent(new MMatrix(stack));
     } else if (MMatrixrow.isMatch(stack)) {
       addContent(new MMatrixrow(stack));
     } else if (MSet.isMatch(stack)) {
       addContent(new MSet(stack));
     } else if (MVector.isMatch(stack)) {
       addContent(new MVector(stack));
     } else if (MLowlimit.isMatch(stack)) {
       addContent(new MLowlimit(stack));
     } else if (MUplimit.isMatch(stack)) {
       addContent(new MUplimit(stack));
     } else if (MBvar.isMatch(stack)) {
       addContent(new MBvar(stack));
     } else if (MDegree.isMatch(stack)) {
       addContent(new MDegree(stack));
     } else if (MLogbase.isMatch(stack)) {
       addContent(new MLogbase(stack));
     } else if (MInverse.isMatch(stack)) {
       addContent(new MInverse(stack));
     } else if (MIdent.isMatch(stack)) {
       addContent(new MIdent(stack));
     } else if (MAbs.isMatch(stack)) {
       addContent(new MAbs(stack));
     } else if (MConjugate.isMatch(stack)) {
       addContent(new MConjugate(stack));
     } else if (MExp.isMatch(stack)) {
       addContent(new MExp(stack));
     } else if (MFactorial.isMatch(stack)) {
       addContent(new MFactorial(stack));
     } else if (MNot.isMatch(stack)) {
       addContent(new MNot(stack));
     } else if (MLn.isMatch(stack)) {
       addContent(new MLn(stack));
     } else if (MSin.isMatch(stack)) {
       addContent(new MSin(stack));
     } else if (MCos.isMatch(stack)) {
       addContent(new MCos(stack));
     } else if (MTan.isMatch(stack)) {
       addContent(new MTan(stack));
     } else if (MSec.isMatch(stack)) {
       addContent(new MSec(stack));
     } else if (MCsc.isMatch(stack)) {
       addContent(new MCsc(stack));
     } else if (MCot.isMatch(stack)) {
       addContent(new MCot(stack));
     } else if (MSinh.isMatch(stack)) {
       addContent(new MSinh(stack));
     } else if (MCosh.isMatch(stack)) {
       addContent(new MCosh(stack));
     } else if (MTanh.isMatch(stack)) {
       addContent(new MTanh(stack));
     } else if (MSech.isMatch(stack)) {
       addContent(new MSech(stack));
     } else if (MCsch.isMatch(stack)) {
       addContent(new MCsch(stack));
     } else if (MCoth.isMatch(stack)) {
       addContent(new MCoth(stack));
     } else if (MArcsin.isMatch(stack)) {
       addContent(new MArcsin(stack));
     } else if (MArccos.isMatch(stack)) {
       addContent(new MArccos(stack));
     } else if (MArctan.isMatch(stack)) {
       addContent(new MArctan(stack));
     } else if (MDeterminant.isMatch(stack)) {
       addContent(new MDeterminant(stack));
     } else if (MTranspose.isMatch(stack)) {
       addContent(new MTranspose(stack));
     } else if (MQuotient.isMatch(stack)) {
       addContent(new MQuotient(stack));
     } else if (MDivide.isMatch(stack)) {
       addContent(new MDivide(stack));
     } else if (MPower.isMatch(stack)) {
       addContent(new MPower(stack));
     } else if (MRem.isMatch(stack)) {
       addContent(new MRem(stack));
     } else if (MImplies.isMatch(stack)) {
       addContent(new MImplies(stack));
     } else if (MSetdiff.isMatch(stack)) {
       addContent(new MSetdiff(stack));
     } else if (MFn.isMatch(stack)) {
       addContent(new MFn(stack));
     } else if (MCompose.isMatch(stack)) {
       addContent(new MCompose(stack));
     } else if (MPlus.isMatch(stack)) {
       addContent(new MPlus(stack));
     } else if (MTimes.isMatch(stack)) {
       addContent(new MTimes(stack));
     } else if (MMax.isMatch(stack)) {
       addContent(new MMax(stack));
     } else if (MMin.isMatch(stack)) {
       addContent(new MMin(stack));
     } else if (MGcd.isMatch(stack)) {
       addContent(new MGcd(stack));
     } else if (MAnd.isMatch(stack)) {
       addContent(new MAnd(stack));
     } else if (MOr.isMatch(stack)) {
       addContent(new MOr(stack));
     } else if (MXor.isMatch(stack)) {
       addContent(new MXor(stack));
     } else if (MUnion.isMatch(stack)) {
       addContent(new MUnion(stack));
     } else if (MIntersect.isMatch(stack)) {
       addContent(new MIntersect(stack));
     } else if (MMean.isMatch(stack)) {
       addContent(new MMean(stack));
     } else if (MSdev.isMatch(stack)) {
       addContent(new MSdev(stack));
     } else if (MVariance.isMatch(stack)) {
       addContent(new MVariance(stack));
     } else if (MMedian.isMatch(stack)) {
       addContent(new MMedian(stack));
     } else if (MMode.isMatch(stack)) {
       addContent(new MMode(stack));
     } else if (MSelector.isMatch(stack)) {
       addContent(new MSelector(stack));
     } else if (MRoot.isMatch(stack)) {
       addContent(new MRoot(stack));
     } else if (MMinus.isMatch(stack)) {
       addContent(new MMinus(stack));
     } else if (MLog.isMatch(stack)) {
       addContent(new MLog(stack));
     } else if (MInt.isMatch(stack)) {
       addContent(new MInt(stack));
     } else if (MDiff.isMatch(stack)) {
       addContent(new MDiff(stack));
     } else if (MPartialdiff.isMatch(stack)) {
       addContent(new MPartialdiff(stack));
     } else if (MSum.isMatch(stack)) {
       addContent(new MSum(stack));
     } else if (MProduct.isMatch(stack)) {
       addContent(new MProduct(stack));
     } else if (MLimit.isMatch(stack)) {
       addContent(new MLimit(stack));
     } else if (MMoment.isMatch(stack)) {
       addContent(new MMoment(stack));
     } else if (MExists.isMatch(stack)) {
       addContent(new MExists(stack));
     } else if (MForall.isMatch(stack)) {
       addContent(new MForall(stack));
     } else if (MNeq.isMatch(stack)) {
       addContent(new MNeq(stack));
     } else if (MIn.isMatch(stack)) {
       addContent(new MIn(stack));
     } else if (MNotin.isMatch(stack)) {
       addContent(new MNotin(stack));
     } else if (MNotsubset.isMatch(stack)) {
       addContent(new MNotsubset(stack));
     } else if (MNotprsubset.isMatch(stack)) {
       addContent(new MNotprsubset(stack));
     } else if (MTendsto.isMatch(stack)) {
       addContent(new MTendsto(stack));
     } else if (MEq.isMatch(stack)) {
       addContent(new MEq(stack));
     } else if (MLeq.isMatch(stack)) {
       addContent(new MLeq(stack));
     } else if (MLt.isMatch(stack)) {
       addContent(new MLt(stack));
     } else if (MGeq.isMatch(stack)) {
       addContent(new MGeq(stack));
     } else if (MGt.isMatch(stack)) {
       addContent(new MGt(stack));
     } else if (MSubset.isMatch(stack)) {
       addContent(new MSubset(stack));
     } else if (MPrsubset.isMatch(stack)) {
       addContent(new MPrsubset(stack));
     } else if (MMi.isMatch(stack)) {
       addContent(new MMi(stack));
     } else if (MMn.isMatch(stack)) {
       addContent(new MMn(stack));
     } else if (MMo.isMatch(stack)) {
       addContent(new MMo(stack));
     } else if (MMtext.isMatch(stack)) {
       addContent(new MMtext(stack));
     } else if (MMs.isMatch(stack)) {
       addContent(new MMs(stack));
     } else if (MMspace.isMatch(stack)) {
       addContent(new MMspace(stack));
     } else if (MMrow.isMatch(stack)) {
       addContent(new MMrow(stack));
     } else if (MMfrac.isMatch(stack)) {
       addContent(new MMfrac(stack));
     } else if (MMsqrt.isMatch(stack)) {
       addContent(new MMsqrt(stack));
     } else if (MMroot.isMatch(stack)) {
       addContent(new MMroot(stack));
     } else if (MMstyle.isMatch(stack)) {
       addContent(new MMstyle(stack));
     } else if (MMerror.isMatch(stack)) {
       addContent(new MMerror(stack));
     } else if (MMpadded.isMatch(stack)) {
       addContent(new MMpadded(stack));
     } else if (MMphantom.isMatch(stack)) {
       addContent(new MMphantom(stack));
     } else if (MMfenced.isMatch(stack)) {
       addContent(new MMfenced(stack));
     } else if (MMsub.isMatch(stack)) {
       addContent(new MMsub(stack));
     } else if (MMsup.isMatch(stack)) {
       addContent(new MMsup(stack));
     } else if (MMsubsup.isMatch(stack)) {
       addContent(new MMsubsup(stack));
     } else if (MMunder.isMatch(stack)) {
       addContent(new MMunder(stack));
     } else if (MMover.isMatch(stack)) {
       addContent(new MMover(stack));
     } else if (MMunderover.isMatch(stack)) {
       addContent(new MMunderover(stack));
     } else if (MMmultiscripts.isMatch(stack)) {
       addContent(new MMmultiscripts(stack));
     } else if (MMtable.isMatch(stack)) {
       addContent(new MMtable(stack));
     } else if (MMtr.isMatch(stack)) {
       addContent(new MMtr(stack));
     } else if (MMtd.isMatch(stack)) {
       addContent(new MMtd(stack));
     } else if (MMaligngroup.isMatch(stack)) {
       addContent(new MMaligngroup(stack));
     } else if (MMalignmark.isMatch(stack)) {
       addContent(new MMalignmark(stack));
     } else if (MMaction.isMatch(stack)) {
       addContent(new MMaction(stack));
     } else {
       break;
     }
   }
 }
Esempio n. 21
0
 /**
  * Gets the IMSetContent property <b>content</b>.
  *
  * @return IMSetContent[]
  */
 public final IMSetContent[] getContent() {
   IMSetContent[] array = new IMSetContent[content.size()];
   return ((IMSetContent[]) content.toArray(array));
 }
Esempio n. 22
0
 /**
  * Gets number of the IFtContentMixMixed property <b>content</b>.
  *
  * @return int
  */
 public int sizeContent() {
   return (content_.size());
 }
Esempio n. 23
0
 /**
  * Gets child RNodes.
  *
  * @return IRNode[]
  */
 public IRNode[] rGetRNodes() {
   java.util.List<IRNode> classNodes = new java.util.ArrayList<>();
   classNodes.addAll(paramListParam_);
   IRNode[] nodes = new IRNode[classNodes.size()];
   return ((IRNode[]) classNodes.toArray(nodes));
 }
 /**
  * Gets child RNodes.
  *
  * @return IRNode[]
  */
 public IRNode[] getRNodes() {
   java.util.List classNodes = new java.util.ArrayList();
   IRNode[] nodes = new IRNode[classNodes.size()];
   return ((IRNode[]) classNodes.toArray(nodes));
 }
Esempio n. 25
0
 /**
  * Gets the FcTr property <b>tr</b>.
  *
  * @return FcTr[]
  */
 public FcTr[] getTr() {
   FcTr[] array = new FcTr[tr_.size()];
   return ((FcTr[]) tr_.toArray(array));
 }