public boolean isReferenceProperty ( Name nodeTypeName , Name propertyName ) { JcrNodeType type = getNodeType ( nodeTypeName ) ; if ( type != null ) { for ( JcrPropertyDefinition propDefn : type . allPropertyDefinitions ( propertyName ) ) { int requiredType = propDefn . getRequiredType ( ) ; if ( requiredType == PropertyType . REFERENCE || requiredType == PropertyType . WEAKREFERENCE || requiredType == org . modeshape . jcr . api . PropertyType . SIMPLE_REFERENCE ) { return true ; } } } return false ; }
Determine if the named property on the node type is a reference property .