Examples of Length


Examples of com.softwaremill.common.cdi.validation.Length

        Assert.assertFalse(tooLong);
        verify(context).buildConstraintViolationWithTemplate("Value is too long");
    }

    private LengthValidator initializeValidator(Class<?> classWithAnnotation) throws NoSuchFieldException {
        Length constraint = classWithAnnotation.getField("field").getAnnotation(Length.class);
        LengthValidator validator = new LengthValidator();
        validator.initialize(constraint);

        return validator;
    }
View Full Code Here

Examples of gannuNLP.overlapmeasures.Length

  @Override
  public void init(Input document)throws Exception {
    System.out.println();
    if(this.getValue("scoring")==null)
    {
      this.scoring=(OverlapMeasure)new Length();
    }
    else
    {
      this.scoring=(OverlapMeasure)Class.forName(this.getValue("scoring")).newInstance();
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

    /**
     * Test case for {@link QueryObjectModelFactory#length(PropertyValue)}
     */
    public void testLength() throws RepositoryException {
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Length len = qf.length(propValue);
        assertNotNull("Property value must not be null", len.getPropertyValue());
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

            throws UnsupportedRepositoryOperationException {
        if (operand instanceof FullTextSearchScore) {
            FullTextSearchScore ftss = (FullTextSearchScore) operand;
            return ftss.getSelectorName();
        } else if (operand instanceof Length) {
            Length length = (Length) operand;
            return getSelectorName(length.getPropertyValue());
        } else if (operand instanceof LowerCase) {
            LowerCase lower = (LowerCase) operand;
            return getSelectorName(lower.getOperand());
        } else if (operand instanceof NodeLocalName) {
            NodeLocalName local = (NodeLocalName) operand;
View Full Code Here

Examples of javax.jcr.query.qom.Length

    /**
     * Test case for {@link QueryObjectModelFactory#length(PropertyValue)}
     */
    public void testLength() throws RepositoryException {
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Length len = qf.length(propValue);
        assertNotNull("Property value must not be null", len.getPropertyValue());
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

    }

    @Test
    public void length() throws RepositoryException {
        PropertyValue p = f.propertyValue("selectorName", "propertyName");
        Length l = f.length(p);
        assertEquals(p, l.getPropertyValue());
        assertEquals("LENGTH([selectorName].[propertyName])", l.toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

    }

    @Test
    public void lowerCase() throws RepositoryException {
        PropertyValue p = f.propertyValue("selectorName", "propertyName");
        Length length = f.length(p);
        LowerCase l = f.lowerCase(length);
        assertEquals(length, l.getOperand());
        assertEquals("LOWER(LENGTH([selectorName].[propertyName]))", l.toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

    }

    @Test
    public void upperCase() throws RepositoryException {
        PropertyValue p = f.propertyValue("selectorName", "propertyName");
        Length length = f.length(p);
        UpperCase u = f.upperCase(length);
        assertEquals(length, u.getOperand());
        assertEquals("UPPER(LENGTH([selectorName].[propertyName]))", u.toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.Length

    }

    @Test
    public void length() throws RepositoryException {
        PropertyValue p = f.propertyValue("selectorName", "propertyName");
        Length l = f.length(p);
        assertEquals(p, l.getPropertyValue());
    }
View Full Code Here

Examples of mrpotatoes.validation.certifiers.length

/**
*
* @author avillanueva
*/
public class Certify {
  static public Certifiable length() { return new length(); }
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.