Here you can find the source of createDefaultName(final String uri)
protected static String createDefaultName(final String uri)
//package com.java2s; /**// w w w.ja v a2 s. c o m * * Copyright (c) 2009 L3i ( http://l3i.univ-larochelle.fr ). * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html. * */ import java.net.URISyntaxException; public class Main { protected static String createDefaultName(final String uri) { String last = ""; java.net.URI _uri = null; try { _uri = new java.net.URI(uri); } catch (URISyntaxException e) { e.printStackTrace(); } if (_uri != null) { final String _path = _uri.getPath(); final String[] split = _path.split("/"); if (split.length != 0) { last = split[split.length - 1]; last.replaceAll("#", ""); String[] split2 = last.split("[.]"); if (split2.length > 0) { last = split2[0]; } } } return last; } }