Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Athen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
36
Issues
36
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kallimachos
Athen
Commits
f5b86c28
Commit
f5b86c28
authored
Feb 23, 2018
by
Markus Krug
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed some casting issues with ArrayFS
parent
720d7be5
Pipeline
#7875
passed with stages
in 18 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
de.uniwue.mk.athen/bundles/de.uniwue.mkrug.kallimachos.annotation.editor/src/de/uniwue/mkrug/kallimachos/annotation/editor/ui/DSAnnotatingView.java
...ug/kallimachos/annotation/editor/ui/DSAnnotatingView.java
+10
-12
No files found.
de.uniwue.mk.athen/bundles/de.uniwue.mkrug.kallimachos.annotation.editor/src/de/uniwue/mkrug/kallimachos/annotation/editor/ui/DSAnnotatingView.java
View file @
f5b86c28
...
...
@@ -14,7 +14,6 @@ import org.apache.uima.cas.CAS;
import
org.apache.uima.cas.Feature
;
import
org.apache.uima.cas.FeatureStructure
;
import
org.apache.uima.cas.Type
;
import
org.apache.uima.cas.impl.ArrayFSImpl
;
import
org.apache.uima.cas.text.AnnotationFS
;
import
org.apache.uima.cas.text.AnnotationIndex
;
import
org.eclipse.e4.core.services.events.IEventBroker
;
...
...
@@ -52,7 +51,6 @@ import org.eclipse.swt.layout.GridData;
import
org.eclipse.swt.layout.GridLayout
;
import
org.eclipse.swt.widgets.Button
;
import
org.eclipse.swt.widgets.Composite
;
import
org.eclipse.swt.widgets.Display
;
import
org.eclipse.swt.widgets.Event
;
import
org.eclipse.swt.widgets.Label
;
import
org.eclipse.swt.widgets.Listener
;
...
...
@@ -223,8 +221,8 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
for
(
AnnotationFS
ds
:
editor
.
getCas
().
getAnnotationIndex
(
typ
))
{
ArrayFS
Impl
speakerArray
=
(
ArrayFSImpl
)
ds
.
getFeatureValue
(
speakerArrayFeature
);
ArrayFS
Impl
spokenToArray
=
(
ArrayFSImpl
)
ds
.
getFeatureValue
(
spokenToArrayFeature
);
ArrayFS
speakerArray
=
(
ArrayFS
)
ds
.
getFeatureValue
(
speakerArrayFeature
);
ArrayFS
spokenToArray
=
(
ArrayFS
)
ds
.
getFeatureValue
(
spokenToArrayFeature
);
if
(
speakerArray
==
null
||
speakerArray
.
size
()
==
0
)
{
...
...
@@ -233,7 +231,7 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
AnnotationFS
speaker
=
(
AnnotationFS
)
ds
.
getFeatureValue
(
speakerFeature
);
if
(
speaker
!=
null
)
{
ArrayFS
Impl
arrayNew
=
(
ArrayFSImpl
)
editor
.
getCas
().
createArrayFS
(
1
);
ArrayFS
arrayNew
=
(
ArrayFS
)
editor
.
getCas
().
createArrayFS
(
1
);
arrayNew
.
set
(
0
,
speaker
);
...
...
@@ -249,7 +247,7 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
AnnotationFS
spokenTo
=
(
AnnotationFS
)
ds
.
getFeatureValue
(
spokenToFeature
);
if
(
spokenTo
!=
null
)
{
ArrayFS
Impl
arrayNew
=
(
ArrayFSImpl
)
editor
.
getCas
().
createArrayFS
(
1
);
ArrayFS
arrayNew
=
(
ArrayFS
)
editor
.
getCas
().
createArrayFS
(
1
);
arrayNew
.
set
(
0
,
spokenTo
);
...
...
@@ -1256,13 +1254,13 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
private
void
updateSpeakerArrays
(
Feature
selF
,
AnnotationFS
ds
,
AnnotationFS
selected
)
{
if
(
selF
.
getName
().
contains
(
"SpokenTo"
))
{
ArrayFS
Impl
spokArray
=
(
ArrayFSImpl
)
ds
.
getFeatureValue
(
spokenToArrayFeature
);
ArrayFS
spokArray
=
(
ArrayFS
)
ds
.
getFeatureValue
(
spokenToArrayFeature
);
int
size
=
1
;
if
(
spokArray
!=
null
)
size
=
spokArray
.
size
()
+
1
;
ArrayFS
Impl
arrayNew
=
(
ArrayFSImpl
)
editor
.
getCas
().
createArrayFS
(
size
);
ArrayFS
arrayNew
=
(
ArrayFS
)
editor
.
getCas
().
createArrayFS
(
size
);
if
(
spokArray
==
null
)
{
arrayNew
.
set
(
0
,
selected
);
...
...
@@ -1282,13 +1280,13 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
// speaker
else
{
ArrayFS
Impl
speakerArray
=
(
ArrayFSImpl
)
ds
.
getFeatureValue
(
speakerArrayFeature
);
ArrayFS
speakerArray
=
(
ArrayFS
)
ds
.
getFeatureValue
(
speakerArrayFeature
);
int
size
=
1
;
if
(
speakerArray
!=
null
)
size
=
speakerArray
.
size
()
+
1
;
ArrayFS
Impl
arrayNew
=
(
ArrayFSImpl
)
editor
.
getCas
().
createArrayFS
(
size
);
ArrayFS
arrayNew
=
(
ArrayFS
)
editor
.
getCas
().
createArrayFS
(
size
);
if
(
speakerArray
==
null
)
{
arrayNew
.
set
(
0
,
selected
);
...
...
@@ -1819,7 +1817,7 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
buttonUnknownSpokenTo
.
setSelection
(
false
);
}
// get the speaker of that anno
ArrayFS
Impl
speakerNEArray
=
(
ArrayFSImpl
)
coveringDS
.
getFeatureValue
(
speakerArrayFeature
);
ArrayFS
speakerNEArray
=
(
ArrayFS
)
coveringDS
.
getFeatureValue
(
speakerArrayFeature
);
if
(
speakerNEArray
!=
null
)
{
for
(
int
i
=
0
;
i
<
speakerNEArray
.
size
();
i
++)
{
...
...
@@ -1832,7 +1830,7 @@ public class DSAnnotatingView extends AEditorSubordinateViewPart {
}
// also add spokenToAnnotation if possible
ArrayFS
Impl
spokenToNEArray
=
(
ArrayFSImpl
)
coveringDS
.
getFeatureValue
(
spokenToArrayFeature
);
ArrayFS
spokenToNEArray
=
(
ArrayFS
)
coveringDS
.
getFeatureValue
(
spokenToArrayFeature
);
if
(
spokenToNEArray
!=
null
)
{
for
(
int
i
=
0
;
i
<
spokenToNEArray
.
size
();
i
++)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment