001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019 020 // 021 // This source code implements specifications defined by the Java 022 // Community Process. In order to remain compliant with the specification 023 // DO NOT add / change / or delete method signatures! 024 // 025 026 package javax.enterprise.deploy.model; 027 028 import javax.enterprise.deploy.shared.ModuleType; 029 030 /** 031 * An interface that represents the root of a standard deployment descriptor. 032 * A DDBeanRoot is a type of DDBean. 033 * 034 * @version $Rev: 467553 $ $Date: 2006-10-25 06:01:51 +0200 (Mi, 25. Okt 2006) $ 035 */ 036 public interface DDBeanRoot extends DDBean { 037 /** 038 * Return the ModuleType of deployment descriptor. 039 * 040 * @return The ModuleType of deployment descriptor 041 */ 042 public ModuleType getType(); 043 044 /** 045 * Return the containing DeployableObject 046 * 047 * @return The DeployableObject that contains this deployment descriptor 048 */ 049 public DeployableObject getDeployableObject(); 050 051 /** 052 * A convenience method to return the DTD version number. The DeployableObject has this information. 053 * 054 * Note: the method getDDBeanRootVersion() is preferred to this method. 055 * @see #getDDBeanRootVersion 056 * 057 * @return a string containing the DTD version number 058 */ 059 public String getModuleDTDVersion(); 060 061 /** 062 * A convenience method to return the version number of an 063 * XML instance document. This method is replacing the 064 * method DeployableObject.getModuleDTDVersion, because 065 * it returns the version number of any J2EE XML instance document 066 * 067 * @return <p>a string that is the version number of the XML instance document. 068 * Null is returned if no version number can be found.</p> 069 * <p>A module's deployment descriptor file always contains 070 * a document type identifier, DOCTYPE. The DOCTYPE statement 071 * contains the module DTD version number in the label of the 072 * statement.</p> 073 * <p>The format of the DOCTYPE statement is:</p> 074 * <pre><!DOCTYPE root_element PUBLIC "-//organization//label//language" "location"></pre> 075 * <dl> 076 * <dt>root_element</dt><dd>is the name of the root document in the DTD.</dd> 077 * <dt>organization</dt><dd>is the name of the organization responsible 078 * for the creation and maintenance of the DTD 079 * being referenced.</dd> 080 * <dt>label</dt><dd>is a unique descriptive name for the public text being 081 * referenced. </dd> 082 * <dt>language</dt><dd>is the ISO 639 language id representing the natural 083 * language encoding of th DTD.</dd> 084 * <dt>location</dt><dd>is the URL of the DTD.</dd> 085 * </dl> 086 * <p>An example J2EE deployment descriptor DOCTYPE statement is:</p> 087 * <pre><!DOCTYPE application-client PUBLIC 088 * "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" 089 * "http://java.sun.com/dtd/application-client_1_3.dtd"></pre> 090 * <p>In this example the label is, "DTD J2EE Application Client 1.3", 091 * and the DTD version number is 1.3. A call to getModuleDTDVersion 092 * would return a string containing, "1.3".</p> 093 */ 094 public String getDDBeanRootVersion(); 095 096 /** 097 * Return the XPath for this standard bean. The root XPath is "/". 098 * 099 * @return "/" this is the root standard bean. 100 */ 101 public String getXpath(); 102 103 /** 104 * Returns the filename relative to the root of the module of the XML instance document this 105 * DDBeanRoot represents. 106 * 107 * @since 1.1 108 * 109 * @return String the filename relative to the root of the module 110 */ 111 public String getFilename(); 112 }