It would be nice to be able to specify the types of validations to be
performed in an ontology.  It would make it easier for systems to share a
common, verifiable definition for a value.  This would satisfy the DRY rule
across applications, APIs, companies, etc.  But that's perhaps a little
beyond the scope of the thread.

Cheers,

Mark



On Tue, Apr 16, 2013 at 4:05 PM, Kevin Wright <kev.lee.wri...@gmail.com>wrote:

> I'd have to disagree. For constraints you're much better doing it in the
> type system, where the compiler can check things for you.
>
> e.g. Provide an argument of type ValidatedId instead of a String with a
> bunch of annotations.
>
> I'm also curious to see if the new 'Optional' type gets much adoption vs
> @NotNull and friends, despite its limitations.
> On 16 Apr 2013 21:53, "Fabrizio Giudici" <fabrizio.giud...@tidalwave.it>
> wrote:
>
>> On Tue, 16 Apr 2013 22:11:04 +0200, Mark Fortner <phidia...@gmail.com>
>> wrote:
>>
>>  Roland,
>>> We have a similar problem in the bioinformatics world, where a field like
>>> "id" could mean an ID from a specific database, an accession (an
>>> alphanumeric ID similar to a database ID).  One way around this is to use
>>> semantic annotations for fields. Here's an example.
>>> http://aspenbio.wordpress.com/**2011/01/20/biogroovy-and-the-**
>>> semantic-web/<http://aspenbio.wordpress.com/2011/01/20/biogroovy-and-the-semantic-web/>
>>>
>>
>> RDF is great for interoperability; for readability in general cases, it's
>> still good but requires that the reader knows it.
>>
>> Generally speaking, annotations can be good for specifying constraints,
>> pre/post conditions, and improve readability in a easy way. In its small
>> garden, for instance, things such as @NonNull are simple, intuitive and
>> deliver some added value.
>>
>>
>> --
>> Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
>> "We make Java work. Everywhere."
>> http://tidalwave.it/fabrizio/**blog <http://tidalwave.it/fabrizio/blog>-
>> fabrizio.giud...@tidalwave.it
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Java Posse" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 
>> javaposse+unsubscribe@**googlegroups.com<javaposse%2bunsubscr...@googlegroups.com>
>> .
>> To post to this group, send email to javaposse@googlegroups.com.
>> Visit this group at 
>> http://groups.google.com/**group/javaposse?hl=en<http://groups.google.com/group/javaposse?hl=en>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Java Posse" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to javaposse+unsubscr...@googlegroups.com.
> To post to this group, send email to javaposse@googlegroups.com.
> Visit this group at http://groups.google.com/group/javaposse?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to javaposse+unsubscr...@googlegroups.com.
To post to this group, send email to javaposse@googlegroups.com.
Visit this group at http://groups.google.com/group/javaposse?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to