1 31 36 37 package com.hp.hpl.jena.rdf.arp; 38 39 40 41 42 47 class URIReference implements AResourceInternal 48 { 49 50 51 52 final private String uri; 53 URIReference(Location l, XMLContext ctxt,String uri) throws MalformedURIException, ParseException { 54 55 this.uri = ctxt.resolve(l, uri); 57 } 58 URIReference(String uri) throws MalformedURIException { 59 this.uri = new URI(uri).getURIString(); 61 } 62 URIReference() { 63 uri = null; 64 } 65 public String toString() { 66 return uri; 67 } 68 69 public boolean isAnonymous() { 70 return false; 71 } 72 73 public String getAnonymousID() { 74 return null; 75 } 76 77 public String getURI() { 78 return uri; 79 } 80 81 public Object getUserData() { 82 throw new IllegalStateException ("User data only supported on blank nodes"); 83 } 84 85 public void setUserData(Object d) { 86 throw new IllegalStateException ("User data only supported on blank nodes"); 87 } 88 91 public boolean equals(Object o) { 92 return o != null 93 && (o instanceof URIReference) 94 && uri.equals(((URIReference)o).uri ); 95 } 96 97 public int hashCode() { 98 return uri.hashCode(); 99 } 100 103 public boolean hasNodeID() { 104 return false; 105 } 106 109 public void setHasBeenUsed() { 110 } 111 114 public boolean getHasBeenUsed() { 115 throw new UnsupportedOperationException ("Internal error"); 116 } 117 } 118 | Popular Tags |