Browse Prior Art Database

Automated Java Serialisation using XML

IP.com Disclosure Number: IPCOM000027938D
Publication Date: 2004-Apr-13
Document File: 3 page(s) / 9K

Publishing Venue

The IP.com Prior Art Database

Abstract

ID403871

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 58% of the total text.

Page 1 of 3

Automated Java Serialisation using XML

XML is an increasingly popular way of storing data. There are some situations where it is necessary to have a Java representation of XML encapsulated data. This proposal describes a method of translating data stored in a Java class to and from XML.

For example

<?xml version="1.0" encoding="UTF-8"?> <rights:RightsInformation

xmlns:rights="http://extra.research.philips.com/shareit/rights" xmlns:sig="http://www.w3.org/2000/09/xmldsig" xmlns="http://www.w3.org/2001/XMLSchema -instance" schemaLocation="http://extra.research.philips.com/shareit/rights shareit-rights.xsd">

<rights:GenericAccessTicket>

<rights:PeerID>shareit:PeerB:91286af98b96cc821</rights:PeerID>

<rights:TicketIssuer>tv-l.co.uk</rights:TicketIssuer>

<rights:Expiry>2003-06-24T00:00:00Z</rights:Expiry>

<rights:SerialNumber>9513895</rights:SerialNumber>

<rights:Description>BBC entitlement from UK television licence </rights:Description>

<rights:ContentRightsDistributor>bbc.co.uk/p2p</rights:ContentRightsDistributor>

<rights:ContentSetID>BBC:licence</rights:ContentSetID>

</rights:GenericAccessTicket>

Example XML document The information contained in the above XML document could be represented in Java using the following class:

public class GAT{

protected String contentSetID;

protected String peerID;

protected String contentRightsDistributor;

protected String ticketIssuer;

protected Date expiry;

protected Integer serialNumber;

protected String description;

public String getContentSetID(){

return contentSetID;

}

public void setContentSetID(String id){

contentSetID=id;

}

public String getPeerID(){

return peerID;

}

public void setPeerID(String id){

peerID=id;

}

public String getContentRightsDistributor(){

return contentRightsDistributor;

}

Page 2 of 3

public void setContentRightsDistributor(String distributor){

contentRightsDistributor=distributor;

}

public String getTicketIssuer(){

return ticketIssuer;

}

public void setTicketIssuer(String issuer){

ticketIssuer=issuer;

}

public Date getExpiry(){

return expiry;

}

public void setExpiry(Date date){

expiry=date;

}

public Integer getSerialNumber(){

return serialNumber;

}

Example Java Class

The problem that this proposal aims to solve, is "how to convert between the Java and the XML representation?"

The Java language has a feature called serialisation, which can be used to convert the contents of a Java class to a binary form. The disadvantage of this binary form is that neither is it easy to edit, nor very portable. Java serialised data is not portable between Java virtual machines. It is also not portable between changes...