1 // Licensed to the Apache Software Foundation (ASF) under one or more contributor 2 // license agreements. See the NOTICE.txt file distributed with this work for 3 // additional information regarding copyright ownership. The ASF licenses this 4 // file to you under the Apache License, Version 2.0 (the "License"); you may not 5 // use this file except in compliance with the License. You may obtain a copy of 6 // the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 // License for the specific language governing permissions and limitations under 14 // the License. 15 16 package org.apache.oodt.commons.util; 17 18 import java.io.*; 19 import java.util.*; 20 import org.w3c.dom.*; 21 22 /** A documentable object. 23 * 24 * An object that exhibits this interface can be documented, in XML, as a DOM node. 25 * 26 * @author Kelly. 27 */ 28 public interface Documentable { 29 /** Document (aka serialize) this object into an XML DOM node. 30 * 31 * @param doc What document will own the node. 32 * @return This object as an XML DOM node. 33 * @throws DOMException If an error occurs while creating the DOM structure. 34 */ 35 Node toXML(Document doc) throws DOMException; 36 }