Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » serializing DFA/XSDNFA automata
serializing DFA/XSDNFA automata [message #73582] Tue, 15 January 2008 12:52 Go to next message
Eclipse UserFriend
Originally posted by: t.agnoloni.gmail.com

Hi,
we are using version 2.2.3 of org.eclipse.xsd at the moment in order to
preserve compatibility wit java 1.4.x.

We are producing maps mapping elemDeclNames to the corresponding
org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA automata to access them in
order to satisfy queries.

Is there a way to serialize such maps in order to create cached copy of
the rules and avoid each time their building?


We are obtaining the following exception while serializing:


Error saving rules map org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
java.io.NotSerializableException:
org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.j ava:1059).....



I've seen that in the JavaDoc of previous versions of the library, i.e.
2.1.1 the Serializable interface was implemented.

Class org.eclipse.xsd.impl.XSDParticleImpl extends
XSDComplexTypeContentImpl implements Serializable


Has the modality of serialization been changed? Is there a different way
to obtain the same result?

Thanks in advance for any hint

Tommaso
Re: serializing DFA/XSDNFA automata [message #73601 is a reply to message #73582] Tue, 15 January 2008 13:01 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010201000204090901090302
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Tommaso,

I've recently made improvements to the speed of creating an the DFAs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=200848

But I don't think we've ever supported java.io.Serializeable for XSD
instances. You can serialize a reference to any EObject using
EcoreUtil.getURI(eObject) and it can be resolved using
ResourceSet.getEObject(uri, true) so if you want to serialize
information needed to rebuild the map itself you could use that type of
approach.


Tommaso wrote:
> Hi,
> we are using version 2.2.3 of org.eclipse.xsd at the moment in order
> to preserve compatibility wit java 1.4.x.
>
> We are producing maps mapping elemDeclNames to the corresponding
> org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA automata to access them
> in order to satisfy queries.
>
> Is there a way to serialize such maps in order to create cached copy
> of the rules and avoid each time their building?
>
>
> We are obtaining the following exception while serializing:
>
>
> Error saving rules map org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
> java.io.NotSerializableException:
> org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.j ava:1059).....
>
>
>
>
> I've seen that in the JavaDoc of previous versions of the library,
> i.e. 2.1.1 the Serializable interface was implemented.
> Class org.eclipse.xsd.impl.XSDParticleImpl extends
> XSDComplexTypeContentImpl implements Serializable
>
>
> Has the modality of serialization been changed? Is there a different
> way to obtain the same result?
> Thanks in advance for any hint
>
> Tommaso
>
>


--------------010201000204090901090302
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tommaso,<br>
<br>
I've recently made improvements to the speed of creating an the DFAs:
Re: serializing DFA/XSDNFA automata [message #602805 is a reply to message #73582] Tue, 15 January 2008 13:01 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010201000204090901090302
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Tommaso,

I've recently made improvements to the speed of creating an the DFAs:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=200848

But I don't think we've ever supported java.io.Serializeable for XSD
instances. You can serialize a reference to any EObject using
EcoreUtil.getURI(eObject) and it can be resolved using
ResourceSet.getEObject(uri, true) so if you want to serialize
information needed to rebuild the map itself you could use that type of
approach.


Tommaso wrote:
> Hi,
> we are using version 2.2.3 of org.eclipse.xsd at the moment in order
> to preserve compatibility wit java 1.4.x.
>
> We are producing maps mapping elemDeclNames to the corresponding
> org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA automata to access them
> in order to satisfy queries.
>
> Is there a way to serialize such maps in order to create cached copy
> of the rules and avoid each time their building?
>
>
> We are obtaining the following exception while serializing:
>
>
> Error saving rules map org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
> java.io.NotSerializableException:
> org.eclipse.xsd.impl.XSDParticleImpl$XSDNFA
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.j ava:1059).....
>
>
>
>
> I've seen that in the JavaDoc of previous versions of the library,
> i.e. 2.1.1 the Serializable interface was implemented.
> Class org.eclipse.xsd.impl.XSDParticleImpl extends
> XSDComplexTypeContentImpl implements Serializable
>
>
> Has the modality of serialization been changed? Is there a different
> way to obtain the same result?
> Thanks in advance for any hint
>
> Tommaso
>
>


--------------010201000204090901090302
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tommaso,<br>
<br>
I've recently made improvements to the speed of creating an the DFAs:


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:serializing DFA/XSDNFA automata
Next Topic:xml editor content assist
Goto Forum:
  


Current Time: Fri Apr 19 06:38:46 GMT 2024

Powered by FUDForum. Page generated in 0.01824 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top