==== This work was created by participants in the DataONE project, and is jointly copyrighted by participating institutions in DataONE. For more information on DataONE, see our web site at http://dataone.org. Copyright ${year} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==== ------------------------ ------------------------ DataONE Service API Java ------------------------ ------------------------ Generated Domain Objects ------------------------ Domain objects for the dataone project should be, as much as is reasonable, maintained via xml schema. The objects themselves will be generated from the schema definitions in order to render any serialized output via an open source marshallalling technology. The current implementation only supports JibX, however, further abstraction should allow development of a domain interface architecture such that any marshaller could be supported, assuming the generated classes could commit to and apply interface specifications. The domain objects are contained in the org.dataone.service.types package. The Jibx generation is controlled by a mixture of JibX and Ant tasks. The first task will download the schema files from the svn repository and then change the import definitions to point to the directories in which they are housed on the local system instead of the https location. The change is necessary because JibX appears to assume that classes generated from the local system's common.xsd are different versions from the common.xsd found via svn https location. Through an ant task, JibX codegen is called on the downloaded files to produce class files and binding definitions. The binding definitions are stored in the top level directory while the classes are saved to org.dataone.service.types. Next, the class files are modified to use different getter/setter and list methods than the default generated by JibX. The default namespace prefixes are altered to be 'd1' while the ObjectFormat types are translated to something more readable by a developer. Only after all the alterations are complete will the bindings compile successfully by the bind-jibx process.