Hey everybody, I'm part of the student team in vienna, working on the code generator jdo extensions. Currently I'm working on issue 2365 (Parse an annotated schema). My intention is to bring up a discussion about the parse approach of application specific Schema annotations.
The first approach is to unmarshall a Schema using the SchemaUnmarshaller as it is right now. After unmarshalling the Schema, the annotations (AnyNodes) will be automatically unmarshalled and processed (transfered into ClassInfo and FieldInfo instances) in the SourceGenerator. The second approach is to extend the AppInfoUnmarshaller and forward SAX-events to an automatically unmarshaller. When endElement reached, the AppInfoUnmarshaller would stick parsed information to the parent element (=AppInfo). Please hold in mind that: The first approach: - does not need information in the SchemaUnmarshaller about what kind of app-specific annotations to parse - is more extendable using processing classes (e.g. NatureProducer) - allows validation (annotations can not be validated comprehensively) - needs to be replaced if the SchemaUnmarshaller is replaced by an automatical unmarshaller (assumed that annotations will also be unmarshalled?) - uses the existing AnyNode unmarshalling method The second approach: - needs information about what to parse "deep down" in the AppInfoUnmarshaller (e.g. jdo namespace) - is a mixup between manual and automatical unmarshalling - needs app-specific java fields added to the various unmarshalled classes (Schema, ComplexType, tbc.) I would be pleased if you could tell me what you think. Yours, Lukas --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email