The JAXR Packages

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

Java APIs for XML Kick Start
By Aoyon Chowdhury, Parag Choudhary

Table of Contents
Chapter 9.  Registry Fundamentals


The JAXR API comes in two packages:

  • The javax.xml.registry.infomodel package

  • The javax.xml.registry package

The javax.xml.registry.infomodel Package

The javax.xml.registry.infomodel package contains the interfaces that represent the information model followed by JAXR. The information model resembles the ebXML information model, with additional enhancements to support the UDDI specification.

The javax.xml.registry.infomodel Interfaces

The interfaces of the javax.xml.registry.infomodel are described in the following list:

  • RegistryObject The RegistryObject interface is the basic interface extended by the other interfaces of the JAXR information model, such as Association, Classification, Organization, and so on. RegistryObject can have several attributes, such as its classification, associations, and so on. RegistryObject provides several methods with which you can add and get such metadata information about a registry object.

  • Association The Association interface represents the association of a RegistryObject instance with another RegistryObject instance. For example, consider two ClassificationScheme instances, where one instance supercedes the other. In this case, the newer ClassificationScheme instance, called the source object, will have a supercedes association type with the older ClassificationScheme instance, called the target object.

  • AuditableEvent The instances of the AuditableEvent interface provide a mechanism to maintain an audit trail of registry objects. An AuditableEvent instance can be created when a JAXR client creates, updates, deletes, or deprecates a registry object. A complete audit trail for a registry object can be obtained by using the collection of AuditableEvent instances associated with the RegistryObject instance.

    It is important to note that all the methods defined in this interface are level 1 methods. Therefore, these methods cannot be invoked on a UDDI registry.

  • Classification The Classification interface is used to classify the instances of registry objects, such as by industry, product, and geographical location. A registry object can have more than one classification instance associated with it.

  • ClassificationScheme A ClassificationScheme instance represents a taxonomy used to classify or categorize RegistryObject instances. A taxonomy is an orderly classification of objects according to their presumed natural relationships. For example, the North American Industry Classification System (NAICS) is a classification scheme used to classify businesses and services to which they belong.

    The ClassificationSchemes (also called taxonomies) can be either internal or external to the registries. A ClassificationScheme that is internal to the registry is called an Internal Taxonomy, and one external to the registry is called an External Taxonomy.

  • Concept The Concept instance represents a notion that could be anything. One use of the Concept interface is to represent the ClassificationScheme (or taxonomy) elements and their structural relationship with each other in order to describe an internal taxonomy.

    The Concept interface is used to create a tree structure in which the ClassificationScheme is the root of the tree, and each node of the tree is a Concept instance. For example, consider the Geography classification scheme. In this, Geography will be the root of the tree, and the continents such as Asia and Europe would be instances of the Concept instance.

  • EmailAddress As the name suggests, the EmailAddress interface represents the email address.

  • Slot The Slot interface provides a way to dynamically add attributes to a registry object at runtime.

  • ExtensibleObject The ExtensibleObject interface enables the registry objects to be extensible in nature. The methods provided by this interface enable a registry object to add, delete, or query for slots. This interface is extended by almost all the interfaces of the JAXR information model.

  • ExternalIdentifier The ExternalIdentifier interface is a mechanism to provide identification information to a registry object. Examples of identifications include Social Security number, DUNS number, and so on.

  • ExternalLink The ExternalLink interface provides a mechanism to associate external content with a registry object. The external content is essentially a URI that can be set and accessed by using the methods of this interface.

  • ExtrinsicObject The ExtrinsicObject interface represents the metadata for a repository item about which the registry might not have any prior knowledge. Examples of such items include a WSDL document, or an XML schema document.

    It is important to note that all the methods defined in this interface are level 1 methods. Therefore, these methods cannot be invoked on a UDDI registry.

  • InternationalString The InternationalString interface is used to provide internationlization support for the String type. An instance of the InternationalString interface contains a collection of LocalizedString interfaces, which in turn contain a String value that is specific to a particular Locale and character set.

  • Key The Key interface represents a unique key identifying a registry object. This key is normally created by the registry, and is returned after the organization is submitted to the registry.

  • LocalizedString The LocalizedString interface is a wrapper interface that associates a String with a Locale and character set. This interface is used by the InternationalString interface.

  • Organization The Organization interface models the information about an organization that is submitting data to the registry. An Organization instance may have address and contact attributes.

  • PersonName The PersonName interface models the name of a person.

  • PostalAddress The PostalAddress interface provides the mechanism to store and access the postal address information. The PostalAddress interface is a reusable entity. At the time of this writing, this interface is used to provide information for a User and an Organization.

  • RegistryEntry Some objects in the registry need to store additional metadata over and above what can be stored using the RegistryObject interface. Such objects are modeled using the RegistryEntry interface. Examples of additional metadata include version information and a stability indicator for the information.

  • RegistryPackage The RegistryPackage interface represents a group of logically related registry objects. A registry object can be a member of any number of packages, and a package can contain any number of registry objects.

  • Service The Service interface models the BusinessService datastructure as described in the UDDI specification. This interface provides information on services, such as Web services offered by an Organization.

  • ServiceBinding The ServiceBinding interface models the BindingTemplate datastructure as described in the UDDI specification. This interface represents the technical information on a specific way to access a specific interface offered by the Service instance. This interface can have multiple SpecificationLink interfaces.

  • SpecificationLink The SpecificationLink interface provides a mechanism to link between a ServiceBinding and one of its technical specifications that describes how to use the service using ServiceBindings. For example, a SpecificationLink instance might describe how to access a Web service using a WSDL document.

  • TelephoneNumber The TelephoneNumber interface models a telephone number.

  • User The User interface provides information about the registered users of the registry. A User is always affiliated with an Organization.

  • Versionable The Versionable interface models the behavior common to those classes that can create versions of their instances.

    It is important to note that all the methods defined in this interface are level 1 methods. Therefore, none of these methods can be invoked on a UDDI registry.

The javax.xml.registry Package

The javax.xml.registry package contains 14 interfaces, 1 class, and 7 exceptions with which you can manage and query data in a registry.

The javax.xml.registry Interfaces

The interfaces of the javax.xml.registry package are described in the following list:

  • BulkResponse The BulkResponse interface is returned by several methods; these methods perform an operation with a collection of objects and also return a collection of objects. For example, the saveObjects method of the LifeCycleManager interface that saves data to the registry returns a BulkResponse.

  • BusinessLifeCycleManager The BusinessLifeCycleManager interface defines several methods with which you can create and manage some high-level interfaces of the information model. These interfaces are Organization, Service, ServiceBinding, and Concept.

    It is important to note that the BusinessLifeCycleManager interface is similar in terms of functionality to LifeCycleManager interface, but is provided separately for the convenience of UDDI developers. This interface is similar to the Publisher API of UDDI.

  • BusinessQueryManager The BusinessQueryManager interface defines several methods that provide the capability to query for the high-level interfaces of an information model. These interfaces are Organization, Service, ServiceBinding, and Concept.

  • CapabilityProfile The CapabilityProfile interface defines the methods with which an application can determine whether a JAXR provider is level 0- or level 1-compliant.

  • CataloguedObject The CataloguedObject interface is a wrapper interface. It wraps the RegistryEntry object and the RepositoryItem that it catalogues.

  • Connection The Connection interface represents the session of a JAXR client with a registry such as UDDI by using a JAXR provider. This interface defines several methods with which an application can determine the state information for a specific connection.

  • DeclarativeQueryManager The DeclarativeQueryManager interface defines methods with which an application can use a declarative query language to query on a registry. At the time of this writing, the only supported declarative query languages are SQL-92 and OASIS ebXML Registry Filter Queries.

  • Federation The Federation interface is a special implementation of the Connection interface. This interface defines a single connection to multiple registry providers. The Federation connection is used to perform a query on multiple registry providers while treating them as a single logical registry provider.

  • FindQualifier The FindQualifier interface defines several constants that identify behaviors that affect the behavior of the find methods. For example, the constant SORT_BY_NAME_ASC will ensure that the data returned by find methods is in ascending order.

  • JAXRResponse The JAXRResponse interface represents the response of any JAXR request.

  • LifeCycleManager The LifeCycleManager interface provides the necessary methods to create and manage data in a registry.

  • Query The Query interface encapsulates a query in a declarative query language, such as SQL.

  • QueryManager QueryManager provides a common base interface for the other two query managers: BusinessQueryManager and DeclarativeQueryManager.

  • RegistryService The RegistryService interface is the main interface implemented by a JAXR provider. This interface provides a number of get methods with which a JAXR client can find out the various capability-specific interfaces implemented by the JAXR provider.

The javax.xml.registry Class

The javax.xml.registry package contains the abstract base class ConnectionFactory, which is a factory class for enabling a JAXR client to connect to a JAXR provider.

The javax.xml.registry Exceptions

The exceptions of the javax.xml.registry package are described in the following list:

  • InvalidRequestException InvalidRequestException is thrown when a JAXR client attempts to invoke an invalid API method.

  • JAXRException JAXRException is the parent exception class. This exception represents all JAXR-related exceptions.

  • UnexpectedObjectException UnexpectedObjectException is thrown when the object passed on as a parameter to a method call is of an invalid type. For example, UnexpectedObjectException is raised if an application passes a collection of organization objects to the saveServiceBindings method, instead of the required collection of bindings objects.

  • UnsupportedCapabilityException UnsupportedCapabilityException is raised whenever a JAXR client tries to invoke a method not supported by the CapabilityProfile implemented by the JAXR provider. For example, the UDDI registries do not support the notion of majorversion and minorversion. Therefore, the UnsupportedCapabilityException is raised if an application tries to invoke the setMajorVersion method on a UDDI registry.

  • DeleteException DeleteException is raised if a problem is encountered when deleting a registry object.

  • FindException FindException is raised when an error is encountered while trying to query a registry.

  • SaveException SaveException is raised when an error is encountered while trying to save data to a registry.


printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
Top

[0672324342/ch09lev1sec7]

 
 


JavaT APIs for XML Kick Start
JAX: Java APIs for XML Kick Start
ISBN: 0672324342
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net