Log of the #fcrepo channel on chat.freenode.net

Using timezone: Eastern Standard Time
* dwilcox joins09:31
* peichman joins09:36
* ajs6f joins09:40
* EdF joins09:48
* jcoyne joins10:18
* acoburn joins10:21
* jcoyne leaves10:22
* mikeAtUVa joins10:44
* arebenji joins11:05
* barmintor leaves11:07
* dwilcox leaves11:16
* dwilcox joins11:39
* ajs6f leaves11:41
* dwilcox leaves11:44
* dwilcox joins11:56
* whikloj joins11:58
* ajs6f joins12:26
<whikloj>acoburn: ping12:28
* ajs6f leaves12:38
* ajs6f joins12:51
<whikloj>ajs6f: quick question. Is the rdf:type fedora:Resource common to any resource we create in Fedora?12:58
<ajs6f>whikloj: Erm. I think so, if you mean the usual use of the word (objects/containers, datastreams/binaries). Not if you mean "anything that can be retrieved from the API", I don't think, but maybe?12:59
whikloj: I am thinking of auth-related stuff. I don't know, for example, if an ACL is a fedora:Resource.13:00
whikloj: (Althought it definitely should be, and should be LDP-ized along with versioning and fixity.)
<whikloj>ajs6f: yes, I am working on fedora-transform and it looks like cbeer used nt:base as a "sort of" common starting point13:01
<ajs6f>whikloj: That's not too surprising— it's totally historical. Don't feel bound by that.
whikloj: Choose for using Fedora types, not JCR types.
<whikloj>ajs6f: right, which is why I thought fedora:Resource13:02
<ajs6f>whikloj: i bet the transform-resources are not stored as Fedora resources, but if cbeer did it again today, I am sure they would be.
<whikloj>ajs6f: That's what I am doing
<whikloj>well see about that
<ajs6f>Fedora 4: We'll see about that.13:03
<whikloj>so if by "anything", I mean anything you could get a transformed representation of. Would those have rdf:type of fedora:Resource?
<ajs6f>whikloj: Again, I _think_ so, but you need to look at the FedoraTransform JAX-RS controller to see what it is doing. Does it check for that?13:04
<whikloj>ajs6f: it doesn't currently because it deals only with jcr.Nodes13:05
ajs6f: I'll play with it some more and come back with a clearer (hopefully) picture
<ajs6f>whikloj: Okay. You may want to think about what it would mean to transform something that isn't a fedora:Resource. What would that be? It would be an RDF-thing in the repository that isn't a fedora:Resource. If we have any such things, I don't think we _want_ to have them. I think they would be oversights/bugs.13:06
<whikloj>ajs6f: that's what I was thinking, but I'm still not 100% clear how he is deriving the correct transform to apply. Seems based on the name you give and the mixin:types13:07
<ajs6f>whikloj: Yes, it is. That's exactly right.
<whikloj>ajs6f: So if I move to fedora:, it would be the name I give (ie. default) and the rdf:types.
<ajs6f>whikloj: But really not the name, the URI.13:08
whikloj: He's going to the types first, and if he doesn't get a match, to the default.
whikloj: I think we want to stay near that. Matching on type is the right thing here.13:09
whikloj: If you restrict the inputs to fedora:Resources, you don't need a "default" case any more. The match you get on fedora:Resource _is_ your default.
<whikloj>ajs6f: ok
<ajs6f>whikloj: The problem is that we have no sense of specificity. We don't know about relationships between the types (sub-type, super-type) because we don't do inferencing.13:10
<whikloj>ajs6f: see in the JCR cbeer was pulling all the supertypes and mixinNodeTypes, which I think I can avoid13:11
<ajs6f>whikloj: So if a thing has type fedora:Resource and type myspecial:ContentModel, it's pretty clear to us humans that the second one is the interesting one to match on, but how does the repo know?
whikloj: Yeah, that's my point: cbeer was letting the JCR do inferencing for him.
<whikloj>ajs6f: yeah and ordering by the name
ajs6f: first match wins
<ajs6f>whikloj: Urg. No. No ordering by name. That's LOGO programming.13:12
whikloj: RDF knows no order.
whikloj: It's got to be deterministic, yes, but not syntactical.13:13
whikloj: What are you doing, exactly?
<whikloj>ajs6f: So how do we want to determine which transform gets applied? Non fedora namespaced first? But then if you have 2 non-fedora ns...
<ajs6f>whikloj: Yeah, exactly. I'm saying this is hard.
whikloj: This is easy with inferencing, but we don't have that.13:14
whikloj: "Most specific" thing is an obvious call out to subsumption.
<whikloj>ajs6f: really replacing the JCR creation of the transforms with using the nodeServices
^^ is what I'm doing
<ajs6f>whikloj: Right. You may want to confine yourself narrowly to that and raise another ticket for this, because this is hard.13:15
whikloj: And it's a nice day, and wouldn't you rather go play outside anyway?
<whikloj>ajs6f: ok, then a second question. When trying to create a binaryResource I am getting an error because the path13:16
haha, it's about 10 degrees F here and windy
<ajs6f>whikloj: Canada, what is your deal?
whikloj: Are you trying to create it "directly"?13:17
<whikloj>anyways creating a binaryService with nt:base in the path throws an error about missing closing }
<ajs6f>whikloj: Wait, what? Missing }?
<whikloj>yeah, like when it expands the namespace something gets messed up
I'll roll myself back and try to confine myself to just creating the FedoraResources instead of jcr Nodes13:19
<ajs6f>whikloj: Yeah, that is pretty weird. Let's nail that before we even think about rearranging cbeer's old furniture.13:22
* ajs6f leaves13:23
<whikloj>ajs6f: I think it is because when you create a node with a path "/fedora:system/fedora:transform/fedora:ldpath/default/{http://www.jcp.org/jcr/nt/1.0}base"
it works, but creating a FedoraResource with the same path, fails13:24
because he was using the actual javax.jcr.nodetypes.NodeTypes.NT_BASE to name it
* ajs6f joins13:30
whikloj: Because of the part of the repo in which you are trying to create it?13:41
<whikloj>ajs6f: sorry you dropped out for a second13:42
ajs6f: I think it is because when you create a node with a path "/fedora:system/fedora:transform/fedora:ldpath/default/{http://www.jcp.org/jcr/nt/1.0}base"
it works, but creating a FedoraResource with the same path, fails
because he was using the actual javax.jcr.nodetypes.NodeTypes.NT_BASE to name it
ajs6f: I replaced the NT_BASE constant with "nt:base" and was able to create it, just have to match on it13:43
<ajs6f>whikloj: WTF? Isn't NT_BASE just a constant string?13:44
<whikloj>ajs6f: yes, but it seems to have the expanded namespace13:45
<ajs6f>whikloj: This is bleh. Can you just change the name of the thing? I don't know why we would call it "nt:base" anyway. That seems like a weird name.
<whikloj>ajs6f: I can't see why not13:46
<ajs6f>whikloj: Then burn it down and salt the ashes.
<whikloj>ajs6f: only thing I need to verify is if he was using NT_BASE because then he could use the node.getPrimaryNodeTypes() to build the path to look for his transform13:48
ajs6f: because as you said, nt:base would be the default
or I said that, can't remember now
<ajs6f>whikloj: That should be distinct from the name, though, right? Or at least I would hope soi.13:49
<whikloj>ajs6f: I think it is connected, here https://git.io/vajXO13:50
<ajs6f>whikloj: Oh, I see what you mean. Okay, well, you can change it there too, right? Put in a line after that that returns the default if there's no match in the loop, or something like that?13:51
<whikloj>ajs6f: So would you suggest that I leave most of that method allone? I was going to switch it to deal with FedoraResource too. But I guess that could be out of scope.13:53
<ajs6f>whikloj: Mm. Your call. It's in the spirit of what you are doing elsewhere.13:54
<whikloj>ajs6f: ok14:00
<ajs6f>acoburn: You know, from a semantic point of view, it's actually the closure of containment. That's what we're trying to express. But from a functional point of view, it's "the place you go to get transactions". That makes no sense. There is no reason for those two things to lock togther.14:10
<acoburn>ajs6f: I agree, I wonder if there couldn't be a header on each resource that would point to "the place you go to get transactions". That would make it a lot easier to find these "repository-wide" services14:11
<ajs6f>acoburn: Yeah, we're in the bind between "This is REST, so you are addressing a resource." and "This is a repository, and you are addressing a repo-wide suite of services."14:12
<acoburn>ajs6f: but even with REST, we can make use of Link headers to point to other resources14:13
<ajs6f>acoburn: That may the best we can do. I feel like there were strong reasons against doing txactions via headers, but now I can't remember what they were.14:14
<acoburn>ajs6f: I don't remember either14:15
<ajs6f>acoburn: Maybe we made the wrong choice. OH NOOOOOOESSSS!14:16
<acoburn>ajs6f: there was some discussion here: https://jira.duraspace.org/browse/FCREPO-174114:18
<ajs6f>acoburn: Well, cbeer isn't really working on the project any more, so we can now do all the things he didn't want to do.14:19
acoburn: Seriously, his points are correct, but in hindsight, I don't think they are that strong. Semantic coherence between what's inside and outside a transaction… that doesn't seem very interesting to most normal usage patterns.14:20
* ajs6f leaves14:32
* ajs6f joins14:37
<whikloj>ajs6f: one last question before I head off to enjoy the wonderful weather14:44
ajs6f: If I use the rdf:types with the fedora: internal namespace, but when I get them from the resource they have the expanded namespace.14:45
ajs6f: I have to use a converter no? which is in the modeshape package...which I don't think I should use
<ajs6f>whikloj: No, this isn't about converters. Namespace-prefix stuff is not about converters, it's about RDF. "fedora:" is not an "internal namespace" it's a prefix.14:47
<whikloj>ajs6f: ok, so then a DefaultIdentifierTranslator?14:50
<ajs6f>whikloj: No. You are not converting between two different kinds of identifiers. You are just expanding or contracting a set of abbreviations. Can you explain a little more about what the problem is?14:51
<whikloj>ajs6f: nevermind, you have work and I am clearly very lost inside Fedora. I'll come back to it next week. thanks14:52
<ajs6f>whikloj: It's okay, I'd like you to get to a better place with this work.14:53
<whikloj>ajs6f: I've been hoping the same thing for over a year now
<ajs6f>whikloj: Fedora 4: We've been hoping.14:54
<whikloj>ajs6f: I have "http://fedora.info/definitions/v4/repository#Resource" as the rdf:type, and the path to match is "fedora:Resource". So I need to convert/translate/whatever
* tjohnson joins
<ajs6f>whikloj: Ah, okay, now I'm with you. And you don't have the machinery in kernel-modeshape to hand?14:55
* dwilcox leaves14:56
<whikloj>ajs6f: not from inside the fcrepo-transform it seems, I get a compiler error that the ...modeshape.. package doesn't exist
<ajs6f>whikloj: Look at the pom.xml to see for sure.
<whikloj>ajs6f: it's there for test, so I could add it. But is that the best idea. I thought we were trying to limit the modeshape stuff14:58
<ajs6f>whikloj: Your instinct is right. The problem is that the prefix-namespace mapping is currently managed by the JCR. This is an architectural flaw in our software. acoburn and I ran into this on another issue just the other day.
whikloj: You can't really get from prefix to namespace or back without help from the JCR. Which sucks and is wrong.14:59
<whikloj>ajs6f: so I don't have a choice, until we change EVERYTHING
<ajs6f>whikloj:Hm. I'm wondering how it works now.
<whikloj>ajs6f: ummmm, looks like they grab NodeTypes and convert them to a string... that seems... to easy15:02
ajs6f: I guess because NodeTypes are part of the jcr definition it doesn't need modeshape15:03
<ajs6f>whikloj: Wait, it's depending directly on the JCR API?
<whikloj>ajs6f: That git.io link has the line where it compares the NodeType.toString() to the.... oh wait I think I got it15:04
<ajs6f>whikloj: yeah, I'm concerned about the fact that the module is doing an end-run around the kernel to get right to the JCR. That is not cool. That means it wouldn't work with another kernel-impl.15:05
<whikloj>ajs6f: This is why cbeer used the NT_BASE definition with the full URI that... So perhaps I need to use a similar expanded version of fedora:Resource if I want to match
ajs6f: Oh I would say that this module seems to just assume a modeshape impl15:06
<ajs6f>whikloj: Yeah, I think that's probably the right thing to do. Just don't use the prefixes. It could get a little more complicated to read, but it will be safe.
whikloj: Well, that was reasonable when cbeer wrote it, to be fair.
<whikloj>ajs6f: oh yeah, no blood, no foul there
* whikloj leaves15:15
<ajs6f>later gators15:22
* ajs6f leaves
* arebenji leaves15:45
* jrgriffiniii joins16:10
* mikeAtUVa leaves16:39
* acoburn leaves17:03
* geekscruff joins17:22
* geekscruff leaves17:23
* peichman leaves17:33
* dwilcox joins19:16
* EdF leaves19:46
* dwilcox leaves19:49
* tjohnson leaves21:44
* peichman joins22:39
* peichman leaves22:59