serializing DFA/XSDNFA automata [message #73582] |
Tue, 15 January 2008 07:52  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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 08:01  |
Eclipse User |
|
|
|
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:
|
|
|
Powered by
FUDForum. Page generated in 0.03423 seconds