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