Examples of Occurances


Examples of org.apache.hivemind.Occurances

        checkAttributes();

        cpd.setId(getValidatedAttribute("id", ID_PATTERN, "id-format"));

        Occurances count = (Occurances) getEnumAttribute("occurs", OCCURS_MAP);

        if (count != null)
            cpd.setCount(count);

        Visibility visibility = (Visibility) getEnumAttribute("visibility", VISIBILITY_MAP);
View Full Code Here

Examples of org.apache.hivemind.Occurances

        spd.setId(getValidatedAttribute("id", ID_PATTERN, "id-format"));
        spd.setInterfaceClassName(getAttribute("interface"));

        spd.setParametersSchemaId(getAttribute("parameters-schema-id"));

        Occurances count = (Occurances) getEnumAttribute("parameters-occurs", OCCURS_MAP);

        if (count != null)
            spd.setParametersCount(count);

        Visibility visibility = (Visibility) getEnumAttribute("visibility", VISIBILITY_MAP);
View Full Code Here

Examples of org.apache.hivemind.Occurances

        while (i.hasNext())
        {
            ConfigurationPointImpl point = (ConfigurationPointImpl) i.next();

            Occurances expected = point.getExpectedCount();

            if (expected == Occurances.UNBOUNDED)
                continue;

            int count = point.getContributionCount();
View Full Code Here

Examples of org.apache.hivemind.Occurances

    {
        if (_factory == null)
        {
            ServicePoint factoryPoint = _contributingModule.getServicePoint(_factoryServiceId);

            Occurances expected = factoryPoint.getParametersCount();

            _factory = (ServiceImplementationFactory) factoryPoint
                    .getService(ServiceImplementationFactory.class);

            Schema schema = factoryPoint.getParametersSchema();
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

            XmlServicePointDefinitionImpl xmlServicePoint = (XmlServicePointDefinitionImpl) spd;

            Schema schema = xmlServicePoint.getParametersSchema();
            if (schema != null) {
               
                Occurances expected = xmlServicePoint.getParametersCount();
                checkParameterCounts(errorLog, expected);

                SchemaProcessorImpl processor = new SchemaProcessorImpl(errorLog, schema);
               
                _convertedParameters = constructParametersContainer(schema.getRootElementClassName(), factoryPoint.getModule());
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

*/
public class TestOccurances extends TestCase
{
    public void testNone()
    {
        Occurances o = Occurances.NONE;

        assertEquals(true, o.inRange(0));
        assertEquals(false, o.inRange(1));
    }
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

        assertEquals(false, o.inRange(1));
    }

    public void testOnePlus()
    {
        Occurances o = Occurances.ONE_PLUS;
        assertEquals(false, o.inRange(0));
        assertEquals(true, o.inRange(1));
        assertEquals(true, o.inRange(2));
    }
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

        assertEquals(true, o.inRange(2));
    }

    public void testRequired()
    {
        Occurances o = Occurances.REQUIRED;

        assertEquals(false, o.inRange(0));
        assertEquals(true, o.inRange(1));
        assertEquals(false, o.inRange(2));
    }
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

        assertEquals(false, o.inRange(2));
    }

    public void testUnbounded()
    {
        Occurances o = Occurances.UNBOUNDED;

        assertEquals(true, o.inRange(0));
        assertEquals(true, o.inRange(1));
        assertEquals(true, o.inRange(2));
    }
View Full Code Here

Examples of org.apache.hivemind.definition.Occurances

        assertEquals(true, o.inRange(2));
    }

    public void testOptional()
    {
        Occurances o = Occurances.OPTIONAL;

        assertEquals(true, o.inRange(0));
        assertEquals(true, o.inRange(1));
        assertEquals(false, o.inRange(2));
    }
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.