private String createFragment ( final Value resource ) { if ( resource instanceof URI ) { String frag = ( ( URI ) resource ) . getLocalName ( ) ; return RESERVED_FRAGMENTS . contains ( frag ) ? frag + "_" : frag ; } else { return resource . stringValue ( ) ; } }
Simplifies the lexical representation of a value in particular by taking the fragment identifier of URIs . This is a lossy operation ; many distinct URIs may map to the same fragment . Conflicts with reserved tokens are avoided .