org.jacorb.ir
Class RepositoryImpl

java.lang.Object
  extended byorg.jacorb.ir.IRObject
      extended byorg.jacorb.ir.RepositoryImpl
All Implemented Interfaces:
ContainerOperations, IRObjectOperations, RepositoryOperations

public class RepositoryImpl
extends IRObject
implements RepositoryOperations

The Interface Repository.

This class represents the repository itself as well as the executable server.

Methods from the "write" interface to the IR are not supported.

Version:
1.0
Author:
(c) Gerald Brose, FU Berlin 1997

Field Summary
static char fileSeparator
           
static java.lang.ClassLoader loader
           
static java.lang.String pathSeparator
           
static POA poa
          global variable for all IR objects
 
Fields inherited from class org.jacorb.ir.IRObject
def_kind, myRef, name, orb
 
Constructor Summary
RepositoryImpl(java.lang.String classpath, java.lang.String outfile, java.net.URLClassLoader loader)
          constructor to launch a repository with the contents of classpath
 
Method Summary
 Contained[] contents(DefinitionKind limit_type, boolean exclude_inherited)
          list the contents of the repository
 AliasDef create_alias(java.lang.String id, java.lang.String name, java.lang.String version, IDLType original_type)
           
 ArrayDef create_array(int length, IDLType element_type)
          not supported
 ConstantDef create_constant(java.lang.String id, java.lang.String name, java.lang.String version, IDLType type, Any value)
           
 EnumDef create_enum(java.lang.String id, java.lang.String name, java.lang.String version, java.lang.String[] members)
           
 ExceptionDef create_exception(java.lang.String id, java.lang.String name, java.lang.String version, StructMember[] member)
           
 FixedDef create_fixed(short digits, short scale)
          not supported
 InterfaceDef create_interface(java.lang.String id, java.lang.String name, java.lang.String version, InterfaceDef[] base_interfaces, boolean is_abstract)
          not supported
 ModuleDef create_module(java.lang.String id, java.lang.String name, java.lang.String version)
           
 NativeDef create_native(java.lang.String id, java.lang.String name, java.lang.String version)
          not supported
 SequenceDef create_sequence(int bound, IDLType element_type)
          not supported
 StringDef create_string(int bound)
          not supported
 StructDef create_struct(java.lang.String id, java.lang.String name, java.lang.String version, StructMember[] members)
           
 UnionDef create_union(java.lang.String id, java.lang.String name, java.lang.String version, IDLType discriminator_type, UnionMember[] members)
           
 ValueBoxDef create_value_box(java.lang.String id, java.lang.String name, java.lang.String version, IDLType type)
          not supported
 ValueDef create_value(java.lang.String id, java.lang.String name, java.lang.String version, boolean is_custom, boolean is_abstract, ValueDef base_value, boolean is_truncatable, ValueDef[] abstract_base_values, InterfaceDef[] supported_interfaces, Initializer[] initializers)
          not supported
 WstringDef create_wstring(int bound)
          not supported
 Description[] describe_contents(DefinitionKind limit_type, boolean exclude_inherited, int max_returned_objs)
          describe the contents of the repository
 void destroy()
           
 TypeCode get_canonical_typecode(TypeCode tc)
           
 PrimitiveDef get_primitive(PrimitiveKind kind)
           
 void loadContents()
           
 Contained lookup_id(java.lang.String search_id)
          lookup a repository ID
 Contained[] lookup_name(java.lang.String search_name, int levels_to_search, DefinitionKind limit_type, boolean exclude_inherited)
          lookup a simple name in the repository (neither scoped nor ID formatted)
 Contained lookup(java.lang.String name)
          lookup a scoped name in the repository
 
Methods inherited from class org.jacorb.ir.IRObject
def_kind, getName, getReference, setReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.IRObjectOperations
def_kind
 

Field Detail

poa

public static POA poa
global variable for all IR objects


loader

public static java.lang.ClassLoader loader

fileSeparator

public static char fileSeparator

pathSeparator

public static java.lang.String pathSeparator
Constructor Detail

RepositoryImpl

public RepositoryImpl(java.lang.String classpath,
                      java.lang.String outfile,
                      java.net.URLClassLoader loader)
constructor to launch a repository with the contents of classpath

Parameters:
classpath - a classpath string made up of directories separated by ":"
Method Detail

lookup_id

public Contained lookup_id(java.lang.String search_id)
lookup a repository ID

Specified by:
lookup_id in interface RepositoryOperations
Returns:
a reference to the object or null, if not found

get_primitive

public PrimitiveDef get_primitive(PrimitiveKind kind)
Specified by:
get_primitive in interface RepositoryOperations

create_string

public StringDef create_string(int bound)
not supported

Specified by:
create_string in interface RepositoryOperations

create_wstring

public WstringDef create_wstring(int bound)
not supported

Specified by:
create_wstring in interface RepositoryOperations

create_fixed

public FixedDef create_fixed(short digits,
                             short scale)
not supported

Specified by:
create_fixed in interface RepositoryOperations

create_sequence

public SequenceDef create_sequence(int bound,
                                   IDLType element_type)
not supported

Specified by:
create_sequence in interface RepositoryOperations

create_array

public ArrayDef create_array(int length,
                             IDLType element_type)
not supported

Specified by:
create_array in interface RepositoryOperations

get_canonical_typecode

public TypeCode get_canonical_typecode(TypeCode tc)
Specified by:
get_canonical_typecode in interface RepositoryOperations

lookup

public Contained lookup(java.lang.String name)
lookup a scoped name in the repository

Specified by:
lookup in interface ContainerOperations
Parameters:
name - the name to look for
Returns:
a reference to the item with the specified name or null, if not found

lookup_name

public Contained[] lookup_name(java.lang.String search_name,
                               int levels_to_search,
                               DefinitionKind limit_type,
                               boolean exclude_inherited)
lookup a simple name in the repository (neither scoped nor ID formatted)

Specified by:
lookup_name in interface ContainerOperations
Parameters:
search_name - the name to look for
levels_to_search - if 1, search only this object, if -1, search all containers contained in this repository, else search until the specified depth is reached
limit_type - limit the description to objects of this type
exclude_inherited - exclude inherited items from the description
Returns:
an array of items with the specified name

contents

public Contained[] contents(DefinitionKind limit_type,
                            boolean exclude_inherited)
list the contents of the repository

Specified by:
contents in interface ContainerOperations
Parameters:
limit_type - limit the description to objects of this type
exclude_inherited - exclude inherited items from the description
Returns:
an array of items contained in this repository

describe_contents

public Description[] describe_contents(DefinitionKind limit_type,
                                       boolean exclude_inherited,
                                       int max_returned_objs)
describe the contents of the repository

Specified by:
describe_contents in interface ContainerOperations
Parameters:
limit_type - limit the description to objects of this type
exclude_inherited - exclude inherited items from the description
max_returned_objs - return only so many items
Returns:
an array of descriptions

loadContents

public void loadContents()

create_module

public ModuleDef create_module(java.lang.String id,
                               java.lang.String name,
                               java.lang.String version)
Specified by:
create_module in interface ContainerOperations

create_constant

public ConstantDef create_constant(java.lang.String id,
                                   java.lang.String name,
                                   java.lang.String version,
                                   IDLType type,
                                   Any value)
Specified by:
create_constant in interface ContainerOperations

create_struct

public StructDef create_struct(java.lang.String id,
                               java.lang.String name,
                               java.lang.String version,
                               StructMember[] members)
Specified by:
create_struct in interface ContainerOperations

create_union

public UnionDef create_union(java.lang.String id,
                             java.lang.String name,
                             java.lang.String version,
                             IDLType discriminator_type,
                             UnionMember[] members)
Specified by:
create_union in interface ContainerOperations

create_enum

public EnumDef create_enum(java.lang.String id,
                           java.lang.String name,
                           java.lang.String version,
                           java.lang.String[] members)
Specified by:
create_enum in interface ContainerOperations

create_alias

public AliasDef create_alias(java.lang.String id,
                             java.lang.String name,
                             java.lang.String version,
                             IDLType original_type)
Specified by:
create_alias in interface ContainerOperations

create_exception

public ExceptionDef create_exception(java.lang.String id,
                                     java.lang.String name,
                                     java.lang.String version,
                                     StructMember[] member)
Specified by:
create_exception in interface ContainerOperations

create_interface

public InterfaceDef create_interface(java.lang.String id,
                                     java.lang.String name,
                                     java.lang.String version,
                                     InterfaceDef[] base_interfaces,
                                     boolean is_abstract)
not supported

Specified by:
create_interface in interface ContainerOperations

create_value_box

public ValueBoxDef create_value_box(java.lang.String id,
                                    java.lang.String name,
                                    java.lang.String version,
                                    IDLType type)
not supported

Specified by:
create_value_box in interface ContainerOperations

create_value

public ValueDef create_value(java.lang.String id,
                             java.lang.String name,
                             java.lang.String version,
                             boolean is_custom,
                             boolean is_abstract,
                             ValueDef base_value,
                             boolean is_truncatable,
                             ValueDef[] abstract_base_values,
                             InterfaceDef[] supported_interfaces,
                             Initializer[] initializers)
not supported

Specified by:
create_value in interface ContainerOperations

create_native

public NativeDef create_native(java.lang.String id,
                               java.lang.String name,
                               java.lang.String version)
not supported

Specified by:
create_native in interface ContainerOperations

destroy

public void destroy()
Specified by:
destroy in interface IRObjectOperations
Specified by:
destroy in class IRObject