From: <hei...@us...> - 2008-07-26 11:27:06
|
Revision: 1449 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=1449&view=rev Author: heikkidoeleman Date: 2008-07-26 11:27:15 +0000 (Sat, 26 Jul 2008) Log Message: ----------- Support for RegistryPackage Modified Paths: -------------- sandbox/3.0.x/src/main/config/ebxml-jibx-binding.xml sandbox/3.0.x/src/org/geonetwork/ebxml/informationmodel/core/RegistryPackage.java Modified: sandbox/3.0.x/src/main/config/ebxml-jibx-binding.xml =================================================================== --- sandbox/3.0.x/src/main/config/ebxml-jibx-binding.xml 2008-07-26 10:39:47 UTC (rev 1448) +++ sandbox/3.0.x/src/main/config/ebxml-jibx-binding.xml 2008-07-26 11:27:15 UTC (rev 1449) @@ -57,7 +57,7 @@ <value style="attribute" name="createReplica" field="createReplica" usage="optional" /> </mapping> - <mapping type-name="RegistryObjectExtension" class="org.geonetwork.ebxml.informationmodel.core.RegistryObject" extends="org.geonetwork.ebxml.informationmodel.core.Identifiable" abstract="true"> + <mapping type-name="RegistryObjectExtension" class="org.geonetwork.ebxml.informationmodel.core.RegistryObject" abstract="true"> <structure map-as="org.geonetwork.ebxml.informationmodel.core.Identifiable" /> <structure name="Name" field="name" usage="optional"> <collection field="localizedStrings" factory="org.geonetwork.ebxml.informationmodel.core.datatype.InternationalString.localizedStringSetFactory" /> @@ -74,7 +74,7 @@ <value style="attribute" name="status" field="status" usage="optional" /> </mapping> - <mapping name="RegistryObject" class="org.geonetwork.ebxml.informationmodel.core.RegistryObject"> + <mapping name="RegistryObject" class="org.geonetwork.ebxml.informationmodel.core.RegistryObject" extends="org.geonetwork.ebxml.informationmodel.core.Identifiable"> <structure map-as="RegistryObjectExtension" /> </mapping> @@ -94,7 +94,7 @@ <structure map-as="RegistryObjectExtension" /> <value style="attribute" name="isOpaque" field="isOpaque" usage="optional" /> <value style="attribute" name="mimeType" field="mimeType" usage="optional" /> - <structure name="ContentVersionInfo" field="contentVersionInfo" class="org.geonetwork.ebxml.informationmodel.core.VersionInfo" usage="optional"> + <structure name="ContentVersionInfo" field="contentVersionInfo" usage="optional"> <value style="attribute" name="versionName" field="versionName" usage="optional" /> <value style="attribute" name="comment" field="comment" usage="optional" /> </structure> @@ -102,6 +102,11 @@ <mapping name="RegistryPackage" class="org.geonetwork.ebxml.informationmodel.core.RegistryPackage" extends="org.geonetwork.ebxml.informationmodel.core.RegistryObject"> <structure map-as="RegistryObjectExtension" /> + <structure name="RegistryObjectList" usage="optional"> + <collection field="registryObjectList" factory="org.geonetwork.ebxml.informationmodel.core.RegistryPackage.registryObjectSetFactory"> + <structure type="org.geonetwork.ebxml.informationmodel.core.Identifiable" usage="optional" /> + </collection> + </structure> </mapping> <mapping name="VersionInfo" class="org.geonetwork.ebxml.informationmodel.core.VersionInfo"> Modified: sandbox/3.0.x/src/org/geonetwork/ebxml/informationmodel/core/RegistryPackage.java =================================================================== --- sandbox/3.0.x/src/org/geonetwork/ebxml/informationmodel/core/RegistryPackage.java 2008-07-26 10:39:47 UTC (rev 1448) +++ sandbox/3.0.x/src/org/geonetwork/ebxml/informationmodel/core/RegistryPackage.java 2008-07-26 11:27:15 UTC (rev 1449) @@ -21,6 +21,9 @@ package org.geonetwork.ebxml.informationmodel.core; +import java.util.HashSet; +import java.util.Set; + /** * * @author Heikki Doeleman @@ -28,5 +31,52 @@ */ public class RegistryPackage extends RegistryObject { + /** + * For Jixb binding. + * @return + */ + @SuppressWarnings("unused") + private static Set<Identifiable> registryObjectSetFactory() { + return new HashSet<Identifiable>(); + } + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime + * result + + ((registryObjectList == null) ? 0 : registryObjectList + .hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + RegistryPackage other = (RegistryPackage) obj; + if (registryObjectList == null) { + if (other.registryObjectList != null) + return false; + } else if (!registryObjectList.equals(other.registryObjectList)) + return false; + return true; + } + + protected Set<Identifiable> registryObjectList; + + public Set<Identifiable> getRegistryObjectList() { + return registryObjectList; + } + + public void setRegistryObjectList(Set<Identifiable> registryObjectList) { + this.registryObjectList = registryObjectList; + } + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |