Participant server which process documents for commerce in trading partner networks6226675Abstract Participant servers in a network of customers, suppliers and other trading partners exchange machine readable documents. The participants in the network use self defining electronic documents, such as XML based documents, which can be easily understood amongst the partners. Definitions of the electronic business documents, called business interface definitions, are posted on the Internet, or otherwise communicated to members of the network. The business interface definitions tell potential trading partners the services the company offers and the documents to use when communicating with such services. Thus, a typical business interface definition allows a customer to place an order by submitting a purchase order or a supplier checks availability by downloading an inventory status report. Participants are programmed by the composition of the input and output documents, coupled with interpretation information in a common business library, to handle the transaction in a way which closely parallels the way in which paper based businesses operate. Claims What is claimed is: Description COPYRIGHT NOTICE
<!DOCTYPE SCHEMA SYSTEM "bidl.dtd">
<SCHEMA>
<H1>Market Participant Sample BID</H1>
<META
WHO.OWNS="Veo Systems" WHO.COPYRIGHT="VeoSystems"
WHEN.COPYRIGHT="1998" DESCRIPTION="Sample BID"
WHO.CREATED="*" WHEN.CREATED="*"
WHAT.VERSION="*" WHO.MODIFIED="*"
WHEN.MODIFIED="*" WHEN.EFFECTIVE="*"
WHEN.EXPIRES="*" WHO.EFFECTIVE="*"
WHO.EXPIRES="*">
</META>
<PROLOG> <XMLDECL STANDALONE="no"></XMLDECL> <DOCTYPE NAME="market.participant"> <SYSTEM>markpart.dtd</SYSTEM></DOCTYPE> <PROLOG> <DTD NAME="markpart.dtd"> <H2>Market Participant</H2> <H3>Market Participant</H3> <ELEMENTTYPE NAME="market.participant"> <EXPLAIN><TITLE>A Market Participant</TITLE> <SYNOPSIS>A business or person and its service interfaces.</SYNOPSIS> <P>A market participant is a document definition that is created to describe a business and at least one person with an email address, and it presents a set of pointers to service interfaces located on the network. In this example, the pointers have been resolved and the complete BID is presented here.</P></EXPLAIN> <MODEL><CHOICE> <ELEMENT NAME="business"></ELEMENT> <ELEMENT NAME="person"></ELEMENT> </CHOICE></MODEL></ELEMENTTYPE> <H3>Party Prototype</H3> <PROTOTYPE NAME="party"> <EXPLAIN><TITLE>The Party Prototype</TITLE></EXPLAIN> <MODEL><SEQUENCE> <ELEMENT NAME="party.name" OCCURS="+"></ELEMENT> <ELEMENT NAME="address.set"></ELEMENT> </SEQUENCE></MODEL> </PROTOTYPE> <H3>Party Types</H3> <ELEMENTTYPE NAME="business"> <EXPLAIN><TITLE>A Business</TITLE> <SYNOPSIS>A business (party) with a business number attribute.<SYNOPSIS> <P>This element inherits the content model of the party prototype and adds a business number attribute, which serves as a key for database lookup. The business number may be used as a cross-reference to/from customer id, credit limits, contacts lists, etc.</P></EXPLAIN> <EXTENDS HREF="party"> <ATTDEF NAME="business.number"><REQUIRED></REQUIRED></ATTDEF> </EXTENDS> </ELEMENTTYPE> <H3>Person Name</H3> <ELEMENTTYPE NAME="person"> <EXPLAIN><TITLE>A Person</TITLE></EXPLAIN> <EXTENDS HREF="party"> <ATTDEF NAME="SSN"><IMPLIED></IMPLIED></ATTDEF> </EXTENDS> </ELEMENTTYPE> <H3>Party Name</H3> <ELEMENTTYPE NAME="party.name"> <EXPLAIN><TITLE>A Party's Name</TITLE> <SYNOPSIS>A party's name in a string of character.</SYNOPSIS></EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>Address Set</H3> <ELEMENTTYPE NAME="address.set"> <MODEL><SEQUENCE> <ELEMENT NAME="address.physical"></ELEMENT> <ELEMENT NAME="telephone" OCCURS="*"></ELEMENT> <ELEMENT NAME="fax" OCCURS="*"></ELEMENT> <ELEMENT NAME="email" OCCURS="*"></ELEMENT> <ELEMENT NAME="internet" OCCURS="*"></ELEMENT> </SEQUENCE></MODEL> </ELEMENTTYPE> <H3>Physical Address</H3> <ELEMENTTYPE NAME="address.physical"> <EXPLAIN><TITLE>Physical Address</TITLE> <SYNOPSIS>The street address, city, state, and zip code.</SYNOPSIS></EXPLAIN> <MODEL><SEQUENCE> <ELEMENT NAME="street"></ELEMENT> <ELEMENT NAME="city"></ELEMENT> <ELEMENT NAME="state">/ELEMENT> <ELEMENT NAME="postcode" OCCURS="?"></ELEMENT> <ELEMENT NAME="country"></ELEMENT> </SEQUENCE></MODEL> </ELEMENTTYPE> <H3>Street</H3> <ELEMENTTYPE NAME="street"> <EXPLAIN><TITLE>Street Address</TITLE> <SYNOPSIS>Street or postal address.</SYNOPSIS></EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>City</H3> <ELEMENTTYPE NAME="city"> <EXPLAIN><TITLE>City Name or Code</TITLE> <P>The city name or code is a string that contains sufficient information to identify a city within a designated state.</P> </EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>State</H3> <ELEMENTTYPE NAME="state"> <EXPLAIN><TITLE>State, Province or Prefecture Name or Code</TITLE> <P>The state name or code contains sufficient information to identify a state within a designated country.</P></EXPLAIN> <MODEL><STRING DATATYPE="COUNTRY.US.SUBENTITY"></STRING></MODEL> </ELEMENTTYPE> <H3>Postal Code</H3> <ELEMENTTYPE NAME="postcode"> <EXPLAIN><TITLE>Postal Code</TITLE> <P>A postal code is an alphanumeric code, designated by an appropriate postal authority, that is used to identify a location or region within the jurisdiction of that postal authority. Postal authorities include designated national postal authorities.</P></EXPLAIN> <MODEL><STRING DATATYPE="string"></STRING></MODEL> </ELEMENTTYPE> <H3>Country</H3> <ELEMENTTYPE NAME="country"> <EXPLAIN><TITLE>Country Code</TITLE> <P>A country code is a two-letter code, designated by ISO, that is used to uniquely identify a country.</P></EXPLAIN> <MODEL><STRING DATATYPE="country"></STRING></MODEL> </ELEMENTTYPE> <H3>Network Addresses</H3> <ELEMENTTYPE NAME="telephone"> <EXPLAIN><TITLE>Telephone Number</TITLE> <P>A telephone number is a string of alphanumerics and punctuation that uniquely identifies a telephone service terminal, including extension number.</P></EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>Fax</H3> <ELEMENTTYPE NAME="fax"> <EXPLAIN><TITLE>Fax Number</TITLE> <P>A fax number is a string of alphanumerics and punctuation that uniquely identifies a fax service terminal.</P> </EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>Email</H3> <ELEMENTTYPE NAME="email"> <EXPLAIN><TITLE>Email Address</TITLE> <P>An email address is a datatype-constrained string that uniquely identifies a mailbox on a server.</P></EXPLAIN> <MODEL><STRING DATATYPE="email"></STRING></MODEL> </ELEMENTTYPE> <H3>Internet Address</H3> <ELEMENTTYPE NAME="internet"> <EXPLAIN><TITLE>Internet Address</TITLE> <P>An Internet address is a datatype-constrained string that uniquely identifies a resource on the Internet by means of a URL.</P></EXPLAIN> <MODEL><STRING DATATYPE="url"></STRING></MODEL> </ELEMENTTYPE> </DTD> </SCHEMA> Service Description Sample
<!DOCTYPE SCHEMA SYSTEM "bidl.dtd">
<SCHEMA>
<H1>Service Description Sample BID</H1>
<META
WHO.OWNS="Veo Systems" WHO.COPYRIGHT="VeoSystems"
WHEN.COPYRIGHT="1998" DESCRIPTION="Sample BID"
WHO.CREATED="*" WHEN.CREATED="*"
WHAT.VERSION="*" WHO.MODIFIED="*"
WHEN.MODIFIED="*" WHEN.EFFECTIVE="*"
WHEN.EXPIRES="*" WHO.EFFECTIVE="*"
WHO.EXPIRES="*">
</META>
<PROLOG> <XMLDECL STANDALONE="no"></XMLDECL> <DOCTYPE NAME="service"> <SYSTEM>service.dtd</SYSTEM></DOCTYPE> </PROLOG> <DTD NAME="service.dtd"> <H2>Services</H2> <H3>Includes</H3> <!--INCLUDE><SYSTEM>comments.bim</SYSTEM></INCLUDE--> <H3>Service Set</H3> <ELEMENTTYPE NAME="service.set"> <EXPLAIN><TITLE>Service Set</TITLE> <SYNOPSIS>A set of services.</SYNOPSIS></EXPLAIN> <MODEL> <ELEMENT NAME="service" OCCURS="+"></ELEMENT> </MODEL></ELEMENTTYPE> <H3>Services Prototype</H3> <PROTOTYPE NAME="prototype.service"> <EXPLAIN><TITLE>Service</TITLE></EXPLAIN> <MODEL><SEQUENCE> <ELEMENT NAME="service.name"></ELEMENT> <ELEMENT NAME="service.terms" OCCURS="+"></ELEMENT> <ELEMENT NAME="service.location" OCCURS="+"></ELEMENT> <ELEMENT NAME="service.operation" OCCURS="+"></ELEMENT> </SEQUENCE></MODEL> <!--ATTGROUP><IMPLEMENTS HREF="common.attrib"></IMPLEMENTS></ATTGROUP--> </PROTOTYPE> <H3>Service</H3> <INTRO><P>A service is an addressable network resource that provides interfaces to specific operations by way of input and output documents.</P></INTRO> <ELEMENTTYPE NAME="service"> <EXPLAIN><TITLE>Service</TITLE> <P>A service is defined in terms of its name, the location(s) at which the service is available, and the operation(s) that the service performs.</P></EXPLAIN> <MODEL><SEQUENCE> <ELEMENT NAME="service.name"></ELEMENT> <ELEMENT NAME="service.location"></ELEMENT> <ELEMENT NAME="service.operation" OCCURS="+"></ELEMENT> <ELEMENT NAME="service.terms"></ELEMENT> </SEQUENCE></MODEL> </ELEMENTTYPE> <H3>Service Name</H3> <ELEMENTTYPE NAME="service.name"> <EXPLAIN><TITLE>Service Name</TITLE> <P>The service name is a human-readable string that ascribes a moniker for a service. It may be employed is user interfaces and documentation, or for other purposes.</P></EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>Service Location</H3> <ELEMENTTYPE NAME="service.location"> <EXPLAIN><TITLE>Service Location</TITLE> <SYNOPSIS>A URI of a service.</SYNOPSIS> <P>A service location is a datatype-constrained string that locates a service on the Internet by means of a URI.</P></EXPLAIN> <MODEL><STRING DATATYPE="url"></STRING></MODEL> </ELEMENTTYPE> <H3>Service Operations</H3> <INTRO><P>A service operation consists of a name, location and its interface, as identified by the type of input document that the service operation accepts and by the type of document that it will return as a result.</P></INTRO> <ELEMENTTYPE NAME="service.operation"> <EXPLAIN><TITLE>Service Operations</TITLE> <P>A service operation must have a name, a location, and at least one document type as an input, with one or more possible document types returned as a result of the operation.</P> </EXPLAIN> <MODEL><SEQUENCE> <ELEMENT NAME="service.operation.name"></ELEMENT> <ELEMENT NAME="service.operation.location"></ELEMENT> <ELEMENT NAME="service.operation.input"></ELEMENT> <ELEMENT NAME="service.operation.output"></ELEMENT> </SEQUENCE></MODEL> </ELEMENTTYPE> <H3>Service Operation Name</H3> <ELEMENTTYPE NAME="service.operation.name"> <EXPLAIN><TITLE>Service Operation Name</TITLE> <P>The service operation name is a human-readable string that ascribes a moniker to a service operation. It may be employed in user interfaces and documentation, or for other purposes.</P></EXPLAIN> <MODEL><STRING></STRING></MODEL> </ELEMENTTYPE> <H3>Service Operation Location</H3> <INTRO><P>The service location is a network resource. That is to say, a URI.</P></INTRO> <ELEMENTTYPE NAME="service.operation.location"> <EXPLAIN><TITLE>Service Operation Location</TITLE> <SYNOPSIS>A URI of a service operation.</SYNOPSIS> <P>A service operation location is a datatype-constrained string that locates a service operation on the Internet by means of a URL.</P></EXPLAIN> <MODEL><STRING DATATYPE="url"></STRING></MODEL> </ELEMENTTYPE> <H3>Service Operation Input Document</H3> <INTRO><P>The input to a service operation is defined by its input document type. That is, the service operation is invoked when the service operation location receives an input document whose type corresponds to the document type specified by this element.</P> <P>Rather than define the expected input and output document types in the market participant document, this example provides pointers to externally-defined BIDs. This allows reuse of the same BID as the input and/or output document type for multiple operations. In addition, it encourages parallel design and implementation.</P></INTRO> <ELEMENTTYPE NAME="service.operation.input"> <EXPLAIN><TITLE>Service Operation Input</TITLE> <SYNOPSIS>Identifies the type of the service operation input document.</SYNOPSIS> <P>Service location input is a datatype-constrained string that identifies a BID on the Internet by means of a URI.</P> </EXPLAIN> <MODEL><STRING DATATYPE="url"></STRING></MODEL> </ELEMENTTYPE> <H3>Service Operation Output Document Type</H3> <INTRO><P>The output of a service operation is defined by its output document type(s). That is, the service operation is expected to emit a document whose type corresponds to the document type specified by this element.</P></INTRO> <ELEMENTTYPE NAME="service.operation.output"> <EXPLAIN><TITLE>Service Operation Output</TITLE> <SYNOPSIS>Identifies the type of the service operation output document.</SYNOPSIS> <P>Service location output is a datatype-constrained string that identifies a BID on the Internet by means of a URI.</P> </EXPLAIN> <MODEL><STRING DATATYPE="url"></STRING></MODEL> </ELEMENTTYPE> <H3>Service Terms</H3> <INTRO><P>This is a simple collection of string elements, describing the terms of an agreement.</P></INTRO> <ELEMENTTYPE NAME="service.terms"> <EXPLAIN><TITLE>Service Terms</TITLE> <SYNOPSIS>Describes the terms of a given agreement.</SYNOPSIS> </EXPLAIN> <MODEL><STRING DATATYPE="string"></STRING></MODEL> </ELEMENTTYPE> </DTD> </SCHEMA> The service DTD schema may be extended with a service type element in a common business language repository as follows: <!ELEMENT service.type EMPTY> <!ATTLIST service.type service.type.name ( catalog.operator .vertline. commercial.directory.operator .vertline. eft.services.provider .vertline. escrower .vertline. fulfillment.service .vertline. insurer .vertline. manufacturer .vertline. market.operator .vertline. order.originator .vertline. ordering.service .vertline. personal.services.provider .vertline. retailer .vertline. retail.aggregator .vertline. schema.resolution.service .vertline. service.provider .vertline. shipment.acceptor .vertline. shipper .vertline. van .vertline. wholesale.aggregator ) #REQUIRED %common.attrib; The service type element above illustrates interpretation information carried by a business interface definition, in this example a content form allowing identification of any one of a list of valid service types. Other interpretation information includes data typing, such as for example the element <H3>Internet Address</H3> including the content form "url" and expressed in the data type "string." Yet other interpretation information includes mapping of codes to elements of a list, such as for example the element <H3>State</H3> including the code mapping for states in the file "COUNTRY.US.SUBENTITY." The service description referred to by the market participant DTD defines the documents that the service accepts and generates upon competition of the service. A basic service description is specified below as a XML document transact.dtd. Transact.dtd models a transaction description, such as an invoice, or a description of an exchange of value. This document type supports many uses, so the transaction description element has an attribute that allows user to distinguish among invoices, performance, offers to sell, requests for quotes and so on. The exchange may occur among more than two parties, but only two are called out, the offeror and the counter party, each of whom is represented by a pointer to a document conforming to the market participant DTD outlined above. The counter party pointer is optional, to accommodate offers to sell. The exchange description is described in the module tranprim.mod listed below, and includes pricing and subtotals. Following the exchange description, charges applying to the transaction as a whole may be provided, and a total charge must be supplied. Thus, the transaction description schema document transact.dtd for this example is set forth below: <!--transact.dtd Version: 1.0 --> <!--Copyright 1998 Veo Systems, Inc. --> . . . <!ELEMENT transaction.description (meta?, issuer.pointer, counterparty.pointer?, exhange.descrption+, general.charges?, net.total?)> <!ATTLIST transaction.description transaction.type (invoice .vertline. pro.forma .vertline. offer.to.sell .vertline. order .vertline. request.for.quote .vertline. request.for.bid .vertline. request.for.proposal .vertline. response.to.request.for.quote .vertline. response.to.request.for.bid .vertline. response.to.request.for.proposal) "invoice" %common.attrib; %altrep.attrib; %ttl. attrib; > Representative market participant, and service DTDs, created according to the definitions above, are as follows: Market Participant DTD <!ELEMENT business (party.name+, address.set)> <!ATTLIST business business.number CDATA #REQUIRED <!ELEMENT party.name (#PCDATA)> <!ELEMENT city (#PCDATA)> <!ELEMENT internet (#PCDATA)> <!ELEMENT country (#PCDATA)> <!ELEMENT state (#PCDATA)> <!ELEMENT email (#PCDATA)> <!ELEMENT address.physical (street, city, state, postcode?, country) > <!ELEMENT telephone (#PCDATA)> <!ELEMENT person (party.name+, address.set) > <!ATTLIST person SSN CDATA #IMPLIED> <!ELEMENT fax (#PCDATA)> <!ELEMENT street (#PCDATA)> <!ELEMENT address.set (address.physical, telephone*, fax*, email*, internet*) > <!ELEMENT postcode (#PCDATA)> <!ELEMENT market.participant (business .vertline. person) > Service DTD <!ELEMENT service.location (#PCDATA)> <!ELEMENT service.terms (#PCDATA)> <!ELEMENT service.operation.name (#PCDATA)> <!ELEMENT service.operation (service.operation.name, service.operation.location, service.operation.input, service.operation.output) > <!ELEMENT service (service.name, service.location, service.operation+, service.terms) > <!ELEMENT service.operation.input (#PCDATA)> <!ELEMENT service.operation.location (#PCDATA)> <!ELEMENT service.name (#PCDATA)> <!ELEMENT service.set (service+)> <!ELEMENT service.operation.output (#PCDATA)> One instance of a document produced according to the transact.dtd follows: <?xml version="1.0"?> <!-- rorder.xml Version: 1.0 --> <!-- Copyright 1998 Veo Systems, Inc. --> <!DOCTYPE transaction.description SYSTEM "urn:x-veosystems:dtd:cbl:transact: 1.0:> <transaction.description transaction.type="order"> <meta> <urn?urn:x-veosystems:doc:00023 </urn> <thread.id party.assigned.by="reqorg">FRT876 </thread.id> </meta> <issuer.pointer> <xll.locator urllink="reqorg.xml">Customer Pointer </xll.locator> </issuer.pointer> <counterparty.pointer> <xll.locator urllink="compu.xml">Catalog entry owner pointer </xll.locator> </counterparty.pointer> <exchange.description> <line.item> <product.instance> <product.description.pointer> <xll.locator urllink="cthink.xml">Catalogue Entry Pointer </xll.locator> </product.description.pointer> <product.specifics> <info.description.set> <info.description> <xml.descriptor> <doctype> <dtd system.id="urn:x-veosystems:dtd:cbl:gprod: 1.0 "/> </doctype> <xml.descriptor.details> <xll.xptr.frag>DESCENDANT(ALL,os)STRING("Windows 95") </xll.xptr.frag> <xll.xptr.frag>DECENDANT(ALL,p.speed)STRING("200") </xll.xptr.frag> <xll.xptr.frag>DESCENDANT(ALL,hard.disk.capacity) STRING("4") </xll.xptr.frag> <xll.xptr.frag>DESCENDANT(ALL,d.size)STRING("14.1") </xll.xptr.frag> </xml.descriptor.details> </xml.descriptor> </info.description> </info.description.set> </product.specifics> <quantity>1 </quantity> </product.instance> <shipment.coordinates.set> <shipment.coordinates> <shipment.destination> <address.set> <address.named>SW-1 </address.named> <address.physical> <building.sublocation>208C</building.sublocation> <location.in.street>123 </location.in.street> <street>Frontage Rd. </street> <city>Beltway </city> <country.subentity.us country.subentity.us.name="MD"/> <postcode>20000 </postcode> </address.physical> <telephone> <telephone.number>617-666-2000 </telephone.number> <telephone.extension>1201 </telephone.extension> </telephone> </address.set> </shipment.destination> <shipment.special>No deliveries after 4 PM</shipment.special> </shipment.coordinates> </shipment.coordinates.set> <payment.set> <credit.card issuer.name="VISA" instrument.number="3787-812345-67893" expiry.date="12/97" currency.code="USD"/> <amount.group> <amount.monetary currency.code="USD">3975 </amount.monetary> </amount.group> </payment.set> </line.item> </exchange.description> </transaction.description> Accordingly, the present invention provides a technique by which a market participant is able to identify itself, and identify the types of input documents and the types of output documents with which it is willing to transact business. The particular manner in which the content carried in such documents is processed by the other parties to the transaction, or by the local party, is not involved in establishing a business relationship nor carrying out transactions. FIG. 3 provides a simplified view of a participant node in the network according to the present invention. The node illustrated in FIG. 3 includes a network interface 300 which is coupled to a communication network on port 301. The network interface is coupled to a document parser 301. The parser 301 supplies the logical structures from an incoming document to a translator module 302, which provides for translating the incoming document into a form usable by the host transaction system, and vice versa translating the output of host processes into the format of a document which matches the output document form in the business interface definition for transmission to a destination. The parser 301 and translator 302 are responsive to the business interface definition stored in the participant module 303. The output data structures from the translator 302 are supplied to a transaction process front end 304 along with events signaled by the parser 301. The front end 304 in one embodiment consists of a JAVA virtual machine or other similar interface adapted for communication amongst diverse nodes in a network. The transaction processing front end 304 responds to the events indicated by the parser 301 and the translator 302 to route the incoming data to appropriate functions in the enterprise systems and networks to which the participant is coupled. Thus, the transaction process front end 304 in the example of FIG. 3 is coupled to commercial functions 305, database functions 306, other enterprise functions such as accounting and billing 307, and to the specific event listeners and processors 308 which are designed to respond to the events indicated by the parser. The parser 301 takes a purchase order like that in the example above, or other document, specified according to the business interface definition and creates a set of events that are recognized by the local transaction processing architecture, such as a set of JAVA events for a JAVA virtual machine. The parser of the present invention is uncoupled from the programs that listen for events based on the received documents. Various pieces of mark-up in a received document or a complete document meeting certain specifications serve as instructions for listening functions to start processing. Thus listening programs carry out the business logic associated with the document information. For example, a program associated with an address element may be code that validates the postal code by checking the database. These listeners subscribe to events by registering with a document router, which directs the relevant events to all subscribers who are interested in them. For example, the purchase order specified above may be monitored by programs listening for events generated by the parser, which would connect the document or its contents to an order entry program. Receipt of product descriptions within the purchase order, might invoke a program to check inventory. Receipt of address information within the purchase order, would then invoke a program to check availability of services for delivery. Buyer information fields in the document, could invoke processes to check order history for credit worthiness or to offer a promotion or similar processing based on knowing the identity of the consumer. Complex listeners can be created as configurations of primitive ones. For example, a purchase order listener may contain and invoke the list listeners set out in the previous paragraph, or the list members may be invoked on their own. Note that the applications that the listeners run are unlikely to be native XML processes or native JAVA processes. In these cases, the objects would be transformed into the format required by the receiving trans application. When the application finishes processing, its output is then transformed back to the XML format for communication to other nodes in the network. It can be seen that the market participant document type description, and the transaction document type description outlined above include a schematic mapping for logic elements in the documents, and include mark-up language based on natural language. The natural language mark-up, and other natural language attributes of XML facilitate the use of XML type mark-up languages for the specification of business interface definitions, service descriptions, and the descriptions of input and output documents. The participant module 303 in addition to storing the business interface definition includes a compiler which is used to compile objects or other data structures to be used by the transaction process front end 304 which corresponds to the logical structures in the incoming documents, and to compile the translator 302. Thus, as the business interface definition is modified or updated by the participant as the transactions with which the participant is involved change, the translator 302 and parser 301 are automatically kept up to date. In a preferred system, the set of JAVA events is created by a compiler which corresponds to the grove model of SGML, mainly the standard Element Structure Information Set augmented by the "property set" for each element. International Standard ISO/IEC 10179:1996 (E), Information Technology--Processing Languages--Document Style Semantics and Specification Language (DSSSL). Turning the XML document into a set of events for the world to process contrasts with the normal model of parsing in which the parser output is maintained as an internal data structure. By translating the elements of the XML document into JAVA events or other programming structures that are suitable for use by the transaction processing front end of the respective nodes enables rich functionality at nodes utilizing the documents being traded. Thus, the transaction process front end 304 is able to operate in a publish and subscribe architecture that enables the addition of new listener programs without the knowledge of or impact on other listening programs in the system. Each listener, 305, 306, 307, 308 in FIG. 3, maintains a queue in which the front end 304 directs events. This enables multiple listeners to handle events in parallel at their own pace. Furthermore, according to the present invention the applications that the listeners run need not be native XML functions, or native functions which match the format of the incoming document. Rather, these listeners may be JAVA functions, if the transaction process front end 304 is a JAVA interface, or may be functions which run according to a unique transaction processing architecture. In these cases, the objects would be transformed into the format required by the receiving application. When the application of the listener finishes, its output is then transformed back into the format of a document as specified by the business interface definition in the module 303. Thus, the translator 302 is coupled to the network interface 300 directly for supplying the composed documents as outputs. The listeners coupled to the transaction processing front end may include listeners for input documents, listeners for specific elements of the input documents, and listeners for attributes stored in particular elements of the input document. This enables diverse and flexible implementations of transaction processes at the participant nodes for filtering and responding to incoming documents. FIG. 4 illustrates a process of receiving and processing an incoming document for the system of FIG. 3. Thus, the process begins by receiving a document at the network interface (step 400). The parser identifies the document type (401) in response to the business interface definition. Using the business interface definition, which stores a DTD for the document in the XML format, the document is parsed (step 402). Next, the elements and attributes of the document are translated into the format of the host (step 403). In this example, the XML logic structures are translated into JAVA objects which carry the data of the XML element as well as methods associated with the data such as get and set functions. Next, the host objects are transferred to the host transaction processing front end (step 404). These objects are routed to processes in response to the events indicated by the parser and the translator. The processes which receive the elements of the document are executed and produce an output (step 405). The output is translated to the format of an output document as defined by the business interface definition (step 406). In this example, the translation proceeds from the form of a JAVA object to that of an XML document. Finally, the output document is transmitted to its destination through the network interface (step 407). FIG. 5 is a more detailed diagram of the event generator/event listener mechanism for the system of FIG. 3. In general the approach illustrated in FIG. 5 is a refinement of the JAVA JDK 1.1 event model. In this model, three kinds of objects are considered. A first kind of object is an event object which contains information about the occurrence of an event. There may be any number of kinds of event objects, corresponding to all the different kinds of events which can occur. A second kind of object is an Event generator, which monitors activity and generates event objects when something happens. Third, event listeners, listen for event objects generated by event generators. Event listeners generally listen to specific event generators, such as for mouse clicks on a particular window. Event listeners call an "ADD event listener" method on the event generator. This model can be adapted to the environment of FIG. 3 in which the objects are generated in response to parsing and walking a graph of objects, such as represented by an XML document. The system illustrated in FIG. 5 includes a generic XML parser 500. Such parser can be implemented using a standard call back model. When a parsing event occurs, the parser calls a particular method in an application object, passing in the appropriate information in the parameters. Thus a single application 501 resides with the parser. The application packages the information provided by the parser in an XML event object and sends it to as many event listeners as have identified themselves, as indicated by the block 502. The set of events 502 is completely parser independent. The events 502 can be supplied to any number of listeners and any number of threads on any number of machines. The events are based on the element structure information set ESIS in one alternative. Thus, they consist of a list of the important aspects of a document structure, such as the starts and ends of elements, or of the recognition of an attribute. XML (and SGML) parsers generally use the ESIS structure as a default set of information for a parser to return to its application. A specialized ESIS listener 503 is coupled to the set of events 502. This listener 503 implements the ESIS listener API, and listens for all XML events from one or more generators. An element event generator 504 is a specialized ESIS listener which is also an XML event generator. Its listeners are objects only interested in events for particular types of elements. For example in an HTML environment, the listener may only be interested in ordered lists, that is only the part of the document between the <OL> and </OL>tags. For another example, a listener may listen for "party.name" elements, or for "service.name" elements according to the common business language, from the example documents above, process the events to ensure that the elements carry data that matches the schematic mapping for the element, and react according to the process needed at the receiving node. This allows the system to have small objects that listen for particular parts of the document, such as one which only adds up prices. Since listeners can both add and remove themselves from a generator, there can be a listener which only listens to for example the <HEAD> part of an HTML document. Because of this and because of the highly recursive nature of XML documents, it is possible to write highly targeted code, and to write concurrent listeners. For example, an <OL> listener can set up an <LI> listener completely separate from the manner in which the <UL> (unordered list) listener sets up its <LI> listener. Alternatively, it can create a listener which generates a graphic user interface and another which searches a database using the same input. Thus, the document is treated as a program executed by the listeners, as opposed to the finished data structure which the application examines one piece at a time. If an application is written this way, it is not necessary to have the entire document in memory to execute an application. The next listener coupled to the set of events 502 is an attribute filter 505. The attribute filter 505 like the element filter 504 is an attribute event generator according to the ESIS listener model. The listener for an attribute filter specifies the attributes it is interested in, and receives events for any element having that attribute specified. So for example, a font manager might receive events only for elements having a font attribute, such as the <P FONT="Times Roman"/P>. The element event generator 504 supplies such element objects to specialize the element listeners 504A. The attribute event generator 505 supplies the attribute event objects to attribute listeners 505A. Similarly, the attribute objects are supplied to a "architecture" in the sense of an SGML/XML transformation from one document type to another using attributes. Thus the architecture of 505B allows a particular attribute with a particular name to be distinguished. Only elements with that attribute defined become part of the output document, and the name of the element in the output document is the value of the attribute in the input document. For example, if the architecture 505B is HTML, the string: <PURCHASES HTML="OL"><ITEM HTML="LI"><NAME HTML="B">STUFF</NAME><PRICE HTML="B">123</PRICE></ITEM></PURCHASES> translates into: <OL><LI><B>STUFF</B><B>123</B></LI></OL> which is correct HTML. The next module which is coupled to the set of events 502 is a tree builder 506. The tree builder takes a stream of XML events and generates a tree representation of the underlying document. One preferred version of the tree builder 506 generates a document object model DOM object 507, according to the specification of the W3C (See, http://www.w3.org/TR/1998/WD-DOM-19980720/introduction.html). However listeners in event streams can be used to handle most requirements, a tree version is useful for supporting queries around a document, reordering of nodes, creation of new documents, and supporting a data structure in memory from which the same event stream can be generated multiple times, for example like parsing the document many times. A specialized builder 508 can be coupled to the tree builder 506 in order to build special subtrees for parts of the document as suits a particular implementation. In addition to responses to incoming documents, other sources of XML events 502 can be provided. Thus, an event stream 510 is generated by walking over a tree of DOM objects and regenerating the original event stream created when the document was being parsed. This allows the system to present the appearance that the document is being parsed several times. The idea of an object which walks a tree and generates a stream of events can be generalize beyond the tree of DOM objects, to any tree of objects which can be queried. Thus, a JAVA walker 512 may be an application which walks a tree of JAVA bean components 513. The walker walks over all the publicly accessible fields and methods. The walker keeps track of the objects it has already visited to ensure that it doesn't go into an endless cycle. JAVA events 514 are the type of events generated by the JAVA walker 512. This currently includes most of the kinds of information one can derive from an object. This is the JAVA equivalent of ESIS and allows the same programming approach applied to XML to be applied to JAVA objects generally, although particularly to JAVA beans. The JAVA to XML event generator 515 constitutes a JAVA listener and a JAVA event generator. It receives the stream of events 514 from the JAVA walker 512 and translates selected ones to present a JAVA object as an XML document. In the one preferred embodiment, the event generator 515 exploits the JAVA beans API. Each object seen becomes an element, with the element name the same as the class name. Within that element, each embedded method also becomes an element whose content is the value returned by invoking the method. If it is an object or an array of objects, then these are walked in turn. FIG. 6 outlines a particular application built on the framework of FIG. 5. This application takes in an XML document 600 and applies it to a parser/generator 601. ESIS events 602 are generated and supplied to an attribute generator 603 and tree builder 604. The attribute generator corresponds to the generator 505 of FIG. 5. It supplies the events to the "architecture" 505B for translating the XML input to an HTML output for example. These events are processed in parallel as indicated by block 605 and processed by listeners. The output of the listeners are supplied to a document writer 506 and then translated back to an XML format for output. Thus for example this application illustrated in FIG. 6 takes an XML document and outputs an HTML document containing a form. The form is then sent to a browser, and the result is converted back to XML. For this exercise, the architecture concept provides the mapping from XML to HTML. The three architectures included in FIG. 6 include one for providing the structure of the HTML document, such as tables and lists, a second specifying text to be displayed, such as labels for input fields on the browser document, and the third describes the input fields themselves. The elements of the XML document required to maintain the XML documents structure become invisible fields in the HTML form. This is useful for use in reconstruction of the XML document from the information the client will put into the HTTP post message that is sent back to the server. Each architecture takes the input document and transforms it into an architecture based on a subset of HTML. Listeners listening for these events, output events for the HTML document, which then go to a document writer object. The document writer object listens to XML events and turns them back into an XML document. The document writer object is a listener to all the element generators listening to the architectures in this example. The organization of the processing module illustrated in FIGS. 5 and 6 is representative of one embodiment of the parser and transaction process front end for the system of FIG. 3. As can be seen, a very flexible interface is provided by which diverse transaction processes can be executed in response to the incoming XML documents, or other structured document formats. FIG. 7 illustrates a node similar to that of FIG. 3, except that it includes a business interface definition builder module 700. Thus, the system of FIG. 7 includes a network interface 701, a document parser 702, and a document translator 703. The translator 703 supplies its output to a transaction processing front end 704, which in turn is coupled to listening functions such as commercial functions 705, a database 706, enterprise functions 707, and other generic listeners and processors 708. As illustrated in FIG. 7, the business interface definition builder 700 includes a user interface, a common business library CBL repository, a process for reading complementary business interface definitions, and a compiler. The user interface is used to assist an enterprise in the building of a business interface definition relying on the common business library repository, and the ability to read complementary business interface definitions. Thus, the input document of a complementary business interface definition can be specified as the output document of a particular transaction, and the output document of the complementary business interface definition can be specified as the input to such transaction process. In a similar manner a transaction business interface definition can be composed using components selected from the CBL repository. The use of the CBL repository encourages the use of standardized document formats, such as the example schema (bid1) documents above, logical structures and interpretation information in the building of business interface definitions which can be readily adopted by other people in the network. The business interface definition builder module 700 also includes a compiler which is used for generating the translator 703, the objects to be produced by the translator according to the host transaction processing architecture, and to manage the parsing function 702. FIG. 8 is a heuristic diagram showing logical structures stored in the repository in the business interface definition builder 700. Thus, the repository storage representative party business interface definitions 800, including for example a consumer BID 801, a catalog house BID 802, a warehouse BID 803, and an auction house BID 804. Thus, a new participant in an online market may select as a basic interface description one of the standardized BIDs which best matches its business. In addition, the repository will store a set of service business interface definitions 805. For example, an order entry BID 806, an order tracking BID 807, an order fulfillment BID 808, and a catalog service BID 809 could be stored. As a new participant in the market builds a business interface definition, it may select the business interface definitions of standardized services stored in the repository. In addition to the party and service BIDs, input and output document BIDs are stored in the repository as indicated by the field 810. Thus, a purchase order BID 811, an invoice BID 812, a request for quote BID 813, a product availability report BID 814, and an order status BID 815 might be stored in the repository. The repository, in addition to the business interface definitions which in a preferred system are specified as document type definitions according to XML, stores interpretation information in the form of semantic maps as indicated by the field 816. Thus, semantic maps which are used for specifying weights 817, currencies 818, sizes 819, product identifiers 820, and product features 821 in this example might be stored in the repository. Further, the interpretation information provides for typing of data structures within the logical structures of documents. In addition, logical structures used in the composing of business interface definitions could be stored in the repository as indicated by block 822. Thus, forms for providing address information 823, forms for providing pricing information 824, and forms for providing terms of contractual relationships could be provided 825. As the network expands, the CBL repository will also expand and standardize tending to make the addition of new participants, and the modification of business interface definitions easier. FIG. 9 illustrates the process of building a business interface definition using the system of FIG. 7. The process begins by displaying a BID builder graphical interface to the user (step 900). The system accepts user input identifying a participant, service and document information generated by the graphical interface (step 901). Next, any referenced logical structures, interpretation information, document definitions and/or service definitions are retrieved from the repository in response to user input via the graphical user interface (step 902). In the next step, any complementary business interface definitions or components of business interface definitions are accessed from other participants in the network selected via user input, by customized search engines, web browsers or otherwise (step 903). A document definition for the participant is created using the information gathered (step 904). The translators for the document to host and host to document mappers are created by the compiler (step 905). Host architecture data structures corresponding to the definition are created by the compiler (step 906), and the business interface definition which has been created is posted on the network, such as by posting on a website or otherwise, making it accessible to other nodes in the network (step 907). Business interface definitions tell potential trading partners the online services the company offers and which documents to use to invoke those services. Thus, the services are defined in the business interface definition by the documents that they accept and produce. This is illustrated in the following fragment of an XML service definition. <service> <service.name>Order Service</service.name> <service.location>www.veosystems.com/order</service.location> <service.op> <service.op.name>Submit Order</service.op.name> <service.op.inputdoc>www.commerce.net/po.dtd</service.op.inputdoc> <service.op.outputdoc> www.veosystems.com/invoice.dtd</service.op.outputdoc> </service.op> <service.op> <service.op.name>Track Order</service.op.name> <service.op.inputdoc>www.commerce.net /request.track.dtd<service.op.inputdoc> <service.op.outputdoc> www.veosystems.com/response.track.dtd<service.op.outputdoc> </service.op> </service> This XML fragment defines a service consisting of two transactions, one for taking orders and the other for tracking them. Each definition expresses a contract or promise to carry out a service if a valid request is submitted to the specified Web address. The Order service here requires an input document that conforms to a standard "po.dtd" Document Type Definition located in the repository, which may be local, or stored in an industry wide registry on the network. If a node can fulfill the order, it will return a document conforming to a customized "invoice.dtd" whose definition is local. In effect, the company is promising to do business with anyone who can submit a Purchase Order that conforms to the XML specification it declares. No prior arrangement is necessary. The DTD is the formal specification or grammar for documents of a given type; it describes the elements, their attributes, and the order in which they must appear. For example, purchase orders typically contain the names and addresses of the buyer and seller, a set of product descriptions, and associated terms and conditions such as price and delivery dates. In Electronic Data Interchange EDI for example, the X12 850 specification is a commonly used model for purchase orders. The repository encourages the development of XML document models from reusable semantic components that are common to many business domains. Such documents can be understood from their common message elements, even though they may appear quite different. This is the role of the Common Business Library repository. The Common Business Library repository consists of information models for generic business concepts including: business description primitives like companies, services, and products; business forms like catalogs, purchase orders, and invoices; standard measurements, date and time, location, classification codes. This information is represented as an extensible, public set of XML building blocks that companies can customize and assemble to develop XML applications quickly. Atomic CBL elements implement industry messaging standards and conventions such as standard ISO codes for countries, currencies, addresses, and time. Low level CBL semantics have also come from analysis of proposed metadata frameworks for Internet resources, such as Dublin Core. The next level of elements use these building blocks to implement the basic business forms such as those used in X12 EDI transactions as well as those used in emerging Internet standards such as OTP (Open Trading Protocol) and OBI (Open Buying on the Internet). CBL's focus is on the functions and information that are common to all business domains (business description primitives like companies, services, and products; business forms like catalogs, purchase orders, and invoices; standard measurements, date and time, location, classification codes). CBL builds on standards or industry conventions for semantics where possible (e.g., the rules that specify "day/month/year" in Europe vs "month/day/year" in the U.S. are encoded in separate CBL modules). The CBL is a language that is used for designing applications. It is designed to bridge the gap between the "document world" of XML and the "programming world" of JAVA or other transaction processing architectures. Schema embodies a philosophy of "programming with documents" in which a detailed formal specification of a document type is the master source from which a variety of related forms can be generated. These forms include XML DTDs for CBL, JAVA objects, programs for converting XML instances to and from the corresponding JAVA objects, and supporting documentation. The CBL creates a single source from which almost all of the pieces of a system can be automatically generated by a compiler. The CBL works by extending SGML/XML, which is normally used to formally define the structures of particular document types, to include specification of the semantics associated with each information element and attribute. The limited set of (mostly) character types in SGML/XML can be extended to declare any kind of datatype. Here is a fragment from the CBL definition for the "datetime" module: <!-- datetime.mod Version: 1.0 --> <!-- Copyright 1998 Veo Systems, Inc. --> . . . <! ELEMENT year (#PCDATA)> <! ATTLIST year schema CDATA #FIXED "urn:x-veosystems:stds:iso:8601:3.8" > <! ELEMENT month (#PCDATA)> <! ATTLIST month schema CDATA #FIXED "urn:x-veosystems:stds:iso:8601:3.12" > . . . In this fragment, the ELEMENT "year" is defined as character data, and an associated "schema" attribute, also character data, defines the schema for "year" to be section 3.8 of the ISO 8601 standard. This "datetime" CBL module is in fact defined as an instance of the Schema DTD. First, the module name is defined. Then the "datetime" element "YEAR" is bound to the semantics of ISO 8601: <! DOCTYPE SCHEMA SYSTEM "schema.dtd"> <SCHEMA><H1>Date and Time Module</H1> . . . <ELEMNTTYPE NAME="year" DATATYPE="YEAR"><MODEL> <STRING DATATYPE="YEAR"></STRING></MODEL> <ATTDEF NAME=:schema:iso8601" DATATYPE="CDATA"> <FIXED>3.8 Gregorian calendar</FIXED></ATTDEF></ELEMENTTYPE> The example market participant and service modules above are also stored in the CBL repository. In FIG. 10, an Airbill 1000 is being defined by customizing a generic purchase order DTD 1001, adding more specific information about shipping weight 1002. The generic purchase order 1001 was initially assembled from the ground up out of CBL modules for address, date and time, currency, and vendor and product description. Using CBL thus significantly speeds the development and implementation of XML commerce applications. More importantly, CBL makes it easier for commercial applications to be interconnected. In the CBL, XML is extended with a schema. The extensions add strong-typing to XML elements so that content can be readily validated. For example, an element called <CPU_clock_speed> can be defined as an integer with a set of valid values: {100, 133, 166, 200, 233, 266 Mhz.}. The schema also adds class-subclass hierarchies, so that information can be readily instantiated from class definitions. A laptop, for instance, can be described as a computer with additional tags for features such as display type and battery life. These and other extensions facilitate data entry, as well as automated translations between XML and traditional Object-Oriented and relational data models. Thus the completed BID is run through the compiler which produces the DTDs for the actual instance of a participant and a service as outlined above, the JAVA beans which correspond to the logical structures in the DTD instances, and transformation code for transforming from XML to JAVA and from JAVA to XML. In alternative systems documentation is also generated for display on a user interface or for printing by a user to facilitate use of the objects. For the example market participant and service DTDs set forth above, the JAVA beans generated by the compiler are set forth (with some redactions for conciseness) as follows:
import com.veo.vsp.doclet.meta.Document;
public class AddressPhysical extends Document {
public static final String DOC_TYPE = "address.physical";
String mStreet;
String mCity;
public final static int AK = 0;
public final static int AL = 1;
public final static int AR = 2;
public final static int AZ = 3;
public final static int CA = 4;
. . .
public final static int WI = 48;
public final static int WV = 49;
public final static int WY = 50;
int mState;
String mPostcode;
public final static int AD = 51;
public final static int AB = 52;
public final static int AF = 53;
public final static int AG = 54;
public final static int AI = 55;
public final static int AM = 56;
. . .
int mCountry;
public AddressPhysical( ){
super(DOC_TYPE);
mStreet = new String( );
mCity = new String( );
this.mState = -1;
mPostcode = null;
this.mCountry = -1;
}
public AddressPhysical(String doc_type) {
super(doc_type);
mStreet = new String( );
mCity = new String( );
this.mState = -1;
mPostcode = null;
this.mCountry = -1;
}
static public AddressPhysical initAddressPhysical(String
iStreet,String iCity,int
iState,String iPostcode,int iCountry){
AddressPhysical obj = new AddressPhysical( );
obj.initiaiizeAll(iStreet, iCity, iState, iPostcode,
iCountry);
return obj;
}
public void initializeAll(String iStreet,String iCity,int
iState,String iPostcode,int
iCountry){
mStreet = iStreet;
mCity = iCity;
mState = iState;
mPostcode = iPostcode;
mCountry = iCountry;
}
public String getStreet( ){
return mStreet;
}
public String getStreetToXML( ){
if (getStreet( ) == null) return null;
char [ ]c = getStreet( ).toCharArray( );
StringBuffer sb = new StringBuffer( );
for (int x = 0; x < c.length; x++){
switch(c[x]){
case`>`:
sb.append(">");
break;
case`<`:
sb.append("<");
break;
case `&`:
sb.append("&");
break;
case""":
sb.append(""");
break;
case ".backslash."
sb.append(""");
break;
default:
if (Character.isDefined(c[x]))
sb.append(c[x]);
}
}
return sb.toString( );
}
public void setStreet(String inp) {
this.mStreet = inp;
}
public void streetFromXML(String n){
setStreet(n);
}
public String getCity( ){
return mCity;
}
public String getCityToXML( ){
if (getCity( ) == nulI) return null;
char [ ] c = getCity( ).toCharArray( );
StringBuffer sb = new StringBuffer( );
for (intx= 0;x < c.length;x++){
switch(c[x]){
case `>`:
sb. append(">");
break;
case `<`:
sb.append("<");
break;
case `&`:
sb.append("&");
break;
case """:
sb.append(""");
break;
case ".backslash.":
sb.append(""");
break;
default:
if (Character.isDefined(c[x]))
sb.append(c[x]);
}
}
return sb.toString( );
}
public void setCity(String inp) {
this.mCity = inp;
}
public void cityFromXML (String n){
setCity(n);
}
public int getState( ){
return mState;
}
public String getStateToXML( ){
switch (mState) {
case AK return "AK",
case AL return "AL",
case AR return "AR";
case AZ return "AZ",
. . .
}
return null;
}
public void setState(int inp){
this.mState = inp;
}
public void stateFromXML(String s){
if(s.equals("AK"))mState = AK;
else if (s.equals("AL"))mState = AL,
else if (s.equals("AR"))mState = AR,
else if (s.equals("AZ"))mState = AZ,
. . .
}
public String getPostcode( ){
return mPostcode;
}
public String getPostcodeToXML( ){
if (getPostcode( ) == null) return null;
char [ ]c = getPostcode( ).toCharArray( );
StringBuffer sb = new StringBuffer( );
for (int x = 0; x < c.length; x++){
switch(c[x]){
case `>`:
sb.append(">");
break;
case `<`:
sb.append("<");
break;
case `&`:
sb.append("&");
break;
case
sb. append(""");
break;
case ".backslash.":
sb.append(""");
break;
default:
if (Character.isDefined(c[x]))
sb.append(c[x]);
}
}
return sb.toString( );
}
public void setPostcode(String inp) {
this.mPostcode = inp,
}
public void PostcodeFromXML(String n){
setPostcode(n);
public int getCountry( ){
return mCountry;
}
public String getCountryToXML( ){
switch (mCountry){
case AD: return "AD";
case AE return "AE",
case AF: return "AF",
. . .
}
return null;
}
public void setCountry(int inp) {
this.mCountry = inp;
}
public void countryFromXML(String s){
if(s.equals("AD"))mCountry = AD;
else if (s.equals("AE"))mCountry = AE;
else if (s.equals("AF"))mCountry = AF;
else if (s.equals("AG"))mCountry = AG;
else if (s.equals("AI"))mCountry = AI;
. .
}
}
package com.veo.xdk.dev.schema.test.blib;
import com.veo.vsp.doclet.meta.Document;
public class AddressSet extends Document {
public static final String DOC_TYPE = "address.set";
AddressPhysical mAddressPhysical;
String [ ] mTelephone;
String [ ] mFax;
String [ ] mEmail;
String [ ] mInternet;
public AddressSet( ){
super(DOC_TYPE);
this.mAddressPhysical = new AddressPhysical( );
mTelephone = null;
mFax = null;
mEmail = null;
mInternet = null;
}
public AddressSet(String doc_type){
super(doc_type);
this.mAddressPhysical = new AddressPhysical( );
mTelephone = null;
mFax = null;
mEmail = null;
mInternet = null;
}
static public AddressSet initAddressSet(AddressPhysical
iAddressPhysical,String [ ]
iTelephone,String [ ] iFax,String [ ] iEmail,String [ ] iInternet){
AddressSet obj = new AddressSet( );
obj initializeAll(iAddressPhysical, iTelephone, iFax, iEmail,
iInternet);
return obj;
}
public void initializeAll(AddressPhysical iAddressPhysical,String [
] iTelephone,String [ ]
iFax,String [ ] iEmail,String [ ] iInternet){
mAddressPhysical = IAddressPhysical;
mTelephone = iTelephone;
mFax = iFax;
mEmail = iEmail;
mInternet = iInternet;
}
public AddressPhysical getAddressPhysical( ){
return mAddressPhysical;
}
public void setAddressPhysical(AddressPhysical inp) {
this.mAddressPhysical = inp;
}
public String [ ] getTelephone( ){
return mTelephone;
}
public String getTelephone(int index){
if (this.mTelephone == null)
return null;
if (index >= this.mTelephone.length)
return null;
if (index < 0 && -index > this.mTelephone.length)
return null;
if(index >= 0) return this.mTelephone[index];
return this.mTelephone[this.mTelephone.length + index];
}
public String [ ] getTelephoneToXML( ){
String [ ] valArr = getTelephone( );
if (valArr == null) return null;
String [ ] nvArr = new String[valArr.length];
for (int z = 0; z < nvArr.length; z++){
char [ ] c = valArr[z].toCharArray( ),
StringBuffer st = new StringBuffer( ),
StringBuffer sb = new StringBuffer( ),
for (int x = 0; x < c.length; x++){
switch(c[x]){
case `>`:
sb.append(">");
break;
case `<`:
sb.append("<");
break;
case `&`:
sb.append("&");
brea | ||||||
