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] [POSSIBLE VIRUS:###] (local) absolute URLs are made relative when safing model

Ralf Weinand weinanr at cs.tu-berlin.de
Tue May 6 13:33:09 PDT 2008


Hi,

Protege 3.4 b130 seems to have a problem with local URLs.
I have two ontologies in my local tomcat that are imported into a model.
When I safe the model again using JenaCreator the URLs are relative.
This makes them invalid.

I did write a small test program (and did add the output) that
demonstrates the problem.

Cheers,
Ralf

************************************************************
        String individualsModelString =
         "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" " +
            "xmlns:dict=\"http://www.sws-challenge.org/schemas/rnet/dictionary\"
" +

"xmlns:core=\"http://www.sws-challenge.org/schemas/rnet/coreElements\"
" +
                "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema#\" " +
                "xmlns:fo=\"http://www.w3.org/1999/XSL/Format\" " +

"xmlns:protege=\"http://protege.stanford.edu/plugins/owl/protege#\" "
+
                "xmlns:po=\"http://www.sws-challenge.org/schemas/rnet/POR\" " +
                "xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\" " +
                "xmlns:owl=\"http://www.w3.org/2002/07/owl#\" " +

"xmlns:rosetta=\"http://localhost:8080/ontologies/RosettaNetOntology.owl#\"
" +

"xmlns=\"http://localhost:8080/process/MediationProcessInput.owl#\" "
+

"xmlns:anchor=\"http://localhost:8080/ontologies/ServiceAnchor.owl#\"
" +

"xml:base=\"http://localhost:8080/process/MediationProcessInput.owl\">
" +
          "<owl:Ontology rdf:about=\"\"> " +
             "<owl:imports
rdf:resource=\"http://localhost:8080/ontologies/ServiceAnchor.owl\"/>
" +
             "<owl:imports
rdf:resource=\"http://localhost:8080/ontologies/RosettaNetOntology.owl\"/>
" +
          "</owl:Ontology> " +
          "<rosetta:Pip3A4PurchaseOrderRequest
rdf:ID=\"Pip3A4PurchaseOrderRequest_1\"> " +
             "<rosetta:hasFromRole> " +
                "<rosetta:Buyer rdf:ID=\"Buyer_2\"> " +
                   "<rosetta:hasContactInformation> " +
                      "<rosetta:ContactInformation
rdf:ID=\"ContactInformation_3\"> " +
                         "<rosetta:hasTelephoneNumber
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">+43(650)89930011</rosetta:hasTelephoneNumber>
" +
                         "<rosetta:hasContactName
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Stefan
Blue</rosetta:hasContactName> " +
                         "<rosetta:hasEmailAddress
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">stefan.blue at blue.com</rosetta:hasEmailAddress>
" +
                      "</rosetta:ContactInformation> " +
                   "</rosetta:hasContactInformation> " +
                   "<rosetta:relatesToPartner> " +
                      "<rosetta:Partner rdf:ID=\"Partner_4\"> " +
                         "<rosetta:hasPhysicalLocation> " +
                            "<rosetta:PhysicalAddress
rdf:ID=\"PhysicalAddress_7\"> " +
                               "<rosetta:hasCityName
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Innsbruck</rosetta:hasCityName>
" +
                               "<rosetta:hasNationalPostalCode
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">A-6020</rosetta:hasNationalPostalCode>
" +
                               "<rosetta:hasGlobalCountryCode
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">AT</rosetta:hasGlobalCountryCode>
" +
                               "<rosetta:hasAddressLine1
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">North
Business Center, Block 9</rosetta:hasAddressLine1> " +
                            "</rosetta:PhysicalAddress> " +
                         "</rosetta:hasPhysicalLocation> " +
                         "<rosetta:hasContactInformation> " +
                            "<rosetta:ContactInformation
rdf:ID=\"ContactInformation_6\"> " +
                               "<rosetta:hasTelephoneNumber
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">+43(650)89930023</rosetta:hasTelephoneNumber>
" +
                               "<rosetta:hasEmailAddress
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">stefania.wolf at blue.com</rosetta:hasEmailAddress>
" +
                               "<rosetta:hasContactName
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Stefania
Wolf</rosetta:hasContactName> " +
                            "</rosetta:ContactInformation> " +
                         "</rosetta:hasContactInformation> " +
                         "<rosetta:hasBusinessDescription> " +
                            "<rosetta:BusinessDescription
rdf:ID=\"BusinessDescription_5\"> " +
                               "<rosetta:hasBusinessName
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Blue
Company</rosetta:hasBusinessName> " +
                            "</rosetta:BusinessDescription> " +
                         "</rosetta:hasBusinessDescription> " +
                      "</rosetta:Partner> " +
                   "</rosetta:relatesToPartner> " +
                "</rosetta:Buyer> " +
             "</rosetta:hasFromRole> " +
          "</rosetta:Pip3A4PurchaseOrderRequest> " +
          "<anchor:Process rdf:ID=\"MediationProcess\"> " +
             "<anchor:hasInput> " +
                "<anchor:Input rdf:ID=\"Input\"> " +
                   "<rdfs:label
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">Pip3A4PurchaseOrderRequest</rdfs:label>
" +
                   "<anchor:parameterObject
rdf:resource=\"#Pip3A4PurchaseOrderRequest_1\"/> " +
                "</anchor:Input> " +
             "</anchor:hasInput> " +
             "<rdfs:label
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">MediationProcess</rdfs:label>
" +
          "</anchor:Process> " +
       "</rdf:RDF> ";

        // load the RDF/XML-string into model
        JenaOWLModel model =
ProtegeOWL.createJenaOWLModelFromReader(new
StringReader(individualsModelString));

        Collection clses = model.getUserDefinedOWLNamedClasses();
        JenaCreator jenaCreator = new JenaCreator(model, false, true,
clses, null);
        OntModel resultingModel = jenaCreator.createOntModel();
        final String ns = model.getNamespaceManager().getDefaultNamespace();
        resultingModel.write(System.out, FileUtils.langXMLAbbrev, ns);

************************************************************

OUTPUT:

<rdf:RDF
    xmlns:rosetta="http://localhost:8080/ontologies/RosettaNetOntology.owl#"
    xmlns:anchor="http://localhost:8080/ontologies/ServiceAnchor.owl#"
    xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns="http://localhost:8080/process/MediationProcessInput.owl#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#">
  <owl:Ontology rdf:about="">
    <owl:imports rdf:resource="/ontologies/RosettaNetOntology.owl"/>
    <owl:imports rdf:resource="/ontologies/ServiceAnchor.owl"/>
  </owl:Ontology>
  <anchor:Process rdf:ID="MediationProcess">
    <anchor:hasInput>
      <anchor:Input rdf:ID="Input">
        <anchor:parameterObject>
          <rosetta:Pip3A4PurchaseOrderRequest
rdf:ID="Pip3A4PurchaseOrderRequest_1">
            <rosetta:hasFromRole>
              <rosetta:Buyer rdf:ID="Buyer_2">
                <rosetta:relatesToPartner>
                  <rosetta:Partner rdf:ID="Partner_4">
                    <rosetta:hasBusinessDescription>
                      <rosetta:BusinessDescription
rdf:ID="BusinessDescription_5">
                        <rosetta:hasBusinessName rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >Blue Company</rosetta:hasBusinessName>
                      </rosetta:BusinessDescription>
                    </rosetta:hasBusinessDescription>
                    <rosetta:hasPhysicalLocation>
                      <rosetta:PhysicalAddress rdf:ID="PhysicalAddress_7">
                        <rosetta:hasGlobalCountryCode rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >AT</rosetta:hasGlobalCountryCode>
                        <rosetta:hasNationalPostalCode rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >A-6020</rosetta:hasNationalPostalCode>
                        <rosetta:hasAddressLine1 rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >North Business Center, Block
9</rosetta:hasAddressLine1>
                        <rosetta:hasCityName
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                        >Innsbruck</rosetta:hasCityName>
                      </rosetta:PhysicalAddress>
                    </rosetta:hasPhysicalLocation>
                    <rosetta:hasContactInformation>
                      <rosetta:ContactInformation rdf:ID="ContactInformation_6">
                        <rosetta:hasContactName rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >Stefania Wolf</rosetta:hasContactName>
                        <rosetta:hasEmailAddress rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >stefania.wolf at blue.com</rosetta:hasEmailAddress>
                        <rosetta:hasTelephoneNumber rdf:datatype=
                        "http://www.w3.org/2001/XMLSchema#string"
                        >+43(650)89930023</rosetta:hasTelephoneNumber>
                      </rosetta:ContactInformation>
                    </rosetta:hasContactInformation>
                  </rosetta:Partner>
                </rosetta:relatesToPartner>
                <rosetta:hasContactInformation>
                  <rosetta:ContactInformation rdf:ID="ContactInformation_3">
                    <rosetta:hasContactName
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                    >Stefan Blue</rosetta:hasContactName>
                    <rosetta:hasEmailAddress
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                    >stefan.blue at blue.com</rosetta:hasEmailAddress>
                    <rosetta:hasTelephoneNumber rdf:datatype=
                    "http://www.w3.org/2001/XMLSchema#string"
                    >+43(650)89930011</rosetta:hasTelephoneNumber>
                  </rosetta:ContactInformation>
                </rosetta:hasContactInformation>
              </rosetta:Buyer>
            </rosetta:hasFromRole>
          </rosetta:Pip3A4PurchaseOrderRequest>
        </anchor:parameterObject>
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
        >Pip3A4PurchaseOrderRequest</rdfs:label>
      </anchor:Input>
    </anchor:hasInput>
    <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >MediationProcess</rdfs:label>
  </anchor:Process>
</rdf:RDF>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ontologies.zip
Type: application/zip
Size: 1985 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20080506/58ec49f4/attachment.zip>


More information about the protege-owl mailing list