org.norther.tammi.root.castor
Class Repository

java.lang.Object
  extended by org.norther.tammi.root.castor.Repository

public class Repository
extends Object

A repository for XML marshalling/unmarshalling.

Author:
Ilkka Priha

Constructor Summary
Repository(URL config, File repo)
          Constructs a new repository.
Repository(URL config, File repo, int c)
          Constructs a new repository with initial capacity
Repository(URL config, File repo, int c, int rl)
          Constructs a new repository with initial capacity and a record length.
 
Method Summary
 void closeRepository()
          Closes the repository.
 boolean equals(Object obj)
           
 org.exolab.castor.mapping.Mapping getMapping()
          Gets the XML mapping.
 RecordAccessFile getRepository()
          Gets the repository file.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Repository

public Repository(URL config,
                  File repo)
Constructs a new repository.

Parameters:
config - the configuration URL.
repo - the repository file.

Repository

public Repository(URL config,
                  File repo,
                  int c)
Constructs a new repository with initial capacity

Parameters:
config - the configuration URL.
repo - the repository file.
c - the capacity.

Repository

public Repository(URL config,
                  File repo,
                  int c,
                  int rl)
Constructs a new repository with initial capacity and a record length.

Parameters:
config - the configuration URL.
repo - the repository file.
c - the capacity.
rl - the record length.
Method Detail

getMapping

public org.exolab.castor.mapping.Mapping getMapping()
                                             throws IOException,
                                                    ConstructionException
Gets the XML mapping.

Returns:
the XML mapping.
Throws:
IOException - on I/O errors.
ConstructionException - on parsing errors.

getRepository

public RecordAccessFile getRepository()
                               throws IOException
Gets the repository file.

Returns:
the repository file.
Throws:
IOException - on errors.

closeRepository

public void closeRepository()
Closes the repository.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2004 The Norther Organization. All rights reserved.