Questions tagged [oval]

OVal (Object Validation Framework) is a validation framework for Java objects

Per the OVal about page:

OVal is a pragmatic and extensible validation framework for any kind of Java objects (not only JavaBeans).

Constraints can be declared with annotations (@NotNull, @MaxLength), POJOs or XML.

Custom constraints can be expressed as custom Java classes or by using scripting languages such as JavaScript, Groovy, BeanShell, OGNL or MVEL.

Besides field/property validation OVal implements Programming by Contract features by utilizing AspectJ based aspects. This for example allows runtime validation of method arguments.

See also: OVal User Guide

59 questions
1
vote
1 answer

Can I use UIBezier to draw an oval progress bar

How to draw oval with start and end angle in swift? Just like the method that I use init(arcCenter:radius:startAngle:endAngle:clockwise:) to draw a circle with a gap. I tried to use init(ovalln:) and the relation of the bezier Curve and ellipse to…
Alice Teng
  • 21
  • 5
1
vote
2 answers

Index of an invalid object within a list

Is there an equivalent to the getPropertyPath method in the Oval validation framework? The example code below prints the properties of all nested invalid values of an object. I'd like to also print the index of the invalid object within the list but…
1
vote
0 answers

Draw circle on canvas using strokeOval - how to let it expand from mouse click grid position

Double pytha = (Math.pow(e.getX() - circ.getCenterX(),2) + Math.pow(e.getY() - circ.getCenterY(),2)); Double pythaSqr = Math.sqrt(pytha); circ.setRadius(pythaSqr); …
Delpux
  • 137
  • 4
1
vote
1 answer

Is there a way to use an Oval object with the intersects() function?

First of all, I know that there are very similar questions answered already, but I haven't seen this question in particular asked yet. I have an oval and a rectangle and I want to detect if they are intersecting. I know you can do this with two…
Ampck
  • 48
  • 6
1
vote
3 answers

How to draw an allipse (oval) on a Highchart graph

I have two series and their intersection point. I want to have an oval (ellipse) on a chart with center in intersection. Oval radiuses should be set in terms of axis units to show area of interest for each axis. Highcharts.chart('container', { …
Anton Rybalko
  • 1,229
  • 17
  • 23
1
vote
1 answer

How to draw a semi oval shape with Android vector graphics

I was trying to make a semi oval shape. I did it but it's reverse. I want to make a oval shape like this image. I tried this code
1
vote
0 answers

Move UIView then change circle layer using UIBezierPath that time UIView move automatically

I'm using UIBezierPath for draw ovalInRect on UIView its working properly but when I move UIView after I change ovalInRect then UIView take old position without change UIView position. ellipsePath = UIBezierPath(ovalInRect: CGRectMake(0, 0,…
Mitul Marsoniya
  • 5,272
  • 4
  • 33
  • 57
1
vote
0 answers

How to java ThreadLocal resolve memory leak

I am getting following memory leak warning if using Oval library in my java project for json input validation: org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [rision] created a ThreadLocal with …
Nitish Raj
  • 137
  • 1
  • 2
  • 12
1
vote
1 answer

Problems with validation on Spring Boot and OVal

Good day. I have app on Spring Boot 1.3 with net.sf.oval 1.85. My model: @Entity @Table(name = "company") public class Company extends BaseModel { @NotBlank @NotNull @Length(min = 5, max = 50) @Column(nullable = false, name =…
DamienMiheev
  • 998
  • 8
  • 31
1
vote
1 answer

Java creating multiple Balls using paintcomponent

I want to create a method that creates 5 balls on a panel. Can somebody please help me get around this using the paint component method or creating my own draw method. As you can see bellow, i have a paint component method with a for loop that will…
user3500147
  • 125
  • 1
  • 11
1
vote
1 answer

How to override @Autowired with XML

In a Spring project I am trying to get injection to work in OVal (a SourceForge library) custom validators (CheckWith implementations). The OVal injector contains roughtly: public class SpringInjector { @Autowired private…
Bolot
  • 95
  • 8
1
vote
1 answer

Stop object field validation on first failure

I'm using OVAL as object validation framework in my project. Let's say I have the following object: public class MyObject { @NotNull(message = "Amount cannot be null.") @NotNegative(when = "groovy:((_value != null) && (_value.getAmount() <=…
Wild One
  • 751
  • 1
  • 5
  • 11
1
vote
0 answers

Validate a list of objects with Oval Xml configurations

I need to validate the objects of list with Xml configurations. User contains a list of bags. class User{ private List bags = new ArrayList(); } Can't i use instanceOf element within the element to validate the all the Bag properties.…
user2622132
  • 49
  • 1
  • 3
  • 11
1
vote
0 answers

How to use a RecordType in an XSD Schema Definition in Android

I have a test my_test which contains an object my_object and a state my_state. The test has one entity my_entity and three corresponding fields a,b and c. I need to display the data in record format combining all the three fields. Here is a sample…
0
votes
1 answer

How do I add additional context / values for a custom XML based method constraint with the OVal validation framework

With the OVal validation framework (http://oval.sourceforge.net/) it is possible to create custom annotation or XML based constraints (http://oval.sourceforge.net/userguide.html#d4e493). My intention is to generate an OVal XML configuration file out…