}
boolean allTriples = true ;
for ( String url : urls )
{
Lang lang = Lang.guess(url, Lang.NQUADS) ;
if ( lang != null && lang.isQuads() )
{
allTriples = false ;
break ;
}
}
if ( allTriples && graphName == null )
{
loadDefaultGraph(urls) ;
return ;
}
if ( graphName == null )
{
loadQuads(urls) ;
return ;
}
// graphName != null
if ( ! allTriples )
{
for ( String url : urls )
{
Lang lang = Lang.guess(url, Lang.NQUADS) ;
if ( lang == null )
// Does not happen due to default above.
cmdError("File suffix not recognized: " +url) ;
if ( lang != null && ! lang.isTriples() )
cmdError("Can only load triples into a named model: "+url) ;
}
cmdError("Internal error: deteched quad input but can't find it again") ;
return ;
}