org.jpox.metadata
Class PackageMetaData

java.lang.Object
  extended byorg.jpox.metadata.MetaData
      extended byorg.jpox.metadata.ExtendableMetaData
          extended byorg.jpox.metadata.PackageMetaData
All Implemented Interfaces:
java.io.Serializable

public class PackageMetaData
extends ExtendableMetaData

Representation of the Meta-Data for a package.

MetaData Element

The MetaData Element represented here is as follows
 <!ELEMENT package (extension*, (interface|class|sequence)*, extension*)>
 <!ATTLIST package name CDATA #REQUIRED>
 

Since:
1.1
Version:
$Revision: 1.8 $
See Also:
Serialized Form

Field Summary
protected  java.lang.String catalog
          Catalog name for all classes in this package
protected  java.util.List classes
          List of classes.
protected  java.util.List interfaces
          List of interfaces
protected  java.lang.String name
          Package name
protected  java.lang.String schema
          Schema name for all classes in this package
protected  java.util.List sequences
          List of sequences
 
Fields inherited from class org.jpox.metadata.ExtendableMetaData
extensions, JPOX_VENDOR_NAME
 
Fields inherited from class org.jpox.metadata.MetaData
LOCALISER, METADATA_CREATED_STATE, METADATA_INITIALISED_STATE, METADATA_POPULATED_STATE, METADATA_USED_STATE, metaDataState, parent
 
Constructor Summary
PackageMetaData(FileMetaData parent, java.lang.String name, java.lang.String catalog, java.lang.String schema)
          Constructor.
 
Method Summary
 void addClass(ClassMetaData cmd)
          Method to add a class Meta-Data to the package.
 void addInterface(InterfaceMetaData imd)
          Method to add a interface Meta-Data to the package.
 void addSequence(SequenceMetaData seqmd)
          Method to add a sequence Meta-Data to the package.
 java.lang.String getCatalog()
          Accessor for the catalog name for all classes in this package
 ClassMetaData getClass(int i)
          Accessor for the Meta-Data of a class in this package.
 ClassMetaData getClass(java.lang.String name)
          Accessor for the Meta-Data of a class with the specified name.
 FileMetaData getFileMetaData()
          Accessor for the parent FileMetaData.
 InterfaceMetaData getInterface(int i)
          Accessor for the Meta-Data of a interface in this package.
 InterfaceMetaData getInterface(java.lang.String name)
          Accessor for the Meta-Data of an interface with the specified name.
 java.lang.String getName()
          Accessor for the name of the package
 int getNoOfClasses()
          Accessor for the number of classes.
 int getNoOfInterfaces()
          Accessor for the number of interfaces.
 int getNoOfSequences()
          Accessor for the number of sequences.
 java.lang.String getSchema()
          Accessor for the schema name for all classes in this package
 SequenceMetaData getSequence(int i)
          Accessor for the Meta-Data of a sequence in this package.
 SequenceMetaData getSequence(java.lang.String name)
          Accessor for the Meta-Data of an sequence with the specified name.
 java.lang.String toString(java.lang.String prefix, java.lang.String indent)
          Returns a string representation of the object.
 
Methods inherited from class org.jpox.metadata.ExtendableMetaData
addExtension, addExtension, getExtension, getExtensions, getNoOfExtensions, getValueForExtension, getValuesForExtension, getValuesForExtensionStartingWith, hasExtension, removeExtension, toString
 
Methods inherited from class org.jpox.metadata.MetaData
getParent, initialise, isCreated, isInitialised, isPopulated, isUsed, populate, setInitialised, setPopulated, setUsed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

interfaces

protected java.util.List interfaces
List of interfaces


classes

protected java.util.List classes
List of classes.


sequences

protected java.util.List sequences
List of sequences


name

protected final java.lang.String name
Package name


catalog

protected java.lang.String catalog
Catalog name for all classes in this package


schema

protected java.lang.String schema
Schema name for all classes in this package

Constructor Detail

PackageMetaData

public PackageMetaData(FileMetaData parent,
                       java.lang.String name,
                       java.lang.String catalog,
                       java.lang.String schema)
Constructor.

Parameters:
parent - The FileMetaData owner
name - Name of package
catalog - Catalog name for all classes in the package
schema - Schema name for all classes in the package
Method Detail

getFileMetaData

public FileMetaData getFileMetaData()
Accessor for the parent FileMetaData.

Returns:
File MetaData.

getName

public java.lang.String getName()
Accessor for the name of the package

Returns:
package name

getCatalog

public java.lang.String getCatalog()
Accessor for the catalog name for all classes in this package

Returns:
Catalog name to use.

getSchema

public java.lang.String getSchema()
Accessor for the schema name for all classes in this package

Returns:
Schema name to use.

getNoOfInterfaces

public int getNoOfInterfaces()
Accessor for the number of interfaces.

Returns:
Number of interfaces.

getInterface

public InterfaceMetaData getInterface(int i)
Accessor for the Meta-Data of a interface in this package.

Parameters:
i - interface index
Returns:
Meta-Data for the interface

getInterface

public InterfaceMetaData getInterface(java.lang.String name)
Accessor for the Meta-Data of an interface with the specified name.

Parameters:
name - the name of the interface
Returns:
Meta-Data for the interface

getNoOfClasses

public int getNoOfClasses()
Accessor for the number of classes.

Returns:
Number of classes.

getClass

public ClassMetaData getClass(int i)
Accessor for the Meta-Data of a class in this package.

Parameters:
i - class index
Returns:
Meta-Data for the class

getClass

public ClassMetaData getClass(java.lang.String name)
Accessor for the Meta-Data of a class with the specified name.

Parameters:
name - the name of the class
Returns:
Meta-Data for the class.

getNoOfSequences

public int getNoOfSequences()
Accessor for the number of sequences.

Returns:
Number of sequences.

getSequence

public SequenceMetaData getSequence(int i)
Accessor for the Meta-Data of a sequence in this package.

Parameters:
i - sequence index
Returns:
Meta-Data for the sequence

getSequence

public SequenceMetaData getSequence(java.lang.String name)
Accessor for the Meta-Data of an sequence with the specified name.

Parameters:
name - the name of the sequence
Returns:
Meta-Data for the sequence

addClass

public void addClass(ClassMetaData cmd)
Method to add a class Meta-Data to the package.

Parameters:
cmd - Meta-Data for the class

addInterface

public void addInterface(InterfaceMetaData imd)
Method to add a interface Meta-Data to the package.

Parameters:
imd - Meta-Data for the interface

addSequence

public void addSequence(SequenceMetaData seqmd)
Method to add a sequence Meta-Data to the package.

Parameters:
seqmd - Meta-Data for the sequence

toString

public java.lang.String toString(java.lang.String prefix,
                                 java.lang.String indent)
Returns a string representation of the object.

Overrides:
toString in class ExtendableMetaData
Parameters:
prefix - prefix string
indent - indent string
Returns:
a string representation of the object.


Copyright © -2007 . All Rights Reserved.