You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2002/11/30 18:30:37 UTC

cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/metadata RepositoryTags.java

thma        2002/11/30 09:30:37

  Modified:    src/java/org/apache/ojb/broker/metadata RepositoryTags.java
  Log:
  add accept locks attribute to class-descriptor
  
  Revision  Changes    Path
  1.16      +276 -275  jakarta-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java
  
  Index: RepositoryTags.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- RepositoryTags.java	21 Nov 2002 22:54:25 -0000	1.15
  +++ RepositoryTags.java	30 Nov 2002 17:30:37 -0000	1.16
  @@ -1,275 +1,276 @@
  -package org.apache.ojb.broker.metadata;
  -
  -/* ====================================================================
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer.
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  - * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:
  - *       "This product includes software developed by the
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software itself,
  - *    if and wherever such third-party acknowledgments normally appear.
  - *
  - * 4. The names "Apache" and "Apache Software Foundation" and
  - *    "Apache ObjectRelationalBridge" must not be used to endorse or promote products
  - *    derived from this software without prior written permission. For
  - *    written permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache",
  - *    "Apache ObjectRelationalBridge", nor may "Apache" appear in their name, without
  - *    prior written permission of the Apache Software Foundation.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - */
  -
  -import org.apache.ojb.broker.util.DoubleHashtable;
  -
  -/**
  - * this class maintains a table mapping the xml-tags used in the
  - * repository.dtd to their corresponding ids used within OJB.
  - * This table is used in <br>
  - * 1. the RepositoryXmlHandler to identify tags on parsing the
  - * repository.xml in a large switch statement.
  - * 2. in the RepositoryPersistor to get the proper tag for a
  - * given XmlCapable id during assembling the repository.xml
  - * for output.<br>
  - * <b>Important note: This class is the only place where XML tags from the
  - * repository.dtd are maintained.
  - * All usages of these tags within OJB must use this table to ease
  - * changes of the DTD.</b>
  - * @author		Thomas Mahler
  - */
  -public class RepositoryTags implements RepositoryElements
  -{
  -    /**
  -     * the two-way hashtable holding all entries.
  -     */
  -    private DoubleHashtable table;
  -
  -    /**
  -     * the singleton instance of this class.
  -     */
  -    private static RepositoryTags instance = new RepositoryTags();
  -
  -    /**
  -     * private Constructor, please use getInstance() to obtain
  -     * the singleton instance of this class.
  -     */
  -    private RepositoryTags()
  -    {
  -        // construct the mapping table
  -        table = new DoubleHashtable();
  -        table.put("descriptor-repository", new Integer(MAPPING_REPOSITORY));
  -        table.put("version", new Integer(REPOSITORY_VERSION));
  -        table.put("isolation-level", new Integer(ISOLATION_LEVEL));
  -        table.put("jdbc-connection-descriptor", new Integer(JDBC_CONNECTION_DESCRIPTOR));
  -        table.put("platform", new Integer(DBMS_NAME));
  -        table.put("schema", new Integer(SCHEMA_NAME));
  -        table.put("driver", new Integer(DRIVER_NAME));
  -        table.put("protocol", new Integer(URL_PROTOCOL));
  -        table.put("subprotocol", new Integer(URL_SUBPROTOCOL));
  -        table.put("dbalias", new Integer(URL_DBALIAS));
  -        table.put("username", new Integer(USER_NAME));
  -        table.put("password", new Integer(USER_PASSWD));
  -        table.put("eager-release", new Integer(EAGER_RELEASE));
  -        table.put("class-descriptor", new Integer(CLASS_DESCRIPTOR));
  -        table.put("class", new Integer(CLASS_NAME));
  -        table.put("proxy", new Integer(CLASS_PROXY));
  -        table.put("extent-class", new Integer(CLASS_EXTENT));
  -        table.put("extends", new Integer(EXTENDS));
  -        table.put("table", new Integer(TABLE_NAME));
  -        table.put("orderby", new Integer(ORDERBY));
  -        table.put("conversion", new Integer(FIELD_CONVERSION));
  -        table.put("row-reader", new Integer(ROW_READER));
  -        table.put("field-descriptor", new Integer(FIELD_DESCRIPTOR));
  -        table.put("name", new Integer(FIELD_NAME));
  -        table.put("column", new Integer(COLUMN_NAME));
  -        table.put("jdbc-type", new Integer(JDBC_TYPE));
  -        table.put("primarykey", new Integer(PRIMARY_KEY));
  -        table.put("autoincrement", new Integer(AUTO_INCREMENT));
  -        table.put("sequence-name", new Integer(SEQUENCE_NAME));
  -        table.put("nullable", new Integer(NULLABLE));
  -        table.put("indexed", new Integer(INDEXED));
  -        table.put("length", new Integer(LENGTH));
  -        table.put("precision", new Integer(PRECISION));
  -        table.put("scale", new Integer(SCALE));
  -
  -        table.put("reference-descriptor", new Integer(REFERENCE_DESCRIPTOR));
  -        //table.put("rdfield.name", new Integer(Rdfield_name));
  -        table.put("class-ref", new Integer(REFERENCED_CLASS));
  -        table.put("foreignkey", new Integer(FOREIGN_KEY));
  -        table.put("auto-retrieve", new Integer(AUTO_RETRIEVE));
  -        table.put("auto-update", new Integer(AUTO_UPDATE));
  -        table.put("auto-delete", new Integer(AUTO_DELETE));
  -        table.put("collection-descriptor", new Integer(COLLECTION_DESCRIPTOR));
  -        //table.put("cdfield.name", new Integer(Cdfield_name));
  -        table.put("element-class-ref", new Integer(ITEMS_CLASS));
  -        table.put("inverse-foreignkey", new Integer(INVERSE_FK));
  -        table.put("collection-class", new Integer(COLLECTION_CLASS));
  -        table.put("indirection-table", new Integer(INDIRECTION_TABLE));
  -        table.put("fk-pointing-to-element-class", new Integer(FK_POINTING_TO_ITEMS_CLASS));
  -        table.put("fk-pointing-to-this-class", new Integer(FK_POINTING_TO_THIS_CLASS));
  -        //table.put("proxyCollection", new Integer(ProxyCollection));
  -        //table.put("refreshCollection", new Integer(RefreshCollection));
  -        table.put("jndi-datasource-name", new Integer(DATASOURCE_NAME));
  -        table.put("jdbc-level", new Integer(JDBC_LEVEL));
  -        table.put("locking", new Integer(LOCKING));
  -        table.put("refresh", new Integer(REFRESH_REFERENCE));
  -        table.put("proxy", new Integer(PROXY_REFERENCE));
  -
  -        table.put("sort", new Integer(SORT));
  -
  -        table.put("maxActive", new Integer(CON_MAX_ACTIVE));
  -        table.put("maxIdle", new Integer(CON_MAX_IDLE));
  -        table.put("maxWait", new Integer(CON_MAX_WAIT));
  -        table.put("minEvictableIdleTimeMillis", new Integer(CON_MIN_EVICTABLE_IDLE_TIME_MILLIS));
  -        table.put("numTestsPerEvictionRun", new Integer(CON_NUM_TESTS_PER_EVICTION_RUN));
  -        table.put("testOnBorrow", new Integer(CON_TEST_ON_BORROW));
  -        table.put("testOnReturn", new Integer(CON_TEST_ON_RETURN));
  -        table.put("testWhileIdle", new Integer(CON_TEST_WHILE_IDLE));
  -        table.put("timeBetweenEvictionRunsMillis", new Integer(CON_TIME_BETWEEN_EVICTION_RUNS_MILLIS));
  -        table.put("whenExhaustedAction", new Integer(CON_WHEN_EXHAUSTED_ACTION));
  -        table.put("connectionFactory", new Integer(CONNECTION_FACTORY));
  -        table.put("connection-pool", new Integer(CONNECTION_POOL));
  -        table.put("class-ref", new Integer(CLASS_REF));
  -		table.put("id", new Integer(ID));
  -		table.put("field-id-ref", new Integer(FIELD_ID_REF));
  -		table.put("attribute", new Integer(ATTRIBUTE));
  -		table.put("attribute-name", new Integer(ATTRIBUTE_NAME));
  -		table.put("attribute-value", new Integer(ATTRIBUTE_VALUE));
  -		table.put("documentation", new Integer(DOCUMENTATION));
  -
  -        // add new tags here !
  -    }
  -
  -	/**
  -	 * returns the singleton instance.
  -	 */
  -    public static RepositoryTags getInstance()
  -    {
  -        return instance;
  -    }
  -
  -	/**
  -	 * returns the xml-tag literal associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getTagById(int elementId)
  -    {
  -        return (String) table.getKeyByValue(new Integer(elementId));
  -    }
  -
  -	/**
  -	 * returns the opening xml-tag associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getOpeningTagById(int elementId)
  -    {
  -        return "<" + table.getKeyByValue(new Integer(elementId)) + ">";
  -    }
  -
  -
  -	/**
  -	 * returns the opening but non-closing xml-tag
  -	 * associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getOpeningTagNonClosingById(int elementId)
  -    {
  -        return "<" + table.getKeyByValue(new Integer(elementId));
  -    }
  -
  -
  -	/**
  -	 * returns the opening xml-tag associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getOpeningTagById(int elementId, String attributes)
  -    {
  -        return "<" + table.getKeyByValue(new Integer(elementId)) + " " + attributes + ">";
  -    }
  -
  -	/**
  -	 * returns the opening but non-closing xml-tag
  -	 * associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getAttribute(int elementId, String value)
  -    {
  -        return table.getKeyByValue(new Integer(elementId)) + "=\"" + value + "\"";
  -    }
  -
  -
  -	/**
  -	 * returns the closing xml-tag associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getClosingTagById(int elementId)
  -    {
  -        return "</" + table.getKeyByValue(new Integer(elementId)) + ">";
  -    }
  -
  -    /**
  -     * returns the repository element id associated with the xml-tag
  -     * literal <code>tag</code>.
  -     * @return the resulting repository element id.
  -     * @throws NullPointerException if no value was found for <b>tag</b>
  -     */
  -    public int getIdByTag(String tag)
  -    {
  -        return ((Integer) table.getValueByKey(tag)).intValue();
  -    }
  -
  -	/**
  -	 * returns the opening xml-tag associated with the repository element with
  -	 * id <code>elementId</code>.
  -	 * @return the resulting tag
  -	 */
  -    public String getCompleteTagById(int elementId, String characters)
  -    {
  -        String result = getOpeningTagById(elementId);
  -        result += characters;
  -        result += getClosingTagById(elementId);
  -        return result;
  -    }
  -
  -
  -}
  +package org.apache.ojb.broker.metadata;
  +
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *    notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *    notice, this list of conditions and the following disclaimer in
  + *    the documentation and/or other materials provided with the
  + *    distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *    if any, must include the following acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache ObjectRelationalBridge" must not be used to endorse or promote products
  + *    derived from this software without prior written permission. For
  + *    written permission, please contact apache@apache.org.
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *    "Apache ObjectRelationalBridge", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * ====================================================================
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * <http://www.apache.org/>.
  + */
  +
  +import org.apache.ojb.broker.util.DoubleHashtable;
  +
  +/**
  + * this class maintains a table mapping the xml-tags used in the
  + * repository.dtd to their corresponding ids used within OJB.
  + * This table is used in <br>
  + * 1. the RepositoryXmlHandler to identify tags on parsing the
  + * repository.xml in a large switch statement.
  + * 2. in the RepositoryPersistor to get the proper tag for a
  + * given XmlCapable id during assembling the repository.xml
  + * for output.<br>
  + * <b>Important note: This class is the only place where XML tags from the
  + * repository.dtd are maintained.
  + * All usages of these tags within OJB must use this table to ease
  + * changes of the DTD.</b>
  + * @author		Thomas Mahler
  + */
  +public class RepositoryTags implements RepositoryElements
  +{
  +    /**
  +     * the two-way hashtable holding all entries.
  +     */
  +    private DoubleHashtable table;
  +
  +    /**
  +     * the singleton instance of this class.
  +     */
  +    private static RepositoryTags instance = new RepositoryTags();
  +
  +    /**
  +     * private Constructor, please use getInstance() to obtain
  +     * the singleton instance of this class.
  +     */
  +    private RepositoryTags()
  +    {
  +        // construct the mapping table
  +        table = new DoubleHashtable();
  +        table.put("descriptor-repository", new Integer(MAPPING_REPOSITORY));
  +        table.put("version", new Integer(REPOSITORY_VERSION));
  +        table.put("isolation-level", new Integer(ISOLATION_LEVEL));
  +        table.put("jdbc-connection-descriptor", new Integer(JDBC_CONNECTION_DESCRIPTOR));
  +        table.put("platform", new Integer(DBMS_NAME));
  +        table.put("schema", new Integer(SCHEMA_NAME));
  +        table.put("driver", new Integer(DRIVER_NAME));
  +        table.put("protocol", new Integer(URL_PROTOCOL));
  +        table.put("subprotocol", new Integer(URL_SUBPROTOCOL));
  +        table.put("dbalias", new Integer(URL_DBALIAS));
  +        table.put("username", new Integer(USER_NAME));
  +        table.put("password", new Integer(USER_PASSWD));
  +        table.put("eager-release", new Integer(EAGER_RELEASE));
  +        table.put("class-descriptor", new Integer(CLASS_DESCRIPTOR));
  +        table.put("class", new Integer(CLASS_NAME));
  +        table.put("proxy", new Integer(CLASS_PROXY));
  +        table.put("extent-class", new Integer(CLASS_EXTENT));
  +        table.put("extends", new Integer(EXTENDS));
  +        table.put("table", new Integer(TABLE_NAME));
  +        table.put("orderby", new Integer(ORDERBY));
  +        table.put("conversion", new Integer(FIELD_CONVERSION));
  +        table.put("row-reader", new Integer(ROW_READER));
  +        table.put("field-descriptor", new Integer(FIELD_DESCRIPTOR));
  +        table.put("name", new Integer(FIELD_NAME));
  +        table.put("column", new Integer(COLUMN_NAME));
  +        table.put("jdbc-type", new Integer(JDBC_TYPE));
  +        table.put("primarykey", new Integer(PRIMARY_KEY));
  +        table.put("autoincrement", new Integer(AUTO_INCREMENT));
  +        table.put("sequence-name", new Integer(SEQUENCE_NAME));
  +        table.put("nullable", new Integer(NULLABLE));
  +        table.put("indexed", new Integer(INDEXED));
  +        table.put("length", new Integer(LENGTH));
  +        table.put("precision", new Integer(PRECISION));
  +        table.put("scale", new Integer(SCALE));
  +
  +        table.put("reference-descriptor", new Integer(REFERENCE_DESCRIPTOR));
  +        //table.put("rdfield.name", new Integer(Rdfield_name));
  +        table.put("class-ref", new Integer(REFERENCED_CLASS));
  +        table.put("foreignkey", new Integer(FOREIGN_KEY));
  +        table.put("auto-retrieve", new Integer(AUTO_RETRIEVE));
  +        table.put("auto-update", new Integer(AUTO_UPDATE));
  +        table.put("auto-delete", new Integer(AUTO_DELETE));
  +        table.put("collection-descriptor", new Integer(COLLECTION_DESCRIPTOR));
  +        //table.put("cdfield.name", new Integer(Cdfield_name));
  +        table.put("element-class-ref", new Integer(ITEMS_CLASS));
  +        table.put("inverse-foreignkey", new Integer(INVERSE_FK));
  +        table.put("collection-class", new Integer(COLLECTION_CLASS));
  +        table.put("indirection-table", new Integer(INDIRECTION_TABLE));
  +        table.put("fk-pointing-to-element-class", new Integer(FK_POINTING_TO_ITEMS_CLASS));
  +        table.put("fk-pointing-to-this-class", new Integer(FK_POINTING_TO_THIS_CLASS));
  +        //table.put("proxyCollection", new Integer(ProxyCollection));
  +        //table.put("refreshCollection", new Integer(RefreshCollection));
  +        table.put("jndi-datasource-name", new Integer(DATASOURCE_NAME));
  +        table.put("jdbc-level", new Integer(JDBC_LEVEL));
  +        table.put("locking", new Integer(LOCKING));
  +        table.put("refresh", new Integer(REFRESH_REFERENCE));
  +        table.put("proxy", new Integer(PROXY_REFERENCE));
  +
  +        table.put("sort", new Integer(SORT));
  +
  +        table.put("maxActive", new Integer(CON_MAX_ACTIVE));
  +        table.put("maxIdle", new Integer(CON_MAX_IDLE));
  +        table.put("maxWait", new Integer(CON_MAX_WAIT));
  +        table.put("minEvictableIdleTimeMillis", new Integer(CON_MIN_EVICTABLE_IDLE_TIME_MILLIS));
  +        table.put("numTestsPerEvictionRun", new Integer(CON_NUM_TESTS_PER_EVICTION_RUN));
  +        table.put("testOnBorrow", new Integer(CON_TEST_ON_BORROW));
  +        table.put("testOnReturn", new Integer(CON_TEST_ON_RETURN));
  +        table.put("testWhileIdle", new Integer(CON_TEST_WHILE_IDLE));
  +        table.put("timeBetweenEvictionRunsMillis", new Integer(CON_TIME_BETWEEN_EVICTION_RUNS_MILLIS));
  +        table.put("whenExhaustedAction", new Integer(CON_WHEN_EXHAUSTED_ACTION));
  +        table.put("connectionFactory", new Integer(CONNECTION_FACTORY));
  +        table.put("connection-pool", new Integer(CONNECTION_POOL));
  +        table.put("class-ref", new Integer(CLASS_REF));
  +		table.put("id", new Integer(ID));
  +		table.put("field-id-ref", new Integer(FIELD_ID_REF));
  +		table.put("attribute", new Integer(ATTRIBUTE));
  +		table.put("attribute-name", new Integer(ATTRIBUTE_NAME));
  +		table.put("attribute-value", new Integer(ATTRIBUTE_VALUE));
  +		table.put("documentation", new Integer(DOCUMENTATION));
  +        table.put("accept-locks", new Integer(ACCEPT_LOCKS));
  +
  +        // add new tags here !
  +    }
  +
  +	/**
  +	 * returns the singleton instance.
  +	 */
  +    public static RepositoryTags getInstance()
  +    {
  +        return instance;
  +    }
  +
  +	/**
  +	 * returns the xml-tag literal associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getTagById(int elementId)
  +    {
  +        return (String) table.getKeyByValue(new Integer(elementId));
  +    }
  +
  +	/**
  +	 * returns the opening xml-tag associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getOpeningTagById(int elementId)
  +    {
  +        return "<" + table.getKeyByValue(new Integer(elementId)) + ">";
  +    }
  +
  +
  +	/**
  +	 * returns the opening but non-closing xml-tag
  +	 * associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getOpeningTagNonClosingById(int elementId)
  +    {
  +        return "<" + table.getKeyByValue(new Integer(elementId));
  +    }
  +
  +
  +	/**
  +	 * returns the opening xml-tag associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getOpeningTagById(int elementId, String attributes)
  +    {
  +        return "<" + table.getKeyByValue(new Integer(elementId)) + " " + attributes + ">";
  +    }
  +
  +	/**
  +	 * returns the opening but non-closing xml-tag
  +	 * associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getAttribute(int elementId, String value)
  +    {
  +        return table.getKeyByValue(new Integer(elementId)) + "=\"" + value + "\"";
  +    }
  +
  +
  +	/**
  +	 * returns the closing xml-tag associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getClosingTagById(int elementId)
  +    {
  +        return "</" + table.getKeyByValue(new Integer(elementId)) + ">";
  +    }
  +
  +    /**
  +     * returns the repository element id associated with the xml-tag
  +     * literal <code>tag</code>.
  +     * @return the resulting repository element id.
  +     * @throws NullPointerException if no value was found for <b>tag</b>
  +     */
  +    public int getIdByTag(String tag)
  +    {
  +        return ((Integer) table.getValueByKey(tag)).intValue();
  +    }
  +
  +	/**
  +	 * returns the opening xml-tag associated with the repository element with
  +	 * id <code>elementId</code>.
  +	 * @return the resulting tag
  +	 */
  +    public String getCompleteTagById(int elementId, String characters)
  +    {
  +        String result = getOpeningTagById(elementId);
  +        result += characters;
  +        result += getClosingTagById(elementId);
  +        return result;
  +    }
  +
  +
  +}