On 06/02/12 15:19, Chris Dollin wrote:
Dick Murray said:

(re http://id.example.org/column/99)

How come the property URI isn't valid please?
I believe it can't be represented as a predicate in RDF/XML. (Because it
has an empty localName.) Jena has RDF/XML history in its bones.

[Aside: it looks in your example that the URIs have a leading space,
which, if true, makes them illegal in a not-detected-by-jena kind of way.]

Chris

Further investigation...

Stack trace for ResourceFactory is;

Scratch2 [Java Application]
    com.unit4.scratch.Scratch2 at localhost:54723
        Thread [main] (Suspended)
            Util.splitNamespace(String) line: 73
            Node_URI.getLocalName() line: 64
            PropertyImpl(ResourceImpl).getLocalName() line: 133
            PropertyImpl.checkLocalName() line: 81
            PropertyImpl.<init>(String) line: 72
            ResourceFactory$Impl.createProperty(String) line: 241
            ResourceFactory.createProperty(String) line: 109
            Scratch2.main(String[]) line: 15
    /usr/lib/jvm/java-6-openjdk/bin/java (6 Feb 2012 16:29:51)

which calls;

    public PropertyImpl( String nameSpace, String localName )
        {
        super( nameSpace, localName );
        checkLocalName();
        checkOrdinal();
        }

Stack trace for ModelFactory is;

Scratch2 [Java Application]
    com.unit4.scratch.Scratch2 at localhost:54723
        Thread [main] (Suspended)
            PropertyImpl.<init>(Node, EnhGraph) line: 108
            PropertyImpl$1.wrap(Node, EnhGraph) line: 61
            Personality<T>.newInstance(Class<X>, Node, EnhGraph) line: 84
            ModelCom(EnhGraph).getNodeAs(Node, Class<X>) line: 130
            IteratorFactory.asResource(Node, Class<X>, ModelCom) line: 69
            IteratorFactory.asProperty(Node, ModelCom) line: 63
            ModelCom.getProperty(String) line: 702
            ModelCom.createProperty(String) line: 1107
            Scratch2.main(String[]) line: 22
    /usr/lib/jvm/java-6-openjdk/bin/java (6 Feb 2012 16:29:51)

which calls;

    public PropertyImpl( Node n, EnhGraph m )
        {
        super( n, m );
        checkOrdinal();
        }

So the checkLocalName() isn't called...

Why's the checkLocalName() called in some constructors but not others..?

Also the Util.splitNamespace starts at the end goes back to the last / (i.e. before the 99) then winds forwards to the end and returns 31. Hence the localName is "".

Reply via email to