<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><br>
      Having now given a go at replicating your problem and based on
      what you have told us so far, I think that your troubles involve
      the different names for entities and how various programs are
      translating these names.<br>
      <br>
      <blockquote type="cite"><span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">I
          am running P4.3 and exporting an owl file with class names
          having forward</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">slashes

          and other reserved characters. </span></blockquote>
      <br>
      I made an ontology (attached) that has an entity with the name <br>
      <br>
      <pre>    <a class="moz-txt-link-freetext" href="http://mousey.synology.me/ontologies/TestSlash#A/B">http://mousey.synology.me/ontologies/TestSlash#A/B</a>
</pre>
      <br>
      I don't know if this is a valid IRI or not but the OWL api had no
      problems saving or reading it.  I think that I remember that the
      code that checks IRI's for validity was fixed quite some time ago
      and now properly checks their syntax but I am not certain.<br>
      <br>
      The IRI is the "real" name for the entity and it is what you use
      if you want to be unambiguous.  Unfortunately this is not a
      convenient name for humans and this is why Protege and other tools
      let you use other simpler names such as the rdfs:label.  <br>
      <br>
      Different mappings between the readable names and the IRI are
      possible and you are using two OWL api programs (Protege and the
      DLQueryExample) that have been set up with different mappings.<br>
      <br>
      <blockquote type="cite"><span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">The

          odd characters are getting</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">in

          the way. However, if I use 'DL Query' in P</span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px;background:rgb(255,255,204)">rotege</span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px"> to
          query these classes</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">for

          subclasses, as long as I enclose the classes with single
          quotes, the</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">query

          works just fine. I can't seem to do the same using owlapi
          package. </span></blockquote>
      <br>
      <br>
      Before I gave this entity an rdfs:label of "A/B", it rendered in
      Protege as B and the DLQuery tab would properly show the inferred
      individuals in B.  After I gave this entity an rdfs:label of
      "A/B", it rendered in Protege as A/B and the DLQuery tab would
      properly show the inferred individuals in A/B.  However, in both
      cases the DLQueryExample.java program that you mentioned would
      only respond to the name B.<br>
      <br>
      Thus Protege is allowing you to use whatever name is used to
      render the entity.  The DLQueryExample program is simply using the
      fragment at the end of the IRI (e.g. B for our entity) and this is
      indicated in the comment before the short form provider is set in
      the program:<br>
      <br>
      <pre>            // Entities are named using IRIs. These are usually too long for use
            // in user interfaces. To solve this
            // problem, and so a query can be written using short class,
            // property, individual names we use a short form
            // provider. In this case, we'll just use a simple short form
            // provider that generates short froms from IRI
            // fragments.
            ShortFormProvider shortFormProvider = new SimpleShortFormProvider();
</pre>
      <br>
      <blockquote type="cite"><span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">I</span><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">inquired

          at stackoverflow and one of the owlapi developers responded
          that it was a bug</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">in </span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px;background:rgb(255,255,204)">Protege

          while</span><span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px"> exporting

          owl file with class names having reserved character(s). Any</span><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <span
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">thoughts?

          Here is the discussion in stackoverflow:</span><br
          style="font-family:arial,sans-serif;font-size:13.333333015441895px">
        <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/23506879/using-owlapi-to-parse-owl-file-containing-classes-with-odd-characters"
style="font-family:arial,sans-serif;font-size:13.333333015441895px"
          target="_blank">http://stackoverflow.com/questions/23506879/using-owlapi-to-parse-owl-file-containing-classes-with-odd-characters</a><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
      </blockquote>
      <br>
      In my experiments, I saw no evidence of any bug in Protege or in
      the OWL api.  It is true that I didn't check the specifications
      for the validity of the IRI.  But the ontology saved and loaded
      correctly and seemed to behave correctly when it was loaded.<br>
      <br>
      -Timothy<br>
      <br>
      <br>
      <br>
      On 06/05/2014 03:01 PM, Blaise Che wrote:<br>
    </div>
    <blockquote
cite="mid:CAGOqAJjGHDhapye7v4_PL0YJaXSMpNuj1dAT5s2m0DB8=--48w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Thanks Tim. The motivation here is that we are
        receiving owl file from a vendor with these reserved characters,
        and would like to parse and extract useful data with owlapi. The
        issue is very easy to reproduce by saving an owl file from
        Protege with a class having a reserved character. If you open th
        example file you just generated, and hit the DLQuery tab, you
        wil realize that you can query for related class information for
        the class 'A/B'. However, if you try to query the same
        information with the official owlapi examples at <a
          moz-do-not-send="true"
href="https://github.com/owlcs/owlapi/tree/master/contract/src/test/java/org/coode/owlapi/examples">https://github.com/owlcs/owlapi/tree/master/contract/src/test/java/org/coode/owlapi/examples</a>,
        you will receive parsing errors because of the '/' character.
        One of the experts at owlapi argues that it is an error with the
        way Protege saves the owl file with these reserved characters
        (per stackoverflow link below). However, I would like a Protege
        developer to confirm and if so, whether a fix is planned for it.
        Thanks!</div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Jun 5, 2014 at 7:15 AM, Timothy
          Redmond <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:tredmond@stanford.edu" target="_blank">tredmond@stanford.edu</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div class="">
                <div>On 06/03/2014 09:41 AM, Blaise Che wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div><span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">I
                        tried to post this in developer forum but it
                        bounced back. Sorry if cross-posting.</span></div>
                    <div><span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">I
                        am running P4.3 and exporting an owl file with
                        class names having forward</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">slashes

                        and other reserved characters. I noticed that
                        these characters are</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">maintained.

                        However when I use the owlapi tutorial example
                        file to query for</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">subclasses

                        of these classes, I get an error. </span></div>
                  </div>
                </blockquote>
                <br>
              </div>
              I haven't looked at this in detail yet but there are a few
              general things that can be said.  First of all, Protege is
              based on the OWL api so - modulo OWL api versioning -
              anything that happens in Protege can be mirrored in the
              OWL api.  That being said, the Protege user interface may
              be doing something to your input when you put it in
              (especially if the syntax is illegal for IRI's).  It is
              also possible that the OWL api is lenient with IRI's when
              an ontology is saved.<br>
              <br>
              But if you want to make it easy for someone to say more,
              then add some steps to reproduce the issue, maybe even
              supply an ontology.  In answering your question, a
              developer may try to reproduce your situation.  I did, for
              example create a name for an entity with  '/' in it and I
              found an IRI of the form:<br>
              <br>
              <pre>       <a moz-do-not-send="true" href="http://www.semanticweb.org/redmond/ontologies/2014/5/untitled-ontology-63#A/B" target="_blank">http://www.semanticweb.org/redmond/ontologies/2014/5/untitled-ontology-63#A/B</a>
</pre>
              <br>
              and Protege gave the short name B. I haven't yet checked
              if this is illegal syntax.<br>
              <br>
              Also - what is your motivation for trying this?<br>
              <br>
              -Timothy<br>
              <br>
              <br>
              <blockquote type="cite">
                <div class="">
                  <div dir="ltr">
                    <div><span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">The

                        odd characters are getting</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">in

                        the way. However, if I use 'DL Query' in P</span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px;background:rgb(255,255,204)">rotege</span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px"> to
                        query these classes</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">for

                        subclasses, as long as I enclose the classes
                        with single quotes, the</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">query

                        works just fine. I can't seem to do the same
                        using owlapi package. I</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">inquired

                        at stackoverflow and one of the owlapi
                        developers responded that it was a bug</span><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">in </span><span
style="font-family:arial,sans-serif;font-size:13.333333015441895px;background:rgb(255,255,204)">Protege

                        while</span><span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px"> exporting

                        owl file with class names having reserved
                        character(s). Any</span><br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <span
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">thoughts?

                        Here is the discussion in stackoverflow:</span><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/23506879/using-owlapi-to-parse-owl-file-containing-classes-with-odd-characters"
style="font-family:arial,sans-serif;font-size:13.333333015441895px"
                        target="_blank">http://stackoverflow.com/questions/23506879/using-owlapi-to-parse-owl-file-containing-classes-with-odd-characters</a><br
style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                      <br
                        style="font-family:arial,sans-serif;font-size:13.333333015441895px">
                    </div>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
                <pre>_______________________________________________
protege-user mailing list
<a moz-do-not-send="true" href="mailto:protege-user@lists.stanford.edu" target="_blank">protege-user@lists.stanford.edu</a>
<a moz-do-not-send="true" href="https://mailman.stanford.edu/mailman/listinfo/protege-user" target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-user</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            protege-user mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:protege-user@lists.stanford.edu">protege-user@lists.stanford.edu</a><br>
            <a moz-do-not-send="true"
              href="https://mailman.stanford.edu/mailman/listinfo/protege-user"
              target="_blank">https://mailman.stanford.edu/mailman/listinfo/protege-user</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
protege-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:protege-user@lists.stanford.edu">protege-user@lists.stanford.edu</a>
<a class="moz-txt-link-freetext" href="https://mailman.stanford.edu/mailman/listinfo/protege-user">https://mailman.stanford.edu/mailman/listinfo/protege-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>