Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ipaaca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Social Cognitive Systems
ipaaca
Commits
ab621ff6
Commit
ab621ff6
authored
10 years ago
by
Ramin Yaghoubzadeh Torky
Browse files
Options
Downloads
Patches
Plain Diff
Java: fixed wire format for Messages
parent
76d1b6b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ipaacalib/java/src/ipaaca/IUConverter.java
+7
-6
7 additions, 6 deletions
ipaacalib/java/src/ipaaca/IUConverter.java
with
7 additions
and
6 deletions
ipaacalib/java/src/ipaaca/IUConverter.java
+
7
−
6
View file @
ab621ff6
/*
* This file is part of IPAACA, the
* "Incremental Processing Architecture
* for Artificial Conversational Agents".
* for Artificial Conversational Agents".
*
* Copyright (c) 2009-2013 Sociable Agents Group
* CITEC, Bielefeld University
* CITEC, Bielefeld University
*
* http://opensource.cit-ec.de/projects/ipaaca/
* http://purl.org/net/ipaaca
...
...
@@ -21,7 +21,7 @@
* You should have received a copy of the LGPL along with this
* program. If not, go to http://www.gnu.org/licenses/lgpl.html
* or write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The development of this software was supported by the
* Excellence Cluster EXC 277 Cognitive Interaction Technology.
...
...
@@ -55,7 +55,7 @@ import com.google.protobuf.InvalidProtocolBufferException;
/**
* Serializes AbstractIUs into protocolbuffer IUs and vice versa.
* @author hvanwelbergen
*
*
*/
public
class
IUConverter
implements
Converter
<
ByteBuffer
>
{
...
...
@@ -96,10 +96,11 @@ public class IUConverter implements Converter<ByteBuffer>
IU
iu
=
IU
.
newBuilder
().
setUid
(
iua
.
getUid
()).
setRevision
(
iua
.
getRevision
()).
setCategory
(
iua
.
getCategory
())
.
setOwnerName
(
iua
.
getOwnerName
()).
setCommitted
(
iua
.
isCommitted
()).
setAccessMode
(
accessMode
)
.
setReadOnly
(
iua
.
isReadOnly
()).
setPayloadType
(
"STR"
).
addAllPayload
(
payloadItems
).
addAllLinks
(
links
).
build
();
return
new
WireContents
<
ByteBuffer
>(
ByteBuffer
.
wrap
(
iu
.
toByteArray
()),
"ipaaca-iu"
);
String
wireFormat
=
(
accessMode
==
IU
.
AccessMode
.
MESSAGE
)
?
"ipaaca-messageiu"
:
"ipaaca-iu"
;
return
new
WireContents
<
ByteBuffer
>(
ByteBuffer
.
wrap
(
iu
.
toByteArray
()),
wireFormat
);
}
@Override
public
UserData
<?>
deserialize
(
String
wireSchema
,
ByteBuffer
buffer
)
throws
ConversionException
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment