private boolean handleArtificialDominanceRelation ( SDocumentGraph graph , SNode source , SNode target , SRelation rel , SLayer layer , long componentID , long pre ) { List < SRelation < SNode , SNode > > mirrorRelations = graph . getRelations ( source . getId ( ) , target . getId ( ) ) ; if ( mirrorRelations != null && mirrorRelations . size ( ) > 0 ) { for ( Relation mirror : mirrorRelations ) { if ( mirror != rel && mirror instanceof SRelation ) { // check layer SRelation mirrorRel = ( SRelation ) mirror ; Set < SLayer > mirrorLayers = mirrorRel . getLayers ( ) ; if ( mirrorLayers != null ) { for ( SLayer mirrorLayer : mirrorLayers ) { if ( mirrorLayer == layer ) { // adjust the feature of the mirror relation to include // information about the artificial dominance relation RelannisEdgeFeature mirrorFeat = RelannisEdgeFeature . extract ( mirrorRel ) ; mirrorFeat . setArtificialDominanceComponent ( componentID ) ; mirrorFeat . setArtificialDominancePre ( pre ) ; mirrorRel . removeLabel ( ANNIS_NS , FEAT_RELANNIS_EDGE ) ; mirrorRel . createFeature ( ANNIS_NS , FEAT_RELANNIS_EDGE , mirrorFeat ) ; return true ; } } } } } } return false ; }
In ANNIS there is a special combined dominance component which has an empty name but which should not directly be included in the Salt graph .