}
private CustomProperty lookupProperty( QName name, Resource r ) {
if( name == null) throw new IllegalArgumentException( "name is null");
if( r instanceof CustomPropertyResource ) {
CustomPropertyResource cpr = (CustomPropertyResource) r;
if( cpr.getNameSpaceURI() == null ) throw new IllegalArgumentException( "namespace uri is null on CPR");
if( cpr.getNameSpaceURI().equals( name.getNamespaceURI() ) ) {
return cpr.getProperty( name.getLocalPart() );
} else {
return null;
}
} else {
return null;