public static boolean isReferenceProperty ( final Node node , final String propertyName ) throws RepositoryException { final Optional < PropertyDefinition > propertyDefinition = getDefinitionForPropertyName ( node , propertyName ) ; return propertyDefinition . isPresent ( ) && ( propertyDefinition . get ( ) . getRequiredType ( ) == REFERENCE || propertyDefinition . get ( ) . getRequiredType ( ) == WEAKREFERENCE ) ; }
Check if a property definition is a reference property