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 cs.tu-berlin.de
Tue May 13 13:16:47 PDT 2008


Hi,

I think the method
         edu.stanford.smi.protegex.owl.jena.Jena.prepareWriter(RDFWriter
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?

Cheers,
Ralf


    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: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20080513/e8e2b873/attachment.html>


More information about the protege-owl mailing list