001 /*
002 // $Id: MetadataElement.java 379 2010-12-17 02:58:28Z jhyde $
003 // This software is subject to the terms of the Eclipse Public License v1.0
004 // Agreement, available at the following URL:
005 // http://www.eclipse.org/legal/epl-v10.html.
006 // Copyright (C) 2006-2010 Julian Hyde
007 // All Rights Reserved.
008 // You must accept the terms of that agreement to use this software.
009 */
010 package org.olap4j.metadata;
011
012 /**
013 * An element which describes the structure of an OLAP schema.
014 *
015 * @author jhyde
016 * @version $Id: MetadataElement.java 379 2010-12-17 02:58:28Z jhyde $
017 * @since Oct 13, 2006
018 */
019 public interface MetadataElement {
020 /**
021 * Returns the name of this element.
022 *
023 * <p>Name is never null. Unlike {@link #getCaption() caption} and
024 * {@link #getDescription() description}, an element's name is the same in
025 * every {@link java.util.Locale}.
026 *
027 * @return name of this element
028 */
029 String getName();
030
031 /**
032 * Returns the unique name of this element within its schema.
033 *
034 * <p>The unique name is never null, and is unique among all elements in
035 * this {@link Schema}.
036 *
037 * <p>Unlike {@link #getCaption() caption} and
038 * {@link #getDescription() description}, an element's unique name is the
039 * same in every {@link java.util.Locale}.
040 *
041 * <p>The structure of the unique name is provider-specific and subject to
042 * change between provider versions. Applications should not attempt to
043 * reverse-engineer the structure of the name.
044 *
045 * @return unique name of this element
046 */
047 String getUniqueName();
048
049 /**
050 * Returns the caption of this element in the current connection's
051 * {@link java.util.Locale}.
052 *
053 * <p>This method may return the empty string, but never returns null.
054 * The rules for deriving an element's caption are provider-specific,
055 * but generally if no caption is defined for the element in a given locale,
056 * returns the name of the element.</p>
057 *
058 * @return caption of this element in the current locale; never null.
059 *
060 * @see org.olap4j.OlapConnection#getLocale()
061 */
062 String getCaption();
063
064 /**
065 * Returns the description of this element in the current connection's
066 * {@link java.util.Locale}.
067 *
068 * <p>This method may return the empty string, but never returns null.
069 * The rules for deriving an element's description are provider-specific,
070 * but generally if no description is defined
071 * for the element in a given locale, returns the description in base
072 * locale.</p>
073 *
074 * @return description of this element in the current locale; never null.
075 *
076 * @see org.olap4j.OlapConnection#getLocale()
077 */
078 String getDescription();
079
080 /**
081 * Returns whether this element is visible to end-users.
082 *
083 * <p>Visibility is a hint for client applications. An element's visibility
084 * does not affect how it is treated when MDX queries are evaluated.
085 *
086 * <p>If you wish to hide an MDX element at a deeper level, consider two
087 * OLAP concepts that sound similar to visibility but have different
088 * semantics:
089 *
090 * <ul>
091 * <li>{@link Member#isHidden Hidden members} in ragged hierarchies;</li>
092 * <li>{@link org.olap4j.OlapConnection#getRoleName Access control}</li>
093 * </ul>
094 *
095 * @return Whether this element is visible
096 */
097 boolean isVisible();
098 }
099
100 // End MetadataElement.java