예제 #1
0
파일: MSet.java 프로젝트: asami/xmlsmartdoc
 /**
  * Tests if a Element <code>element</code> is valid for the <code>MSet</code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer2.isTargetElement(element, "http://www.w3.org/1998/Math/MathML", "set")) {
     return (false);
   }
   RStack target = new RStack(element);
   Element child;
   while (!target.isEmptyElement()) {
     if (MCi.isMatchHungry(target)) {
     } else if (MCn.isMatchHungry(target)) {
     } else if (MApply.isMatchHungry(target)) {
     } else if (MReln.isMatchHungry(target)) {
     } else if (MLambda.isMatchHungry(target)) {
     } else if (MCondition.isMatchHungry(target)) {
     } else if (MDeclare.isMatchHungry(target)) {
     } else if (MSep.isMatchHungry(target)) {
     } else if (MSemantics.isMatchHungry(target)) {
     } else if (MAnnotation.isMatchHungry(target)) {
     } else if (MAnnotationXml.isMatchHungry(target)) {
     } else if (MInterval.isMatchHungry(target)) {
     } else if (MList.isMatchHungry(target)) {
     } else if (MMatrix.isMatchHungry(target)) {
     } else if (MMatrixrow.isMatchHungry(target)) {
     } else if (MSet.isMatchHungry(target)) {
     } else if (MVector.isMatchHungry(target)) {
     } else if (MLowlimit.isMatchHungry(target)) {
     } else if (MUplimit.isMatchHungry(target)) {
     } else if (MBvar.isMatchHungry(target)) {
     } else if (MDegree.isMatchHungry(target)) {
     } else if (MLogbase.isMatchHungry(target)) {
     } else if (MInverse.isMatchHungry(target)) {
     } else if (MIdent.isMatchHungry(target)) {
     } else if (MAbs.isMatchHungry(target)) {
     } else if (MConjugate.isMatchHungry(target)) {
     } else if (MExp.isMatchHungry(target)) {
     } else if (MFactorial.isMatchHungry(target)) {
     } else if (MNot.isMatchHungry(target)) {
     } else if (MLn.isMatchHungry(target)) {
     } else if (MSin.isMatchHungry(target)) {
     } else if (MCos.isMatchHungry(target)) {
     } else if (MTan.isMatchHungry(target)) {
     } else if (MSec.isMatchHungry(target)) {
     } else if (MCsc.isMatchHungry(target)) {
     } else if (MCot.isMatchHungry(target)) {
     } else if (MSinh.isMatchHungry(target)) {
     } else if (MCosh.isMatchHungry(target)) {
     } else if (MTanh.isMatchHungry(target)) {
     } else if (MSech.isMatchHungry(target)) {
     } else if (MCsch.isMatchHungry(target)) {
     } else if (MCoth.isMatchHungry(target)) {
     } else if (MArcsin.isMatchHungry(target)) {
     } else if (MArccos.isMatchHungry(target)) {
     } else if (MArctan.isMatchHungry(target)) {
     } else if (MDeterminant.isMatchHungry(target)) {
     } else if (MTranspose.isMatchHungry(target)) {
     } else if (MQuotient.isMatchHungry(target)) {
     } else if (MDivide.isMatchHungry(target)) {
     } else if (MPower.isMatchHungry(target)) {
     } else if (MRem.isMatchHungry(target)) {
     } else if (MImplies.isMatchHungry(target)) {
     } else if (MSetdiff.isMatchHungry(target)) {
     } else if (MFn.isMatchHungry(target)) {
     } else if (MCompose.isMatchHungry(target)) {
     } else if (MPlus.isMatchHungry(target)) {
     } else if (MTimes.isMatchHungry(target)) {
     } else if (MMax.isMatchHungry(target)) {
     } else if (MMin.isMatchHungry(target)) {
     } else if (MGcd.isMatchHungry(target)) {
     } else if (MAnd.isMatchHungry(target)) {
     } else if (MOr.isMatchHungry(target)) {
     } else if (MXor.isMatchHungry(target)) {
     } else if (MUnion.isMatchHungry(target)) {
     } else if (MIntersect.isMatchHungry(target)) {
     } else if (MMean.isMatchHungry(target)) {
     } else if (MSdev.isMatchHungry(target)) {
     } else if (MVariance.isMatchHungry(target)) {
     } else if (MMedian.isMatchHungry(target)) {
     } else if (MMode.isMatchHungry(target)) {
     } else if (MSelector.isMatchHungry(target)) {
     } else if (MRoot.isMatchHungry(target)) {
     } else if (MMinus.isMatchHungry(target)) {
     } else if (MLog.isMatchHungry(target)) {
     } else if (MInt.isMatchHungry(target)) {
     } else if (MDiff.isMatchHungry(target)) {
     } else if (MPartialdiff.isMatchHungry(target)) {
     } else if (MSum.isMatchHungry(target)) {
     } else if (MProduct.isMatchHungry(target)) {
     } else if (MLimit.isMatchHungry(target)) {
     } else if (MMoment.isMatchHungry(target)) {
     } else if (MExists.isMatchHungry(target)) {
     } else if (MForall.isMatchHungry(target)) {
     } else if (MNeq.isMatchHungry(target)) {
     } else if (MIn.isMatchHungry(target)) {
     } else if (MNotin.isMatchHungry(target)) {
     } else if (MNotsubset.isMatchHungry(target)) {
     } else if (MNotprsubset.isMatchHungry(target)) {
     } else if (MTendsto.isMatchHungry(target)) {
     } else if (MEq.isMatchHungry(target)) {
     } else if (MLeq.isMatchHungry(target)) {
     } else if (MLt.isMatchHungry(target)) {
     } else if (MGeq.isMatchHungry(target)) {
     } else if (MGt.isMatchHungry(target)) {
     } else if (MSubset.isMatchHungry(target)) {
     } else if (MPrsubset.isMatchHungry(target)) {
     } else if (MMi.isMatchHungry(target)) {
     } else if (MMn.isMatchHungry(target)) {
     } else if (MMo.isMatchHungry(target)) {
     } else if (MMtext.isMatchHungry(target)) {
     } else if (MMs.isMatchHungry(target)) {
     } else if (MMspace.isMatchHungry(target)) {
     } else if (MMrow.isMatchHungry(target)) {
     } else if (MMfrac.isMatchHungry(target)) {
     } else if (MMsqrt.isMatchHungry(target)) {
     } else if (MMroot.isMatchHungry(target)) {
     } else if (MMstyle.isMatchHungry(target)) {
     } else if (MMerror.isMatchHungry(target)) {
     } else if (MMpadded.isMatchHungry(target)) {
     } else if (MMphantom.isMatchHungry(target)) {
     } else if (MMfenced.isMatchHungry(target)) {
     } else if (MMsub.isMatchHungry(target)) {
     } else if (MMsup.isMatchHungry(target)) {
     } else if (MMsubsup.isMatchHungry(target)) {
     } else if (MMunder.isMatchHungry(target)) {
     } else if (MMover.isMatchHungry(target)) {
     } else if (MMunderover.isMatchHungry(target)) {
     } else if (MMmultiscripts.isMatchHungry(target)) {
     } else if (MMtable.isMatchHungry(target)) {
     } else if (MMtr.isMatchHungry(target)) {
     } else if (MMtd.isMatchHungry(target)) {
     } else if (MMaligngroup.isMatchHungry(target)) {
     } else if (MMalignmark.isMatchHungry(target)) {
     } else if (MMaction.isMatchHungry(target)) {
     } else {
       break;
     }
   }
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
예제 #2
0
파일: MSet.java 프로젝트: asami/xmlsmartdoc
 /** @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;
     }
   }
 }