[castor-dev] Ignore extra elements when Unmarshalling bug??

2004-03-15 Thread robertlaferla
I am trying to parse a file that may have additional elements that are unforeseen. I do not need to parse those elements. Therefore, I tried telling the unmarshaller to ignore extra elements. It does not seem to work. Here's the exception: org.xml.sax.SAXException: unable to find FieldDesc

Re: [castor-dev] how to generate source code using multiple xsd files using ant task?

2004-02-23 Thread robertlaferla
Just repeat the section for the 2nd schema but change the xsd name and possibly the package name if it is different. If you are importing one schema into another, you can just generate the main schema and add the option "generateImportedSchemas" to the SourceGenerator. Robert > > Hello, guy

[castor-dev] class name generation conflict warning

2004-02-11 Thread robertlaferla
Will this be removed in the next release of Castor (later this week) ? Or does someone have a patch? This silly warning breaks automated builds. Is there a way to override it without overriding other warnings? Warning: A class name generation conflict has occured between simpleType 'myType'

[castor-dev] Importing/exporting parts of object graphs as reusuable templates

2004-02-05 Thread robertlaferla
I have an interesting problem that perhaps some of you have dealt with before. I need to export parts of my document (an object graph) out as "template" XML instances so that they can later be imported (perhaps multiple times) into another document. The problem is that I need to regenerate/rewi

Re: [castor-dev] Cloneable objects?

2004-02-04 Thread robertlaferla
I found this method (i modified it slightly) on the mailing list archive. Is there any built-in support in SourceGenerator or do I have to use this: public static Object clone(Object obj) throws java.io.IOException, java.lang.ClassNotFoundException { Object clonedObj = null;

[castor-dev] Cloneable objects?

2004-02-04 Thread robertlaferla
I know that this question has been asked before but I didn't see an answer. I need to make a deep copy of a Castor object graph/tree. What's the easiest way to do this??? Thanks, Robert --- If you wish to unsubscribe from this mailing, s

Re: [castor-dev] SourceGenerator fails to generate imports

2004-01-23 Thread robertlaferla
See my other message about CVS not compiling again. I am not using the latest but I am using a CVS version from 1-2 weeks ago. > Hi Robert, > > Have you tried the CVS version of Castor? > > Arnaud > > > > This message is intended only for the use of the Addressee and may contain > informatio

[castor-dev] SourceGenerator fails to generate imports

2004-01-23 Thread robertlaferla
I recently moved part of my schema into a second file because it contained types that another group uses. My main schema imports the other group's schema as well as the W3C xlink schema. It worked fine with just xlink but when I created the othergroup.xsd, I ran into compile errors: One of th

[castor-dev] Castor CVS build problem?

2004-01-23 Thread robertlaferla
BUILD FAILED file:/Users/developer/Source/Tools/castor/src/build.xml:297: java.lang.ClassNotFoundException: org.exolab.adaptx.util.JakartaAntAdapter --- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a sub

[castor-dev] Strongly typed IDREF?

2004-01-19 Thread robertlaferla
I have a class Employee that has a reference to the Company that he/she belongs to. I want it to be a reference so I am using IDREF. The SourceGenerator generates a set/get methods on the Employee class for setting/getting the Company but takes an Object as an argument. i.e. void setCompany(

Re: [castor-dev] Re: Enumerated Types and Underscore Character

2004-01-12 Thread robertlaferla
It appears that the patch was never added to the CVS source. If so, why not? > Hi Robert, > > Two things: > > 1) I think the INTEGER case is already handled -- if the value parses to an int, > the enumerated value will be VALUE_{int}. > > 2) An enhancement request would be the right way to go.

[castor-dev] Re: Enumerated Types and Underscore Character

2004-01-12 Thread robertlaferla
Just a follow up msg to let everyone know that I resolved this problem. It turns out that the underscores was not the problem (at least with the CVS version of Castor - it may still be a problem with the 0.9.5.2 release though) It was a problem with hyphens and numbers in the enums in my schem

[castor-dev] Class name generation conflict between simpleType and element?

2004-01-12 Thread robertlaferla
When I run the SourceGenerator against my schema, I am getting the following warning. Why is it generating this warning? Bug in my schema or bug in SourceGenerator? Warning: A class name generation conflict has occured between simpleType 'statusType' and element 'statusType'. Please use a Bin

Re: [castor-dev] Slow mailinglist

2004-01-08 Thread robertlaferla
Yes. I reported this too a while back. Look at the archives for the response. > Does anyone then me experience that the mail uses a long time to get > through (like 4-5 hours)? > > Stein > > --- > If you wish to unsubscribe from this mai

[castor-dev] Castor CVS...

2003-12-19 Thread robertlaferla
I built Castor using the CVS source and tried using it despite all the warnings/deprecated API, etc... I was hoping that there was a fix for the SourceGenerator problem where it generates VALUE_0, VALUE_0_TYPE, etc. for any enumerations that have values with an underscore "_" character in them

[castor-dev] Can anyone build Castor from CVS?

2003-12-19 Thread robertlaferla
When I try to build Castor using "build.sh all", I see lots of deprecated API and assert warnings. Also, what version of Xerces does Castor use? Is it included in the source or do you have to install it separately? Thanks, Robert [javac] Note: Some input files use or override a deprecate

[castor-dev] Castor and CDATA?

2003-11-29 Thread robertlaferla
Does Castor support CDATA? e.g. SourceGenerator is throwing this exception: Exception in thread "main" java.lang.IllegalArgumentException: getSimpleType: the simple type 'CDATA' is not a built-in type as defined in XML Schema specification. at org.exolab.castor.xml.schema.Schema.get

Re: [castor-dev] Separate SourceGenerator packages for Class Descriptors

2003-11-17 Thread robertlaferla
I added a feature request for this including an idea for the implementation. If you have a package called com.mycompany.myproject that you specified using the -package option, SourceGenerator would put all enumerated types in com.mycompany.myproject.types, all descriptors in com.mycompany.myproj

[castor-dev] Separate SourceGenerator packages for Class Descriptors and Subclasses

2003-11-14 Thread robertlaferla
I would like to put the class descriptor classes in their own package so they don't clutter the documentation. The same for subclasses (MyClass vs. MyClassType) How can I do this with SourceGenerator? Or is this a feature request? --- I

[castor-dev] Key generation for XML-only

2003-11-14 Thread robertlaferla
I am writing an application that reads/writes XML. The app does not use JDO nor does it read/write to a database. However, I need to generate primary keys for some of the objects that have "xsd:ID" fields. The schema uses xlink because objects in one document type may refer to objects in a se

[castor-dev] Shallow/Deep Instantiation

2003-10-30 Thread robertlaferla
I am writing an application that stores it's data to an XML file. I have been using Castor to develop it and it is simply a wonderful framework and tool. The data that my app uses is well structured and is represented by an object graph. The root object is called "History" which contains many

[castor-dev] Automatic instantiation of relationship objects?

2003-10-24 Thread robertlaferla
I have a class called History that has 1 or more Event objects. In the xsd, it is defined as: When I instantiate a new History instance, I would expect that the event array would contain one new Event instance because minOccurs="1". If I had set minOccurs="2", I would expect it to inst

Re: [castor-dev] SourceGenerator @throws Javadoc comment

2003-09-26 Thread robertlaferla
That would be helpful even for that one because it is common. Currently, the exception is displayed as a param which is not correct. > > Hi Robert, > > I don't believe it's implemented yet, but it should be a pretty easy > change. I think there are only a few areas that SourceGenerator would > a

[castor-dev] Why does SourceGenerator generate two classes for each element?

2003-09-26 Thread robertlaferla
When I generate source code using the SourceGenerator, I get TWO classes for the extraData element: ExtraData and ExtraDataType ExtraData is a subclass of ExtraDataType. Why is it generating two classes instead of just one? There doesn't seem to be any reason. ExtraData doesn't have any new me

[castor-dev] SourceGenerator @throws Javadoc comment

2003-09-26 Thread robertlaferla
Is there a way to make the SourceGenerator generate a @throws Javadoc comment for exceptions? Or has this not been implemented yet? --- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of:

[castor-dev] Key generation for XML only (not using JDO)

2003-09-24 Thread robertlaferla
I have a project that doesn't use JDO but needs keys generated. I see support for automatic key generation if you use JDO but is there any support if you are not using JDO? I need keys for objects that will be xlinked and internal objects (ID/IDREF). -

[castor-dev] Re: Marshaller output

2003-09-24 Thread robertlaferla
Never mind. I found the castor.properties file and the option to enable indent. > We are considering using Castor for a project. However, I need the Marshaller > to generate human > readable output (indented, newlines, etc..) I think this is a feature request > but perhaps someone > can recom

[castor-dev] Marshaller output

2003-09-24 Thread robertlaferla
We are considering using Castor for a project. However, I need the Marshaller to generate human readable output (indented, newlines, etc..) I think this is a feature request but perhaps someone can recommended a way of doing it. I am looking for functionality similar to JDOM's XMLOutputer cl