2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.io
.stream
;
13 import org
.apache
.log4j
.Logger
;
15 import eu
.etaxonomy
.cdm
.common
.CdmUtils
;
16 import eu
.etaxonomy
.cdm
.io
.stream
.terms
.TermUri
;
23 public class StreamItem
implements IConverterInput
<StreamItem
> {
24 @SuppressWarnings("unused")
25 private static Logger logger
= Logger
.getLogger(StreamItem
.class);
28 public Map
<String
, String
> map
;
29 public String location
;
36 public StreamItem(TermUri term
, Map
<String
, String
> map
, String location
) {
40 this.location
= location
;
44 public String
get(String mapKey
){
45 return this.map
.get(mapKey
);
48 public String
get(TermUri termUri
){
49 return this.map
.get(termUri
.getUriString());
52 public void remove(TermUri termUri
){
53 this.map
.remove(termUri
.getUriString());
57 public void remove(String string
) {
58 this.map
.remove(string
);
63 * Returns the location in the stream origin. For event messaging and maybe in future also
67 public String
getLocation() {
72 public String
toString(){
73 if (term
== null && map
== null){
74 return super.toString();
76 return "[" + CdmUtils
.concat("|", term
.getUriString(), map
.toString()) + "]";