Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] check for NULL

Ralf Weinand weinanr at
Tue May 13 13:16:47 PDT 2008


I think the method
writer, String language, String namespace)
should test xmlBase for NULL, so that calls like
        JenaOWLModel.saveModel(System.out, protegeModel.getOntModel(),
FileUtils.langXMLAbbrev, null);
do not throw exceptions.
What do you think?


    public static void prepareWriter(RDFWriter writer, String language,
String namespace) {
        if (FileUtils.langXMLAbbrev.equals(language) ||
FileUtils.langXML.equals(language)) {
            writer.setProperty("showXmlDeclaration", "" +
!Jena.isXMLTagHidden());  // Suggested by Alix
            writer.setProperty("relativeURIs", "same-document");
            String xmlBase = namespace;
            if (Jena.isNamespaceWithSeparator(xmlBase) &&
!namespace.endsWith("/")) {
                xmlBase = xmlBase.substring(0, xmlBase.length() - 1);
            writer.setProperty("xmlbase", xmlBase);
            if (FileUtils.langXMLAbbrev.equals(language)) {
                writer.setProperty("blockRules", "propertyAttr");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-owl mailing list