On 11/27/13, 1:44 PM, Joshua TAYLOR wrote:
On Wed, Nov 27, 2013 at 2:42 PM, Thomas Marsh <[email protected]> wrote:
On 11/27/13, 10:55 AM, Joshua TAYLOR wrote:
On Wed, Nov 27, 2013 at 1:27 PM, Thomas Marsh <[email protected]> wrote:
my problem is that when I get to an anonymous individual, I can't tell
which
file it came from, and so I can't tell which namespace to put it into.
What do you mean "put it into a namespace"? It's an anonymous
individual; it doesn't have an IRI. "Namespaces" are just IRI
prefixes used for convenience. If something is anonymous and doesn't
have an IRI, then it has no IRI to abbreviate with a namespace prefix.
yes, that is exactly my problem. my store requires me to state where I am
storing everything. I was going to try to use the ontology uri for the file
where the anonymous individual was declared as a workaround. the problem
is that I can't find where it was declared by the time everything's been
read into the model.
Without some more information about your proprietary store, it's not
clear what you're trying to do or what requirements it imposes on you.
"my store requires me to state where I am storing everything."
Aren't you storing everything in the store? In Jena, blank nodes do
have AnonIds that you can extract with getId. Maybe you could
construct an identifier with that?
Thanks for the help with this, and sorry to be unclear.
The relevant requirement is that everything have a namespace. since
anonymous nodes don't have namespaces as such, I'm trying to fake it by
making a new namespace to contain the anonymous individuals. I would
like this to somehow reference the context in which the anon was
declared. I think the best way to do this is by finding a uri for one
of these two things:
1. the namespace of the subject of the assertion that has the blank
node as its object
2. the "default" namespace of the owl file within which the blank node
is declared.
I am investigating method 2. To that end, I am trying to figure out
the connection between the blank node Jena Resource and the ontology
which it comes from. in other words, I'm trying to find, given an
anonymous individual, which owl-file/ontology it was declared in. is
there a way to do that?
as an example, if I have an owl file called "foo.owl", and it contains
ontology an ontology called "fooOnt" and a namespace called "fooNS", I
want to use one of these things so that I can build a namespace on my
store into which I can throw all my anonymous individuals.
so, in this example, I'd make a namespace called something like:
foo.owl.data or fooOnt.data or fooNS.data
I'm a little new to this, so I'm not totally sure which, if any, of
these things I could use, but that's the general idea.
does that make sense?
-thomas