Example #1
0
        internal static XdmSequenceType FromSequenceType(JSequenceType seqType)
        {
            XdmItemType itemType = XdmItemType.MakeXdmItemType(seqType.getPrimaryType());
            char        occ;

            if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_MORE)
            {
                occ = ZERO_OR_MORE;
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ONE_OR_MORE)
            {
                occ = ONE_OR_MORE;
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_ONE)
            {
                occ = ZERO_OR_ONE;
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO)
            {
                occ = ZERO;
            }
            else
            {
                occ = ONE;
            }
            if (itemType == null)
            {
                return(null);
            }
            return(new XdmSequenceType(itemType, occ));
        }
Example #2
0
        internal static XdmSequenceType FromSequenceType(JSequenceType seqType)
        {
            XdmItemType itemType = XdmItemType.MakeXdmItemType(seqType.getPrimaryType());
            char        occ;

            if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_MORE)
            {
                occ = '*';
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ONE_OR_MORE)
            {
                occ = '+';
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_ONE)
            {
                occ = '?';
            }
            else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO)
            {
                occ = 'º';     //xBA
            }
            else
            {
                occ = ' ';
            }
            return(new XdmSequenceType(itemType, occ));
        }
Example #3
0
 internal static XdmSequenceType FromSequenceType(JSequenceType seqType)
 {
     XdmItemType itemType = XdmItemType.MakeXdmItemType(seqType.getPrimaryType());
         char occ;
         if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_MORE)
         {
             occ = '*';
         }
         else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ONE_OR_MORE)
         {
             occ = '+';
         }
         else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO_OR_ONE)
         {
             occ = '?';
         }
         else if (seqType.getCardinality() == JStaticProperty.ALLOWS_ZERO)
         {
             occ = 'º'; //xBA
         }
         else
         {
             occ = ' ';
         }
         return new XdmSequenceType(itemType, occ);
 }