Examples of Choice


Examples of org.antlr.v4.codegen.model.Choice

    for (CodeGeneratorExtension ext : extensions) ops = ext.sempred(ops);
    return ops;
  }

  public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST label) {
    Choice c = delegate.getChoiceBlock(blkAST, alts, label);
    for (CodeGeneratorExtension ext : extensions) c = ext.getChoiceBlock(c);
    return c;
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.Choice

    for (CodeGeneratorExtension ext : extensions) c = ext.getChoiceBlock(c);
    return c;
  }

  public Choice getEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts) {
    Choice c = delegate.getEBNFBlock(ebnfRoot, alts);
    for (CodeGeneratorExtension ext : extensions) c = ext.getEBNFBlock(c);
    return c;
  }
View Full Code Here

Examples of org.dspace.content.authority.Choice

                List<Choice> choiceList = new ArrayList<Choice>();

                for (DSpaceObject dso : result.getDspaceObjects())
                {
                    ACrisObject cris = (ACrisObject) dso;
                    choiceList.add(new Choice(ResearcherPageUtils
                            .getPersistentIdentifier(cris), cris.getName(),
                            cris.getName()));
                }

                Choice[] results = new Choice[choiceList.size()];
View Full Code Here

Examples of org.dspace.content.authority.Choice

                for (DSpaceObject dso : result.getDspaceObjects())
                {
                    ResearcherPage rp = (ResearcherPage) dso;
                    choiceList
                            .add(new Choice(ResearcherPageUtils
                                    .getPersistentIdentifier(rp), rp
                                    .getFullName(), ResearcherPageUtils
                                    .getLabel(rp.getFullName(), rp)));

                    if (rp.getTranslatedName() != null
                            && rp.getTranslatedName().getVisibility() == VisibilityConstants.PUBLIC
                            && rp.getTranslatedName().getValue() != null)
                    {
                        choiceList.add(new Choice(ResearcherPageUtils
                                .getPersistentIdentifier(rp), rp
                                .getTranslatedName().getValue(),
                                ResearcherPageUtils.getLabel(rp
                                        .getTranslatedName().getValue(), rp)));
                    }

                    for (RestrictedField variant : rp.getVariants())
                    {
                        if (variant.getValue() != null
                                && variant.getVisibility() == VisibilityConstants.PUBLIC)
                        {
                            choiceList.add(new Choice(ResearcherPageUtils
                                    .getPersistentIdentifier(rp), variant
                                    .getValue(), ResearcherPageUtils.getLabel(
                                    variant.getValue(), rp)));
                        }
                    }
View Full Code Here

Examples of org.dspace.content.authority.Choice

                totalResult = (int) result.getTotalSearchResults();
                for (DSpaceObject dso : result.getDspaceObjects())
                {
                    ResearcherPage rp = (ResearcherPage) dso;
                    choiceList
                            .add(new Choice(rp.getCrisID(), text,
                                    ResearcherPageUtils.getLabel(
                                            rp.getFullName(), rp)));
                }
            }
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.schema.model.Choice

            currentElement = new Element();
            // don't set the element name yet, as it may end up being a ref
            ComplexType cType = new ComplexType();
            TypeDefParticle particle = null;
            if (isChoice) {
                particle = new Choice();
                if (isUnbounded) {
                    particle.setMaxOccurs(Occurs.UNBOUNDED);
                }
            } else {
                XPathFragment nextFragment = frag.getNextFragment();
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.schema.model.Choice

            gElement.setType(getQualifiedTypeName(prop, fragSchema));
        } else {
            ComplexType gCType = new ComplexType();
            TypeDefParticle particle;
            if (isChoice) {
                particle = new Choice();
                if (isUnbounded) {
                    particle.setMaxOccurs(Occurs.UNBOUNDED);
                }
            } else {
                particle = new Sequence();
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.schema.model.Choice

     * @param type the ComplexType which compositor(s) should be added to
     * @param compositor the sequence/choice/all to modify
     * @param schema the schema being built
     */
    private void addChoiceToSchema(Property property, TypeInfo typeInfo, ComplexType type, TypeDefParticle compositor, Schema schema) {
        Choice choice = new Choice();
        if (property.getGenericType() != null) {
            choice.setMaxOccurs(Occurs.UNBOUNDED);
        }
        ArrayList<Property> choiceProperties = (ArrayList<Property>) property.getChoiceProperties();
        addToSchemaType(typeInfo, choiceProperties, choice, type, schema);
        if (compositor instanceof Sequence) {
            ((Sequence) compositor).addChoice(choice);
View Full Code Here

Examples of org.eclipse.persistence.internal.oxm.schema.model.Choice

              element.setMinOccurs(Occurs.ZERO);
            }
            compositor.addElement(element);
        } else {
            // otherwise, add a choice of referenced elements.
            Choice choice = new Choice();
            if (property.getGenericType() != null) {
                choice.setMaxOccurs(Occurs.UNBOUNDED);
            }
            if (!property.isRequired()){
              choice.setMinOccurs(Occurs.ZERO);
            }
            for (ElementDeclaration elementDecl : referencedElements) {
                Element element = new Element();
                String localName = elementDecl.getElementName().getLocalPart();

                String prefix = getPrefixForNamespace(schema, elementDecl.getElementName().getNamespaceURI());
                if (elementDecl.getScopeClass() == GLOBAL.class){
                    if (prefix == null || prefix.equals(EMPTY_STRING)) {
                        element.setRef(localName);
                    } else {
                        element.setRef(prefix + COLON + localName);
                    }
                } else {
                    Schema referencedSchema = getSchemaForNamespace(elementDecl.getElementName().getNamespaceURI());
                    element.setType(getTypeName(property, elementDecl.getJavaType(), referencedSchema));
                    element.setName(localName);
                }
                choice.addElement(element);
            }
            // handle XmlAnyElement case
            if (property.isAny()) {
                addAnyToSchema(property, choice, false);
            }
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Choice

    Endpoint ep3 = new Endpoint();
    ep3.setUri("seda:c");
    Endpoint ep4 = new Endpoint();
    ep4.setUri("seda:d");

    Choice choice = new Choice();
    ep1.addTargetNode(choice);
    // adding out of order to check we add the otherwise first before the non-when/otherwise
    choice.addTargetNode(ep4);

    When when = new When();
    choice.addTargetNode(when);
    when.addTargetNode(ep2);

    Otherwise otherwise = new Otherwise();
    choice.addTargetNode(otherwise);
    otherwise.addTargetNode(ep3);

   
    RouteSupport route = new Route();
    route.addChildren(ep1, choice, when, otherwise, ep2, ep3, ep4);
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.