chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: secondary type property cardinality ignored
Date Tue, 20 Aug 2013 10:58:02 GMT
 Thanks for all the details.
 I've implemented a quick fix but hadn't time to test it. Give it a try.

 Florian


> // get the type
>         TypeDefinition type = null;
>         if (typeCache != null) {
>             PropertyData<?> typeProp =
> properties.getProperties().get(PropertyIds.OBJECT_TYPE_ID);
>             if (typeProp instanceof PropertyId) {
>                 String typeId = ((PropertyId) 
> typeProp).getFirstValue();
>                 if (typeId != null) {
>                     type = typeCache.getTypeDefinition(typeId);
>                 }
>             }
>
>             if (type == null && objectId != null && propertyMode !=
> PropertyMode.CHANGE) {
>                 type = 
> typeCache.getTypeDefinitionForObject(objectId);
>             }
>         }
>
>>From what i can see the secondary types are never cached.
> typeCache.getTypeDefinition(typeId)
> returns a type, as the cache is self loading
> and because type != null
>  typeCache.getTypeDefinitionForObject(objectId)
> is never called
>
> Michael
>
>
> On Tue, Aug 20, 2013 at 11:14 AM, Michael Brackx <
> michael.javaone+cmis@gmail.com> wrote:
>
>> In
>>     public static JSONObject convert(final Properties properties, 
>> final
>> String objectId, final TypeCache typeCache,
>>             final PropertyMode propertyMode, final boolean succinct) 
>> {
>>
>> only the primary type is considered to get the property definitions
>>
>> Michael
>>
>>


Mime
View raw message