Uploaded image for project: 'VIVO'
  1. VIVO
  2. VIVO-1408

ConifigurationBeanLoader should recognize RDF namespaces in java: URIs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.10
    • Component/s: None
    • Labels:
    • Attachments:
      0
    • Comments:
      3

      Description

      As currently implemented, the ConfigurationBeanLoader recognizes a URI for a Java class as simply the string "java:" followed by the fully qualified class path. As usual, the package hierarchy in a class path is delimited by periods ("."), so we have something in this form:

          <java:fully.qualified.ClassPath>

      However, package structures can be quite deep, and thus fully qualified class names can be quite long. As a result, we see RDF configuration files such as searchIndexerConfigurationVitro.n3 containing long, repetitive URIs such as these:

      :ex1 a <java:edu.cornell.mannlib.vitro.webapp.searchindex.exclusions.ExcludeBasedOnType> ,

              <java:edu.cornell.mannlib.vitro.webapp.searchindex.exclusions.SearchIndexExcluder> .

      :find1 a <java:edu.cornell.mannlib.vitro.webapp.searchindex.indexing.IndexingUriFinder> ,

              <java:edu.cornell.mannlib.vitro.webapp.searchindex.indexing.AdditionalURIsForDataProperties> .

       

      It would be much easier to read these strings if we could use RDF namespaces with corresponding prefixes. However, the period is not a valid delimiter for a namespace.

      The solution is to modify ConfigurationBeanLoader so it treats a hash ("#") as equivalent to a period (".") in the URI for a java class. By this means, we could write instead:

      @prefix searchIndex: <java:edu.cornell.mannlib.vitro.webapp.searchindex#>

      :ex1 a searchIndex:exclusions.ExcludeBasedOnType ,

              searchIndex:exclusions.SearchIndexExcluder .

      :find1 a searchIndex:indexing.IndexingUriFinder ,

              searchIndex:indexing.AdditionalURIsForDataProperties .

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                j2blake Jim Blake
                Reporter:
                j2blake Jim Blake
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: