Here you can find the source of isFullIRI(String resource)
Parameter | Description |
---|---|
resource | the resource |
true
if the resource if a full ontology iri
private static boolean isFullIRI(String resource)
//package com.java2s; /******************************************************************************* * Copyright (c) 2009,2011 Tecnalia Research and Innovation. * 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 * * Contributors://from w ww. j a v a 2s . c o m * Raul Otaolea (Tecnalia Research and Innovation - Software Systems Engineering) - initial API, implementation and documentation * Fran Ruiz (Tecnalia Research and Innovation - Software Systems Engineering) - initial API, implementation and documentation *******************************************************************************/ import java.net.MalformedURLException; import java.net.URL; public class Main { /** * Determines if the resource is a full iri * @param resource the resource * @return <code>true</code> if the resource if a full ontology iri */ private static boolean isFullIRI(String resource) { try { new URL(resource); return true; } catch (MalformedURLException ex) { return false; } } }