View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  package javax.jdo.metadata;
    18
    19  /**
    20   * This interface provides base level definitions for all metadata components.
    21   *
    22   * @version 3.0
    23   */
    24  public interface Metadata {
    25      /**
    26       * Add a vendor extension to this metadata component.
    27       *
    28       * @param vendor Identifier for the vendor
    29       * @param key The extension key
    30       * @param value Value for the extension
    31       * @return The ExtensionMetadata
    32       */
    33      ExtensionMetadata newExtensionMetadata(String vendor, String key, String value);
    34
    35      /**
    36       * Number of extensions on this component.
    37       *
    38       * @return Number of extensions
    39       */
    40      int getNumberOfExtensions();
    41
    42      /**
    43       * Accessor for the defined extensions for this component
    44       *
    45       * @return The extensions
    46       */
    47      ExtensionMetadata[] getExtensions();
    48
    49      /**
    50       * Accessor for the parent metadata component.
    51       *
    52       * @return The parent
    53       */
    54      Metadata getParent();
    55  }