[hibernate-dev] Re: [Hibernate-JIRA] Closed: (HBX-775) Graphs fail for entities with Set collections

2006-10-12 Thread Mark Hobson

Hi Max,

(Thought I'd take this to the dev list rather than clog up jira.)

The graphviz generation worked fine thanks.  I only tried it on a
small test project, but I will be running it on a large project
shortly - I'll let you know if I encounter any problems.

On a related note, I may need to do some work on the hbm2doc templates
to include information such as entity hierarchies and inherited
properties.  Does that sound like something you'd be interested in
patches for?

Cheers,

Mark

On 12/10/06, Max Rydahl Andersen (JIRA) <[EMAIL PROTECTED]> wrote:

 [ 
http://opensource.atlassian.com/projects/hibernate/browse/HBX-775?page=all ]

Max Rydahl Andersen closed HBX-775:
---

Fix Version: 3.2beta9
 Resolution: Fixed

thanks. not often we see bug reports for a feature I haven't yet documented how 
to use ;)

I assume you could run the graphviz generation fairly easy then ?

> Graphs fail for entities with Set collections
> -
>
>  Key: HBX-775
>  URL: 
http://opensource.atlassian.com/projects/hibernate/browse/HBX-775
>  Project: Hibernate Tools
> Type: Bug

>   Components: visualizations
> Versions: 3.2beta8
> Reporter: Mark Hobson
>  Fix For: 3.2beta9
>  Attachments: patch.txt
>
>
> Looks like Sets were neglected from EntityNameFromValueVisitor.  Fixed in 
attached patch.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


hbm2doc diagrams (Was: Re: [hibernate-dev] Re: [Hibernate-JIRA] Closed: (HBX-775) Graphs fail for entities with Set collections)

2006-10-12 Thread Mark Hobson

On 12/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

that would be nice to know how it works out.


It ran but with a few warnings - it appears to have problems with
inner-class syntax:

Error: ...\entitygraph.dot:30: syntax error near line 30
context:   >>>  uk_dot_co_dot_iizuka_dot_support_dot_Reporter$ <<<
EventContactTime [ label = "{
uk\.co\.iizuka\.support\.Reporter$EventContactTime| }",
URL="uk/co/iizuka/support/Reporter$EventContactTime.html" ]

Also looks like hbm2doc doesn't qualify inner-classes with their
outer-classnames either as javadoc does.

By the way the final entity diagram was 42780x7969px, so not too navigable :)


Probably.

I'm also interested in cleaning up hbm2doc since currently it does things
in "interesting" ways...so any contribution that simplifies and/or make it
more feature complete is very welcome.


Cool, we've got a few features we need that appear to be missing, so I
hope to start some patches soon.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: Re: hbm2doc diagrams (Was: Re: [hibernate-dev] Re: [Hibernate-JIRA] Closed: (HBX-775) Graphs fail for entities with Set collections)

2006-10-23 Thread Mark Hobson

On 12/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

>> I'm also interested in cleaning up hbm2doc since currently it does
>> things
>> in "interesting" ways...so any contribution that simplifies and/or make
>> it
>> more feature complete is very welcome.
>
> Cool, we've got a few features we need that appear to be missing, so I
> hope to start some patches soon.

sounds cool.


I've started some minor patches today, but was wondering if anyone
would be offended if I reformatted the hbm2doc templates?  The
inconsistent indentation makes patching them rather hard going.

I hope this constitutes as a dev topic, if not then feel free to shoot me down!

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] Re: hbm2doc diagrams

2006-10-23 Thread Mark Hobson

On 23/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

> I've started some minor patches today, but was wondering if anyone
> would be offended if I reformatted the hbm2doc templates?  The
> inconsistent indentation makes patching them rather hard going.

feel free.

I plan to apply your current patches tomorrow.


Cool.  I've reformatted locally with the patches included, so I'll
wait until you apply the others before submitting any more to avoid
conflict-hell.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Re: hbm2doc diagrams

2006-10-24 Thread Mark Hobson

On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

I've applied your current patches now. thanks.


Thanks Max.  If you could be so kind to apply the new reformatted
templates (HBX-789) then I can base my next batch of patches from
that.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Re: hbm2doc diagrams

2006-10-24 Thread Mark Hobson

On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

tried to look at them but they were a big mesh of perl code or worse so
not really "managable" :)


Nasty, best leave that alone then.


well, they have an outdated specific test for not using % in th and td
with attribute.
It is understood by all browsers today.


It's probably because the width attribute on td/th is deprecated in
HTML4, although browsers are necessarily lenient to a fault..


Any HTML/CSS that looks good on IE, FireFox and Opera (and are simple to
generate) is my minimum requirements ;)


Cool, well if I get the time after adding the features I need then
I'll have a stab.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Re: hbm2doc diagrams

2006-10-24 Thread Mark Hobson

On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

done.


Thanks.


I tried to verify our generated html with jtidy, but it reports too
many "false alarms" (e.g. usage of % in td/th width).

Anyone knows of a better verifier that can be used programmatically in
unittests ?


The w3c validators are normally the best bet, but they tend to be
online tools rather than programmatic ones.  They are open-source
though, so it may be possible to integrate into unit tests.

Regarding the jtidy warnings, they are normally fair points and can be
fixed by moving to clean XHTML and CSS.  I was contemplating the work
involved when reformatting the templates, and it wouldn't be too hard.
It'd be nice to move away from HTML4 and fully utilise CSS, but I
wasn't sure what your minimum requirements are.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] hbm2doc with inner-classes

2006-10-24 Thread Mark Hobson

Hi there,

I'm looking at fixing hbm2doc to work with inner-classes and figure
the following changes to POJOClass are necessary as it stands:

- getShortName, getDeclarationName and getJavaTypeName need to return
X.Y for inner classes, not just Y

I'm not entirely sure of the distinction between getShortName and
getDeclarationName - the latter seems to account for meta attributes
whereas the former doesn't.  Also, changing getJavaTypeName requires
altering the behaviour of ImportContextImpl such that:

  ImportContextImpl.importType("a.b.X.Y") == "X.Y" (import a.b.X)

Obviously these changes will have repercussions in other areas of
hbm2x.  Any thoughts on how to minimise damage?

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-30 Thread Mark Hobson

On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

> I'm not entirely sure of the distinction between getShortName and
> getDeclarationName - the latter seems to account for meta attributes
> whereas the former doesn't.  Also, changing getJavaTypeName requires
> altering the behaviour of ImportContextImpl such that:
>
>ImportContextImpl.importType("a.b.X.Y") == "X.Y" (import a.b.X)

Again, how do you know wether a name is a class or an inner class?


Looking at the uses of ImportContext, the FQCN being passed into
importType is of the form that is return by Class.getName.  For
inner-classes, this uses the dollar syntax, e.g. "a.b.X$Y".  If this
is definitely the case, then we can change ImportContextImpl to
support inner-classes as described above.

I'm happy to patch this, but was curious about any knock-on effects.
I've tried running the tools tests but get a heap of errors - is there
any special configuration I'm unaware of for them to pass?

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-30 Thread Mark Hobson

On 30/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

What errors do you see ?

Parts of the testsuite runs best against HSQLDB with
hibernate.default_schema set to PUBLIC.


Many of the tests fail with:

Testcase: testVersion took 0.344 sec
Caused an ERROR
Duplicate class name 'Basic' generated for
'org.hibernate.mapping.Table(PUBLIC.BASIC)'. Same name where generated
for 'org.hibernate.mapping.Table(PUBLIC.BASIC)'
org.hibernate.cfg.JDBCBinderException: Duplicate class name 'Basic'
generated for 'org.hibernate.mapping.Table(PUBLIC.BASIC)'. Same name
where generated for 'org.hibernate.mapping.Table(PUBLIC.BASIC)'
at 
org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:168)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at 
org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at 
org.hibernate.tool.JDBCMetaDataBinderTestCase.setUp(JDBCMetaDataBinderTestCase.java:137)

Any ideas?  I'm running Branch_3_2 with no local modifications.

Thanks,

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-30 Thread Mark Hobson

On 30/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

which db are you running against ?!


tools/etc/hibernate.properties is as per SVN, so hsqldb.

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-30 Thread Mark Hobson

On 30/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

..and you have the default_schema set to PUBLIC ?

This error should only occur if the database somehow is returning the same
table name twice (e.g. reverse engineering multiple schemas)


Adding default_schema=PUBLIC fixes a few, and then using
hibernate.connection.url=jdbc:hsqldb:. fixed some others.  The
majority of the remaining tests fail with:

Expected were higher, Last: {TABLE_SCHEM=PUBLIC, REMARKS=null,
TABLE_CAT=null, TABLE_NAME=Group, TABLE_TYPE=TABLE} expected:<0> but
was:<1>
junit.framework.ComparisonFailure: Expected were higher, Last:
{TABLE_SCHEM=PUBLIC, REMARKS=null, TABLE_CAT=null, TABLE_NAME=Group,
TABLE_TYPE=TABLE} expected:<0> but was:<1>

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-30 Thread Mark Hobson

On 30/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

These errors occur because the db still contains some tables which should
not be the case.

This can be caused by interrupting the testsuite before it can clean up or
a test that doesn't cleanup properly.

Workaround: delete the db (easy for hsqldb ;)


Hmm, tried this, tried in-memory db, still failing..  I'm simply
running ant clean junit from within HibernateExt/tools, Hibernate3 and
HibernateExt freshly checked-out from Branch_3_2, and hibernate-3.2
sibling dir created from Hibernate3 ant dist.  I'm going to have to
move onto patching now, but any ideas welcome..

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc with inner-classes

2006-10-31 Thread Mark Hobson

On 30/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

ok, submit a patch and i can run the testsuite for it.

I'll see if something stupid is broken in the ant junit testsuite.

running it from eclipse creates no unknown failures on my side.


Your hibernate.properties commit seems to have helped along with
deleting testdb.  The tests which are failing now (aside from the
expected ones and the Oracle-specific ones) are:

* org.hibernate.tool.ant.HibernateToolTest.testJPAPUnit:

Error: Problems in creating a configuration for JPA. Have you
remembered to add hibernate EntityManager jars to the classpath ?

* org.hibernate.tool.hbm2x.Hbm2JavaEjb3ForJDK50Test.*:

Error: The database is already in use by another process:
[EMAIL PROTECTED] =C:\Documents and
Settings\mark\My
Documents\projects\oss\HibernateExt\tools\toolstestoutput\testdb\hsqldb.lck,
exists=true, locked=false, valid=false, fl =null]:
java.lang.Exception: The process cannot access the file because
another process has locked a portion of the file : C:\Documents and
Settings\mark\My
Documents\projects\oss\HibernateExt\tools\toolstestoutput\testdb\hsqldb.lck

* org.hibernate.tool.hbm2x.XMLPrettyPrinterTest.testCloseTag:

Failure: expected:<.../...> but was:<...>

* org.hibernate.tool.stat.StatisticsBrowserTest.testBrowser:

Error: Could not instantiate cache implementation

Are these known issues?

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] hbm2doc changes

2007-01-17 Thread Mark Hobson

Hi all,

I've had an almost finished patch to hbm2doc lying around here that I
was about to submit before I had to stop working on Hibernate Tools.
Before I commit it, I just wanted to allow people to comment if they
have any objections to the changes.

I've tried to clean up the entity property summary section and push
the entity mapping information down into property details.  This makes
the entity documentation cleaner for people who, for example, are
writing reports:

Before: http://codehaus.org/~mark/hbx/old/
After: http://codehaus.org/~mark/hbx/new/

Ultimately the column names will link to the table pages.  If there's
no objections then I'll do the same to ids & versions and commit the
changes.

I've got a bunch of further todos for hbm2doc that I haven't got time
to do right now, so I'll raise them as issues and hopefully get to
them in future.

Cheers,

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] hbm2doc changes

2007-01-18 Thread Mark Hobson

Hi Max,

On 18/01/07, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:

I like the new layout for the properties.

I would though prefer if the column(s) that the property is mapped to
would be shown in the overview too...


Cool, I'll see what it looks like with the columns added back in and
send a new link.


One problem I noticed is that the component docs' is actually
"problematic" since a component can/will be mapped
to different columns depending on the situation...and currently the
component docs just list the first found. Something to think about ;)


Yeah I noticed this - it's on my list of issues to raise.

Cheers,

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] CGLIB

2008-05-20 Thread Mark Hobson
2008/5/20 Emmanuel Bernard <[EMAIL PROTECTED]>:
> Maybe you can write a jarjarjar maven plugin ;)

Check the maven-shade-plugin for similar functionality:

http://maven.apache.org/plugins/maven-shade-plugin/index.html

Mark
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Mark Hobson
I've written a small utility library that provides methods to work
with Types, specifically it contains such a method isAssignable(Type
supertype, Type type) that should satisfy your requirements.

I've been considering open-sourcing it so would be happy to do so if
you were interested?

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
> Specifically a routine like
> boolean isSuperType(Type super, Type, sub);
> note Type, not Class
>
> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>
> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>
> Subtyping
>
> I am looking for an ASL 2 / BSD implementation of the subtyping resolution
> algorithm in Java.
>
> I am thinking Harmony might have one.
>
> Anybody knows?
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-29 Thread Mark Hobson
I haven't gone into supporting type variables, hence I don't perform
type capturing or inference yet, although I would be interested in
adding this.  For an example of what is currently implemented, the
following are from the tests:

Number <: Integer
Object <: Integer
List <: List
Collection <: List
Collection <: ArrayList
List !<: Set
List !<: List
List <: List
List <: List
List <: List
List !<: List
List <: List
List <: List
List !<: List
List <: IntegerArrayList

Let me know if you find any existing libraries since I use this in my
other projects.  If there's nothing out there then open-sourcing this
would stop people from having to reinvent the wheel.

Cheers,

Mark

2009/1/29 Emmanuel Bernard :
> If I can't find an other alternative that would surely be of help yes :)
>
> Do you know how much of the subtype rules you have implemented?
>
> The one that sounded non trivial to me were around detecting that generic
> are supertypes of others:
>  - containment and equivalence
>  - capture conversion
>  - intersection types
>  - management of bounds
> (using the language of the JSL)
>
>
> On  Jan 29, 2009, at 05:49, Mark Hobson wrote:
>
>> I've written a small utility library that provides methods to work
>> with Types, specifically it contains such a method isAssignable(Type
>> supertype, Type type) that should satisfy your requirements.
>>
>> I've been considering open-sourcing it so would be happy to do so if
>> you were interested?
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/29 Emmanuel Bernard :
>>>
>>> Specifically a routine like
>>> boolean isSuperType(Type super, Type, sub);
>>> note Type, not Class
>>>
>>> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>>>
>>>
>>> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>>>
>>> Subtyping
>>>
>>> I am looking for an ASL 2 / BSD implementation of the subtyping
>>> resolution
>>> algorithm in Java.
>>>
>>> I am thinking Harmony might have one.
>>>
>>> Anybody knows?
>>>
>>> ___
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>>
>>> ___
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-30 Thread Mark Hobson
ASL 2.0 is fine with me.  I was thinking about hosting it somewhere
like Google Code since there's a few open-source projects that I've
seen which could benefit from it.  Let me know, I can create a project
and you can give it a spin.

Cheers,

Mark

2009/1/30 Emmanuel Bernard :
> Cool, that's already a nice start.
> Let me see if I find something.
>
> Would you be OK to contribute it under the ASL 2.0 license to us?
>
> On  Jan 29, 2009, at 09:44, Mark Hobson wrote:
>
>> I haven't gone into supporting type variables, hence I don't perform
>> type capturing or inference yet, although I would be interested in
>> adding this.  For an example of what is currently implemented, the
>> following are from the tests:
>>
>> Number <: Integer
>> Object <: Integer
>> List <: List
>> Collection <: List
>> Collection <: ArrayList
>> List !<: Set
>> List !<: List
>> List <: List
>> List <: List
>> List <: List
>> List !<: List
>> List <: List
>> List <: List
>> List !<: List
>> List <: IntegerArrayList
>>
>> Let me know if you find any existing libraries since I use this in my
>> other projects.  If there's nothing out there then open-sourcing this
>> would stop people from having to reinvent the wheel.
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/29 Emmanuel Bernard :
>>>
>>> If I can't find an other alternative that would surely be of help yes :)
>>>
>>> Do you know how much of the subtype rules you have implemented?
>>>
>>> The one that sounded non trivial to me were around detecting that generic
>>> are supertypes of others:
>>> - containment and equivalence
>>> - capture conversion
>>> - intersection types
>>> - management of bounds
>>> (using the language of the JSL)
>>>
>>>
>>> On  Jan 29, 2009, at 05:49, Mark Hobson wrote:
>>>
>>>> I've written a small utility library that provides methods to work
>>>> with Types, specifically it contains such a method isAssignable(Type
>>>> supertype, Type type) that should satisfy your requirements.
>>>>
>>>> I've been considering open-sourcing it so would be happy to do so if
>>>> you were interested?
>>>>
>>>> Cheers,
>>>>
>>>> Mark
>>>>
>>>> 2009/1/29 Emmanuel Bernard :
>>>>>
>>>>> Specifically a routine like
>>>>> boolean isSuperType(Type super, Type, sub);
>>>>> note Type, not Class
>>>>>
>>>>> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>>>>>
>>>>>
>>>>>
>>>>> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>>>>>
>>>>> Subtyping
>>>>>
>>>>> I am looking for an ASL 2 / BSD implementation of the subtyping
>>>>> resolution
>>>>> algorithm in Java.
>>>>>
>>>>> I am thinking Harmony might have one.
>>>>>
>>>>> Anybody knows?
>>>>>
>>>>> ___
>>>>> hibernate-dev mailing list
>>>>> hibernate-dev@lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>
>>>>>
>>>>> ___
>>>>> hibernate-dev mailing list
>>>>> hibernate-dev@lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>
>>>>>
>>>
>>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-30 Thread Mark Hobson
Heh, how does anything run with that implementation?!

Mark

2009/1/30 Emmanuel Bernard :
> ahem
> excerpt from the Harmony code
>
> package java.lang;
>
> public final class Class implements Serializable, AnnotatedElement,
>GenericDeclaration, Type {
>[...]
>
>public boolean isAssignableFrom(Class cls) {
>return false;
> }
> }
>
> I don't think they have what I am looking for :)
>
>
> On  Jan 30, 2009, at 00:12, Emmanuel Bernard wrote:
>
>> Cool, that's already a nice start.
>> Let me see if I find something.
>>
>> Would you be OK to contribute it under the ASL 2.0 license to us?
>>
>> On  Jan 29, 2009, at 09:44, Mark Hobson wrote:
>>
>>> I haven't gone into supporting type variables, hence I don't perform
>>> type capturing or inference yet, although I would be interested in
>>> adding this.  For an example of what is currently implemented, the
>>> following are from the tests:
>>>
>>> Number <: Integer
>>> Object <: Integer
>>> List <: List
>>> Collection <: List
>>> Collection <: ArrayList
>>> List !<: Set
>>> List !<: List
>>> List <: List
>>> List <: List
>>> List <: List
>>> List !<: List
>>> List <: List
>>> List <: List
>>> List !<: List
>>> List <: IntegerArrayList
>>>
>>> Let me know if you find any existing libraries since I use this in my
>>> other projects.  If there's nothing out there then open-sourcing this
>>> would stop people from having to reinvent the wheel.
>>>
>>> Cheers,
>>>
>>> Mark
>>>
>>> 2009/1/29 Emmanuel Bernard :
>>>>
>>>> If I can't find an other alternative that would surely be of help yes :)
>>>>
>>>> Do you know how much of the subtype rules you have implemented?
>>>>
>>>> The one that sounded non trivial to me were around detecting that
>>>> generic
>>>> are supertypes of others:
>>>> - containment and equivalence
>>>> - capture conversion
>>>> - intersection types
>>>> - management of bounds
>>>> (using the language of the JSL)
>>>>
>>>>
>>>> On  Jan 29, 2009, at 05:49, Mark Hobson wrote:
>>>>
>>>>> I've written a small utility library that provides methods to work
>>>>> with Types, specifically it contains such a method isAssignable(Type
>>>>> supertype, Type type) that should satisfy your requirements.
>>>>>
>>>>> I've been considering open-sourcing it so would be happy to do so if
>>>>> you were interested?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Mark
>>>>>
>>>>> 2009/1/29 Emmanuel Bernard :
>>>>>>
>>>>>> Specifically a routine like
>>>>>> boolean isSuperType(Type super, Type, sub);
>>>>>> note Type, not Class
>>>>>>
>>>>>> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>>>>>>
>>>>>> Subtyping
>>>>>>
>>>>>> I am looking for an ASL 2 / BSD implementation of the subtyping
>>>>>> resolution
>>>>>> algorithm in Java.
>>>>>>
>>>>>> I am thinking Harmony might have one.
>>>>>>
>>>>>> Anybody knows?
>>>>>>
>>>>>> ___
>>>>>> hibernate-dev mailing list
>>>>>> hibernate-dev@lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>
>>>>>>
>>>>>> ___
>>>>>> hibernate-dev mailing list
>>>>>> hibernate-dev@lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>
>>>>>>
>>>>
>>>>
>>
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-01-30 Thread Mark Hobson
Cool, I'll aim to create the project as soon as I get a free moment.
Extra hands would be appreciated so I can't see a problem with giving
you commit access.  Copyright isn't an issue as I work for my own
company :)

I'll post the URL once it's up there.  Likely to be after the weekend
if that's alright?

Cheers,

Mark

2009/1/30 Emmanuel Bernard :
> That's fine, you can go host it on google-code under the ASL 2. That way we
> can use it as a source level or jar level dependency.
>
> It would be nice to get commit access so we can participate in enhancing the
> support coverage.
>
> Jboss.org might have some benefits as a forge but the .org team is very busy
> at the moment, so creating a new project would be a bit low in priority.
> Google code is quite nice and clean.
>
> BTW before dropping the code, make sure you have the copyright rights (if
> you developed that for a company, you might have to ask them).
>
> Thanks!
>
> Emmanuel
>
> On  Jan 30, 2009, at 05:04, Mark Hobson wrote:
>
>> ASL 2.0 is fine with me.  I was thinking about hosting it somewhere
>> like Google Code since there's a few open-source projects that I've
>> seen which could benefit from it.  Let me know, I can create a project
>> and you can give it a spin.
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/30 Emmanuel Bernard :
>>>
>>> Cool, that's already a nice start.
>>> Let me see if I find something.
>>>
>>> Would you be OK to contribute it under the ASL 2.0 license to us?
>>>
>>> On  Jan 29, 2009, at 09:44, Mark Hobson wrote:
>>>
>>>> I haven't gone into supporting type variables, hence I don't perform
>>>> type capturing or inference yet, although I would be interested in
>>>> adding this.  For an example of what is currently implemented, the
>>>> following are from the tests:
>>>>
>>>> Number <: Integer
>>>> Object <: Integer
>>>> List <: List
>>>> Collection <: List
>>>> Collection <: ArrayList
>>>> List !<: Set
>>>> List !<: List
>>>> List <: List
>>>> List <: List
>>>> List <: List
>>>> List !<: List
>>>> List <: List
>>>> List <: List
>>>> List !<: List
>>>> List <: IntegerArrayList
>>>>
>>>> Let me know if you find any existing libraries since I use this in my
>>>> other projects.  If there's nothing out there then open-sourcing this
>>>> would stop people from having to reinvent the wheel.
>>>>
>>>> Cheers,
>>>>
>>>> Mark
>>>>
>>>> 2009/1/29 Emmanuel Bernard :
>>>>>
>>>>> If I can't find an other alternative that would surely be of help yes
>>>>> :)
>>>>>
>>>>> Do you know how much of the subtype rules you have implemented?
>>>>>
>>>>> The one that sounded non trivial to me were around detecting that
>>>>> generic
>>>>> are supertypes of others:
>>>>> - containment and equivalence
>>>>> - capture conversion
>>>>> - intersection types
>>>>> - management of bounds
>>>>> (using the language of the JSL)
>>>>>
>>>>>
>>>>> On  Jan 29, 2009, at 05:49, Mark Hobson wrote:
>>>>>
>>>>>> I've written a small utility library that provides methods to work
>>>>>> with Types, specifically it contains such a method isAssignable(Type
>>>>>> supertype, Type type) that should satisfy your requirements.
>>>>>>
>>>>>> I've been considering open-sourcing it so would be happy to do so if
>>>>>> you were interested?
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Mark
>>>>>>
>>>>>> 2009/1/29 Emmanuel Bernard :
>>>>>>>
>>>>>>> Specifically a routine like
>>>>>>> boolean isSuperType(Type super, Type, sub);
>>>>>>> note Type, not Class
>>>>>>>
>>>>>>> On  Jan 28, 2009, at 21:22, Emmanuel Bernard wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10
>>>>>>>
>>>>>>> Subtyping
>>>>>>>
>>>>>>> I am looking for an ASL 2 / BSD implementation of the subtyping
>>>>>>> resolution
>>>>>>> algorithm in Java.
>>>>>>>
>>>>>>> I am thinking Harmony might have one.
>>>>>>>
>>>>>>> Anybody knows?
>>>>>>>
>>>>>>> ___
>>>>>>> hibernate-dev mailing list
>>>>>>> hibernate-dev@lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>>
>>>>>>>
>>>>>>> ___
>>>>>>> hibernate-dev mailing list
>>>>>>> hibernate-dev@lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-02-02 Thread Mark Hobson
Okay, I've created the project here:

http://code.google.com/p/jtype/

The method you're after is TypeUtils.isAssignable.  I'm interested in
fleshing out this library in future, keeping the focus on pure type
operations.  I'd like to implement full type inference and type
capturing in line with the JLS as I've had a requirement for this in
the past.  Do let me know if you have any comments or suggestions.

Cheers,

Mark

2009/1/30 Emmanuel Bernard :
> all good.
>
> On  Jan 30, 2009, at 09:46, Mark Hobson wrote:
>
>> Cool, I'll aim to create the project as soon as I get a free moment.
>> Extra hands would be appreciated so I can't see a problem with giving
>> you commit access.  Copyright isn't an issue as I work for my own
>> company :)
>>
>> I'll post the URL once it's up there.  Likely to be after the weekend
>> if that's alright?
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/30 Emmanuel Bernard :
>>>
>>> That's fine, you can go host it on google-code under the ASL 2. That way
>>> we
>>> can use it as a source level or jar level dependency.
>>>
>>> It would be nice to get commit access so we can participate in enhancing
>>> the
>>> support coverage.
>>>
>>> Jboss.org might have some benefits as a forge but the .org team is very
>>> busy
>>> at the moment, so creating a new project would be a bit low in priority.
>>> Google code is quite nice and clean.
>>>
>>> BTW before dropping the code, make sure you have the copyright rights (if
>>> you developed that for a company, you might have to ask them).
>>>
>>> Thanks!
>>>
>>> Emmanuel
>>>
>>> On  Jan 30, 2009, at 05:04, Mark Hobson wrote:
>>>
>>>> ASL 2.0 is fine with me.  I was thinking about hosting it somewhere
>>>> like Google Code since there's a few open-source projects that I've
>>>> seen which could benefit from it.  Let me know, I can create a project
>>>> and you can give it a spin.
>>>>
>>>> Cheers,
>>>>
>>>> Mark
>>>>
>>>> 2009/1/30 Emmanuel Bernard :
>>>>>
>>>>> Cool, that's already a nice start.
>>>>> Let me see if I find something.
>>>>>
>>>>> Would you be OK to contribute it under the ASL 2.0 license to us?
>>>>>
>>>>> On  Jan 29, 2009, at 09:44, Mark Hobson wrote:
>>>>>
>>>>>> I haven't gone into supporting type variables, hence I don't perform
>>>>>> type capturing or inference yet, although I would be interested in
>>>>>> adding this.  For an example of what is currently implemented, the
>>>>>> following are from the tests:
>>>>>>
>>>>>> Number <: Integer
>>>>>> Object <: Integer
>>>>>> List <: List
>>>>>> Collection <: List
>>>>>> Collection <: ArrayList
>>>>>> List !<: Set
>>>>>> List !<: List
>>>>>> List <: List
>>>>>> List <: List
>>>>>> List <: List
>>>>>> List !<: List
>>>>>> List <: List
>>>>>> List <: List
>>>>>> List !<: List
>>>>>> List <: IntegerArrayList
>>>>>>
>>>>>> Let me know if you find any existing libraries since I use this in my
>>>>>> other projects.  If there's nothing out there then open-sourcing this
>>>>>> would stop people from having to reinvent the wheel.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Mark
>>>>>>
>>>>>> 2009/1/29 Emmanuel Bernard :
>>>>>>>
>>>>>>> If I can't find an other alternative that would surely be of help yes
>>>>>>> :)
>>>>>>>
>>>>>>> Do you know how much of the subtype rules you have implemented?
>>>>>>>
>>>>>>> The one that sounded non trivial to me were around detecting that
>>>>>>> generic
>>>>>>> are supertypes of others:
>>>>>>> - containment and equivalence
>>>>>>> - capture conversion
>>>>>>> - intersection types
>>>>>>> - managemen

Re: [hibernate-dev] Do you know of any ASL 2 implementation of...

2009-02-03 Thread Mark Hobson
Excellent, let me know how you get on.

Mark

2009/2/3 Emmanuel Bernard :
> Cool :)
> We will add jType to the Bean Validation RI Alpha2 (one release after the
> first).
> http://opensource.atlassian.com/projects/hibernate/browse/BVAL-111
>
> On  Feb 2, 2009, at 23:40, Mark Hobson wrote:
>
>> Okay, I've created the project here:
>>
>> http://code.google.com/p/jtype/
>>
>> The method you're after is TypeUtils.isAssignable.  I'm interested in
>> fleshing out this library in future, keeping the focus on pure type
>> operations.  I'd like to implement full type inference and type
>> capturing in line with the JLS as I've had a requirement for this in
>> the past.  Do let me know if you have any comments or suggestions.
>>
>> Cheers,
>>
>> Mark
>>
>> 2009/1/30 Emmanuel Bernard :
>>>
>>> all good.
>>>
>>> On  Jan 30, 2009, at 09:46, Mark Hobson wrote:
>>>
>>>> Cool, I'll aim to create the project as soon as I get a free moment.
>>>> Extra hands would be appreciated so I can't see a problem with giving
>>>> you commit access.  Copyright isn't an issue as I work for my own
>>>> company :)
>>>>
>>>> I'll post the URL once it's up there.  Likely to be after the weekend
>>>> if that's alright?
>>>>
>>>> Cheers,
>>>>
>>>> Mark
>>>>
>>>> 2009/1/30 Emmanuel Bernard :
>>>>>
>>>>> That's fine, you can go host it on google-code under the ASL 2. That
>>>>> way
>>>>> we
>>>>> can use it as a source level or jar level dependency.
>>>>>
>>>>> It would be nice to get commit access so we can participate in
>>>>> enhancing
>>>>> the
>>>>> support coverage.
>>>>>
>>>>> Jboss.org might have some benefits as a forge but the .org team is very
>>>>> busy
>>>>> at the moment, so creating a new project would be a bit low in
>>>>> priority.
>>>>> Google code is quite nice and clean.
>>>>>
>>>>> BTW before dropping the code, make sure you have the copyright rights
>>>>> (if
>>>>> you developed that for a company, you might have to ask them).
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Emmanuel
>>>>>
>>>>> On  Jan 30, 2009, at 05:04, Mark Hobson wrote:
>>>>>
>>>>>> ASL 2.0 is fine with me.  I was thinking about hosting it somewhere
>>>>>> like Google Code since there's a few open-source projects that I've
>>>>>> seen which could benefit from it.  Let me know, I can create a project
>>>>>> and you can give it a spin.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Mark
>>>>>>
>>>>>> 2009/1/30 Emmanuel Bernard :
>>>>>>>
>>>>>>> Cool, that's already a nice start.
>>>>>>> Let me see if I find something.
>>>>>>>
>>>>>>> Would you be OK to contribute it under the ASL 2.0 license to us?
>>>>>>>
>>>>>>> On  Jan 29, 2009, at 09:44, Mark Hobson wrote:
>>>>>>>
>>>>>>>> I haven't gone into supporting type variables, hence I don't perform
>>>>>>>> type capturing or inference yet, although I would be interested in
>>>>>>>> adding this.  For an example of what is currently implemented, the
>>>>>>>> following are from the tests:
>>>>>>>>
>>>>>>>> Number <: Integer
>>>>>>>> Object <: Integer
>>>>>>>> List <: List
>>>>>>>> Collection <: List
>>>>>>>> Collection <: ArrayList
>>>>>>>> List !<: Set
>>>>>>>> List !<: List
>>>>>>>> List <: List
>>>>>>>> List <: List
>>>>>>>> List <: List
>>>>>>>> List !<: List
>>>>>>>> List <: List
>>>>>>>> List <: List
>>>>>>>> List !<: List
>>>>>>>