chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Brackx <michael.javaone+c...@gmail.com>
Subject Re: secondary type property cardinality ignored
Date Tue, 20 Aug 2013 09:34:19 GMT
        // 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message