1 6 7 package com.hp.hpl.jena.graph; 8 9 import com.hp.hpl.jena.rdf.model.impl.Util; 10 import com.hp.hpl.jena.shared.*; 11 12 16 public class Node_URI extends Node_Concrete 17 { 18 Node_URI( Object uri ) 19 { super( uri ); } 20 21 public String getURI() 22 { return (String ) label; } 23 24 public Object visitWith( NodeVisitor v ) 25 { return v.visitURI( this, (String ) label ); } 26 27 public boolean isURI() 28 { return true; } 29 30 35 public String toString( PrefixMapping pm, boolean quoting ) 36 { return pm == null ? (String ) label : pm.shortForm( (String ) label ); } 37 38 public boolean equals( Object other ) 39 { return other instanceof Node_URI && label.equals( ((Node_URI) other).label ); } 40 41 public String getNameSpace() 42 { 43 String s = (String ) label; 44 return s.substring( 0, Util.splitNamespace( s ) ); 45 } 46 47 public String getLocalName() 48 { 49 String s = (String ) label; 50 return s.substring( Util.splitNamespace( s ) ); 51 } 52 53 public boolean hasURI( String uri ) 54 { return label.equals( uri ); } 55 } 56 57 86 | Popular Tags |