1 5 package com.hp.hpl.jena.util.tuple; 6 7 13 public class TupleItem 14 { 15 public static final int URI = 0 ; 16 public static final int STRING = 1 ; 17 public static final int UNKNOWN = 2 ; 18 public static final int UNQUOTED = 3 ; 19 public static final int ANON = 4 ; 20 21 String rep ; 22 String datatype ; 23 String asFound ; 24 int itemType ; 25 26 TupleItem(String value, String valAsFound, int type, String dt) 27 { 28 rep = value ; 29 asFound = valAsFound ; 30 itemType = type ; 31 datatype = dt ; 32 } 33 34 public int getType() { return itemType ; } 35 36 public boolean isURI() { return itemType == URI ; } 37 public boolean isString() { return itemType == STRING ; } 38 public boolean isUnknown() { return itemType == UNKNOWN ; } 39 public boolean isUnquoted() { return itemType == UNQUOTED ; } 40 public boolean isAnon() { return itemType == ANON ; } 41 42 public String get() { return rep ; } 43 public String getDT() { return datatype ; 44 } 45 public String asQuotedString() { return asFound ; } 46 public String toString() { return rep ; } 47 } 48 49 75 | Popular Tags |