2ronwalf// Copyright (c) 2004 Evren Sirin 2ronwalf// Permission is hereby granted, free of charge, to any person obtaining a copy 2ronwalf// of this software and associated documentation files (the "Software"), to 2ronwalf// deal in the Software without restriction, including without limitation the 2ronwalf// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 2ronwalf// sell copies of the Software, and to permit persons to whom the Software is 2ronwalf// furnished to do so, subject to the following conditions: 2ronwalf// The above copyright notice and this permission notice shall be included in 2ronwalf// all copies or substantial portions of the Software. 2ronwalf// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 2ronwalf// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 2ronwalf// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 2ronwalf// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 2ronwalf// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2ronwalf// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 2ronwalf * Validate OWL-S service descriptions to find errors such as flaws in the data flow specification, 2ronwalf * grounding description and so on. Validator will catch common RDF errors and print them. 2ronwalf// out.print(" (Version: ").print(service.getOWLSVersion()).print(")").println(); 2ronwalf // FIXME return value for validation 2ronwalf // return services.size() > 0 && errors.isEmpty(); 2ronwalf// return str.replaceAll("\n", "<br>").replaceAll(" ", " "); 2ronwalf// StringBuffer buffer = new StringBuffer(); 2ronwalf// int index = str.indexOf("http://"); 2ronwalf// buffer.append(str.substring(start, index)); 2ronwalf// finish = Math.min(str.indexOf(' ', index), str.indexOf('\n', index)); 2ronwalf// if(finish > str.indexOf('<', index)) finish = str.indexOf('\n', index); 2ronwalf// if(finish == -1) finish = str.length(); 2ronwalf// link = str.substring(index, finish); 2ronwalf// buffer.append("<a href=\"").append(link).append("\">"); 2ronwalf// buffer.append(link).append("</a>"); 2ronwalf// start = index + link.length(); 2ronwalf// index = str.indexOf("http://", start); 2ronwalf// buffer.append(str.substring(start)); 2ronwalf// return buffer.toString().replaceAll("\n", "<br>"); 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#startService(java.lang.String) 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#finishService(java.lang.String) 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#warning(java.lang.String) 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#error(java.lang.String) 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#startParseRDF() 2ronwalf * @see org.mindswap.owls.io.OWLSReaderListener#finishParseRDF()