vgritsenko 2003/08/13 11:53:50
Modified: java/src/org/apache/xindice/core/meta MetaData.java Log: New method to copy only user modifiable data Revision Changes Path 1.12 +12 -3 xml-xindice/java/src/org/apache/xindice/core/meta/MetaData.java Index: MetaData.java =================================================================== RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/core/meta/MetaData.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- MetaData.java 9 Aug 2003 21:19:54 -0000 1.11 +++ MetaData.java 13 Aug 2003 18:53:50 -0000 1.12 @@ -136,6 +136,7 @@ private Hashtable attrs = null; private Document custom = null; + public MetaData() { } @@ -393,6 +394,14 @@ this.modified = meta.getLastModifiedTime(); this.owner = meta.getOwner(); this.type = meta.getType(); + copyDataFrom(meta); + } + + /** + * Copies only user data (link, attributes, custom document) from another meta data + * @param meta the meta to copy from + */ + public void copyDataFrom(final MetaData meta) { this.link = meta.getLinkTargetURI(); this.attrs = null; for (Enumeration e = meta.getAttributeKeys(); e.hasMoreElements();) { @@ -403,8 +412,8 @@ } this.attrs.put(key, value); } - this.custom = null; + this.custom = null; Document doc = meta.getCustomDocument(); if (null != doc) { this.custom = new DocumentImpl();